Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OtterTools Controls Improvement #1350

Closed
wants to merge 7 commits into from

Conversation

Soare-Robert-Daniel
Copy link
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel commented Nov 25, 2022

Closes #1333.

Summary

Improvements:

  • change the Icon when used with other plugins.

Screenshots

On Core and Otter blocks, the Otter icon will be displayed. For third-party, another one will be used:
image


Test instructions

Please make sure that the shortcuts are displayed and that they work.
⚠️ For Windows, you will need a machine for it. Browserstack does not seem to work well.


Checklist before the final review

  • Visual elements are not affected by independent changes.
  • It is at least compatible with the minimum WordPress version.
  • It loads additional script in frontend only if it is required.
  • Does not impact the Core Web Vitals.
  • In case of deprecation, old blocks are safely migrated.
  • It is usable in Widgets and FSE.
  • Copy/Paste is working if the attributes are modified.

@Soare-Robert-Daniel Soare-Robert-Daniel self-assigned this Nov 25, 2022
@pirate-bot
Copy link
Contributor

pirate-bot commented Nov 25, 2022

E2E Summary

Typing

Test Average Time (ms) Standard Deviation (ms) Median Time (ms) Quantile for soft limit (%) Quantile for hard limit (%)
Typing 129.07 50.11 118.06 0 (60ms) 0 (80ms)
Values above 60ms "0 - 113.56, 1 - 112.50, 2 - 117.41, 3 - 120.06, 4 - 110.39, 5 - 131.12, 6 - 109.59, 7 - 115.57, 8 - 119.65, 9 - 116.10, 10 - 124.09, 11 - 128.24, 12 - 119.99, 13 - 115.72, 14 - 135.04, 15 - 121.50, 16 - 114.42, 17 - 112.75, 18 - 114.21, 19 - 128.44, 20 - 114.26, 21 - 120.38, 22 - 115.85, 23 - 117.48, 24 - 115.30, 25 - 114.35, 26 - 127.58, 27 - 125.00, 28 - 151.30, 29 - 141.19, 30 - 110.36, 31 - 137.26, 32 - 150.40, 33 - 113.30, 34 - 118.73, 35 - 135.20, 36 - 124.56, 37 - 115.76, 38 - 116.29, 39 - 120.80, 40 - 127.21, 41 - 125.72, 42 - 116.45, 43 - 128.69, 44 - 117.06, 45 - 117.22, 46 - 112.44, 47 - 114.66, 48 - 126.71, 49 - 118.06, 50 - 116.56, 51 - 115.11, 52 - 121.03, 53 - 114.25, 54 - 115.97, 55 - 113.60, 56 - 118.16, 57 - 117.38, 58 - 114.73, 59 - 122.41, 60 - 114.67, 61 - 111.81, 62 - 114.28, 63 - 478.16, 64 - 140.70, 65 - 137.72, 66 - 151.00, 67 - 134.96, 68 - 139.28, 69 - 417.77, 70 - 124.42, 71 - 113.97, 72 - 116.01, 73 - 121.09, 74 - 117.29, 75 - 124.64, 76 - 112.78, 77 - 115.28, 78 - 118.12, 79 - 121.05, 80 - 155.34, 81 - 122.09, 82 - 120.74, 83 - 114.87, 84 - 118.87, 85 - 117.43, 86 - 115.73"

@Soare-Robert-Daniel Soare-Robert-Daniel linked an issue Nov 25, 2022 that may be closed by this pull request
@HardeepAsrani
Copy link
Member

@mghenciu @JohnPixle @ineagu Do you think this can be a good idea? To not show Otter icon but this tools icon in every block (including Otter) and have the "Powered by Otter" thing in the Popover instead of Feedback link.

@JohnPixle
Copy link
Contributor

I am not 100% sure about this tbh. The tool icon looks generic and can be considered as part of the core. I am not sure it is a good idea as I would personally prefer to have a clear idea on the otter-specific functionality. Although the tool icon looks good and blends well in the UI, I think it might cause more confusion.

I understand that the "powered by Otter text will help somehow.

Open to hear what others have to say. Thanks for the update!

@ineagu
Copy link
Contributor

ineagu commented Nov 29, 2022

I am not sure if this helps, what I think we can do and be enough si the 1 & 2 below :

  1. Make sure the users can move/disable it from the settings page if they want.

  2. Clean & Optimize

a) The "Help us improve" is out of place there in the dropdown menu, the user is working, let's not bother them.
b) Can we move the Otter icon towards the end? before the last 2 dropdowns?
c) Can we display the keyword shortcuts? especially for copy paste and export? https://vertis.d.pr/i/ujsStI

@mghenciu
Copy link
Contributor

I agree with the suggestions from Ionut, and I think the overall idea would be to analyse how often those options would actually be used (and based on that decide if it's worth a section in the Toolbar or not).

Based on this assumptions:

  • Copy Paste could be the option used most often
  • more experienced users would prefer to use a Keyboard Shortcut for Copy Paste style, so they won't use a the Toolbar
  • beginner/casual users would maybe use the Otter Toolbar Icon
  • Export JSON is definitely not used very often, so it may not be needed to have it in the Toolbar
  • Transform to Sticky would be rarely used

Alternatively, we can remove the Icon from the Toolbar, and move the Otter Settings under the options button, but have it in a separate Otter Settings, like this:
image

@HardeepAsrani
Copy link
Member

Alternatively, we can remove the Icon from the Toolbar, and move the Otter Settings under the options button, but have it in a separate Otter Settings, like this:

Can you check if we can possibly do this? @Soare-Robert-Daniel

@ineagu
Copy link
Contributor

ineagu commented Nov 29, 2022

definitively, we would want to see how and if people are using those things.

@Soare-Robert-Daniel
Copy link
Contributor Author

After some prototyping, here are some observations

  • We can have an Otter Menu in the Options (three dots), but we don't have a working option to control the location for a good separation (result below). When trying to make the feel of group section, I added some little hacks. The result still doesn't look too good, but we don't too many tools.
  • The options are starting to get big. Almost the size of the page in a 16-inch mac display. I was thinking about adding a dropdown for the menu (to be a two clicks action) to save space.

Extending the Options has basic functionality without many customization options or how to make a better grouping.

The only component that we can use is this one https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-settings-menu-controls/README.md

The component has an option for location, but it is unusable.

image

image

The separate Otter icon might look a little intrusive, but still has fewer downsides and more flexibility.

@mghenciu at the beginning, I tried with @HardeepAsrani to find some free keys combination and failed to find them. Most easy key combinations are bound to browsers. I think we try to find a more odd combination but not sure if it will be accessible on usage (like Opt/Alt + Shift + B).

@ineagu
Copy link
Contributor

ineagu commented Dec 5, 2022 via email

@Soare-Robert-Daniel
Copy link
Contributor Author

Soare-Robert-Daniel commented Dec 5, 2022

Why not use the same keys elementor is using? Users migrating from it would know them already?

We do not have the luxury of Elementor. Copy Style a separate feature for us and not integrated like in full-editors like Elementor or Stackable. For pasting style, the Ctrl/Cmd + shift + V might work, but not sure how it behaves on
Windows, where this is the command for pasting non-formatted text.

This observation is based on using Gutenberg's API for shortcuts (which I tested at the beginning). We can force the override in some hacky way but not sure if we break some workflow (or other plugins). Elementor might enforce that binding for them in their own editor, but in Gutenberg, we have to play nice with others.

I can implement a prototype to see how it works and make a better opinion.

@Soare-Robert-Daniel
Copy link
Contributor Author

image

Those combinations seams to work on Apple. The reliability is not great, you need multiple tries for it to trigger.

@Soare-Robert-Daniel
Copy link
Contributor Author

Soare-Robert-Daniel commented Dec 5, 2022

On Firefox, Cmd+Alt+k is reserved by the browser which opens the Console tab for Dev Tools, and the action is canceled. No conflict in Safari. On Chrome, Cmd+Alt+j open the Dev Tools, but the action is still applied.

@HardeepAsrani
Copy link
Member

To be fair this looks even worse: #1350 (comment) - the list is too big and more intrusive.

I suggest we stop here and only take action when we have something specific in mind instead of a knee-jerk reaction.

Thank you @Soare-Robert-Daniel for helping with the quick prototype to see how things will feel.

@Soare-Robert-Daniel
Copy link
Contributor Author

Things done:

  • shortcuts: Mod+Ctrl+j for copy & Mod+Ctrl+k for paste work without conflict on Chrome, Firefox & Safari (assuming that there are no other plugins that may use this combination or the user has different keybinds for browser).
  • different Icons on non-Core/Otter blocks.

In questions:

  • removing the feedback button?
  • adding an Otter icon at the bottom for non-Core/Otter blocks?
  • option to disable the controls from the Dashboard?

Observations:

  • Sticky and Export should be kept in the Toolbar. They will be placed in the last positions even if they are rarely used. It is suitable for visibility and also to not pollute the Options (the 3. dots), which already is very big (almost half the tab screen in 16-inch).

@HardeepAsrani @JohnPixle @ineagu @mghenciu

@ineagu
Copy link
Contributor

ineagu commented Dec 6, 2022

I think we can keep this as it was before, I would just remove removing the feedback button and add the shortcuts.

Need a test machine for it. BrowserStack seams to not do the job
@Soare-Robert-Daniel Soare-Robert-Daniel marked this pull request as ready for review December 6, 2022 12:40
@pirate-bot
Copy link
Contributor

Bundle Size Diff

Package Old Size New Size Diff
Animations 191.24 KB 191.24 KB 0 B (0.00%)
Blocks 1.26 MB 1.26 MB 1.52 KB (0.12%)
CSS 6.65 KB 6.65 KB 0 B (0.00%)
Dashboard 43.58 KB 43.58 KB 0 B (0.00%)
Export Import 5.06 KB 5.06 KB 0 B (0.00%)
Pro 98.24 KB 98.24 KB 0 B (0.00%)

@github-actions
Copy link

github-actions bot commented Dec 6, 2022

Plugin build for bd9bd6f is ready 🛎️!

@Soare-Robert-Daniel Soare-Robert-Daniel mentioned this pull request Dec 6, 2022
7 tasks
@Soare-Robert-Daniel
Copy link
Contributor Author

This will be kept as a discussion thread. The currently approved changes are #1378

@HardeepAsrani HardeepAsrani marked this pull request as draft December 12, 2022 07:29
@HardeepAsrani
Copy link
Member

Closing this in favor of #1403

@pirate-bot
Copy link
Contributor

🎉 This issue has been resolved in version 2.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants