Copy Linked feature on by default but not highlighted

Description:

Following on from:

Upon further inspection, we have identified that the Copy Linked seems to be enabled by default, but is not highlighted.

To truly disable it (initially) and know it has been disabled visually, you have to first click it (disabling it), click it again (enabling and highlighting it) and then click it again (disabling it and un-highlighting it).

Also, as mentioned in the other post, the selected state is not discernible when using Top Toolbar (please see screenshots).

@Louis, please see these related questions:

  1. Where is the default for this configured so this can be switched off for all users?
  2. In what context is it applied (per machine, per session, per site, per user)? (we have tested using the same WP user on the same site and the setting was toggled on for two team members and off for one)

Screenshots, screen recording, code snippet

Selected state using editor toolbar:

Selected state using top toolbar:

Environment info

  • WordPress version: 6.6.2
  • Cwicly Plugin version: 1.4.2
1 Like

Hello @StrangeTech,

This is incorrect. The Copy Linked feature is disabled by default. It would be helpful to know how you came to this assumption.
On a new installation, copy/pasting blocks does exactly what is expected when Copy Linked is disabled.

This is only true when dark mode is enabled. A fix will be issued for this in the next update.

As mentioned above, it is disabled by default.

The setting is persistent to WordPress users → applies to a user like most settings in Cwicly.

Hello @Louis,

Thank you for looking at this.

Perhaps this happens only on older installations, but we were able to replicate the described behaviour yesterday, so it is definitely an issue, even if not the intended behaviour.

I will attempt to replicate it again today and do a screen recording.

Thank you!

In this case there is definitely a bug, because yesterday both I and another team member were logged in to the same site with the same user at the same time and their Copy Linked was “on” even though it wasn’t highlighted (even in the editor toolbar) and mine was “off”.

We had to go through the steps I mentioned to get it “off” again for them.

I stand corrected, my sincere apologies.
Looking at the code it seems that I purposefully left this linked to local storage…

A new installation would have this toggled on “by default” if the browser’s user had previously specified it to be toggled on, if on the same domain etc.

1 Like

Right, thanks for confirming, that explains most of what we saw. :+1:

So, the only issue is the highlighting of the selected state. When you have a chance to work on this for dark mode, please can you take a look at the default selection behaviour, as it appeared to not be highlighted (looked off, but was actually on).

It will be great to have this off by default or at least configurable via the role editor, as it could cause confusion and bugs for clients/editors if on.

1 Like

:+1:

Currently it is off by default, and only relies on the user’s local storage to tell whether or not Copy Linked blocks is enabled and should show the correct state.

What are your thoughts about moving this to be user persistent through WordPress?

I definitely think this makes most sense, here is my reasoning:

  1. It is consistent with the other UI related settings
  2. Allows it to be off or on by default per user and per role (if connected to role manager)
  3. When a specific user has turned it off, I imagine they expect it to be off regardless of the machine/device they are on when they turned it off

I understand that in some usage scenarios it may be toggled frequently, at the same time, I believe the benefits of user persistence are of greater significance.

1 Like

I agree, @StrangeTech.

Will modify the behaviour in the next update and have it tied to the user preferences.

Thanks for bringing this up and persisting :wink:

1 Like

Hello @StrangeTech,

Copy Linked has been move to user persistence in 1.4.3.

Thanks for your input on this one, much appreciated.

1 Like

Hello @Louis,

I confirm the selection works well in the dark mode top toolbar also. :+1:

Thank you!

1 Like