-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Editor: Try a fixed block toolbar #2148
Conversation
874bfdc
to
3fdf471
Compare
Codecov Report
@@ Coverage Diff @@
## master #2148 +/- ##
==========================================
- Coverage 26.54% 26.53% -0.01%
==========================================
Files 157 157
Lines 4853 4854 +1
Branches 818 818
==========================================
Hits 1288 1288
- Misses 3012 3013 +1
Partials 553 553
Continue to review full report at Codecov.
|
Hah, nice, interestingly I just explored something similar with the toolbar in #2151. I like this more than I thought I would. I'd like to chew on it for a bit, and perhaps also run it by @afercia. But my gut reaction is positive. CC: @melchoyce @karmatosed Edit: we'd probably want some centering going on. |
I was going to say the same in your PR :) |
This also has the advantage of reducing the mental-shift when switching from the existing editor (toolbar still at the top) |
The primary disadvantage, potentially, could be that some of the context is lost a little bit. This could definitely affect the tie-in to customization, so pinging @melchoyce and @westonruter here. Also @mtias. |
Under the hood, this toolbar can be placed wherever we want in a different editor. For example, the customization could decide to include it above the blocks, or in a sidebar... |
I don't dislike this (my original concepts when we were starting had a similar concept but at the bottom). But I think it's trying to address a problem that is not of visual design, but of interaction patterns. The UI should not show when you are in "writing" mode, thus not obscuring anything. The problem is how we define "writing" mode. It sounds like Helen got to a situation where hitting "enter" was showing the UI. That is a bug and we should fix it. Hitting "enter" when you are writing should never show UI. The other problem is with mousemoves. Perhaps we should disable the functionality that shows the UI when moving the mouse, or make sure that you hover the toolbar area, or add a delay. I think we should focus on these very evident interaction shortcomings and fix them before making any call regarding the visual design. |
I dont like it. All editors similar to Gutenberg show toolbar where it is now. Do not overcomplicate it. |
I'd tend to agree with @mtias. Maybe worth considering to better define what "writing mode" is. I'd also consider a shortcut to make the toolbar appear and receive focus on demand, see #552. The big problem I see with a fixed toolbar is keyboard interaction. Where the toolbar is placed exactly in the source order? How I move focus to the toolbar using only the keyboard? |
I have for a while had a lot of issues with the current toolbar because of a simple app I use called PopClip (it has a lot of things that help me interact with content, accessibility things and also just things that make life easier), this is the experience I get: Now I don't suggest we design for my not so common case, but it has always meant the toolbar was a bit of a bothersome issue for me. Flipping the thought process, I also prefer design wise having as much as possible context to actions. I can see that being lost the further things get from the content. One thing I really like that I think covers best of both worlds is a 'shadowing toolbars'. These appear where you need, when you need. A basic level of this is one that follows you around at the top, away from the blocks. A more complex is similar to what @mtias is saying where it appears just when needed. A little caution here though as to a lot of people saying what a user will or won't do, without drawing on our examples we have in tests and feedback. Maybe we can focus on the input we have right now and a solution which solves this. If we don't have enough, lets run some tests. We could also usability test some different options, we have that option. |
I'd love to see some user testing sessions include also at least: 1 keyboard user, 1 screen reader user, 1 speech recognition software user 🙂 |
@afercia as would I. Can you help us recruit them? |
Worth noting Ghost use this approach but with a toolbar at the bottom. |
Another small advantage I'm finding here is the simplicity of the technical solution. Our actual solution is not that simple, it requires us to know if the mouse is moving, if we're typing, if we stopped typing... while this is way simpler, we only need to know the selected block. Experience shows that often the simplest solutions are the best ones. |
@youknowriad not sure I agree, because I'd still like the UI to not be visible when I'm typing even if it's fixed top/bottom. |
@karmatosed will ask around :) |
@youknowriad I'd like to move a lot of things at the bottom 🙂 #467 |
I imagine the inspector will end up being a lot more important than floating toolbars when it comes to customization and layout, with the exception of page/post content (which we might explore making editable via Gutenberg at first anyway). I do find the current implementation a little clunky, so I think @mtias's suggestions are all thing we should try, for sure. However, I also wouldn't object to us trying out a docked toolbar, maybe more like this with it fixed and centered with the content, either on the top or the bottom: (Though I do worry it could get lost on the bottom) |
User test results #2259 |
@karmatosed @rianrietveld is going to ping you about this, she has some volunteers :) |
That works as placement in the source order. What doesn't work is the continuous appearing/disappearing of the toolbars, which is highly confusing for users.
Interesting. While for the WCAG the placement in the source order must match the visual order, maybe it's something worth considering, at one condition: The more I think at navigation through blocks and interaction with them, the more I'm convinced that interaction with blocks should be standardized, see Once that would be done, the following step would be establishing a sort of "Edit mode":
|
100% agreed. My perspective is that the idea of blocks is to bring in also that kind of level of standardization. :) |
This is something we have been back and forth in design so much, that I think it might warrant a quick toggle setting so we can test for real and get a better impression of the tradeoffs. I've heard very solid arguments for both proposals, and I think we are exhausting what we can accomplish in discussion form. I also don't feel there's a clear winner yet, so would like to give us the room to test the two. @youknowriad do you think we could target the toolbar easily to two slots based on a setting? |
I think it's doable yes, with some hacky CSS though. What kind of setting are you thinking of? An URL setting? a toggle somewhere in the UI? I'll probably have to rebuild this from scratch but not a big deal. |
Also which one of the "fixed" toolbar design do you think is best?
I personally still prefer the first one visually but happy to try any other alternative. |
I like these two:
though I'd prefer a full-width bar instead of the centered bar. |
I can't second this approach of trying new things just considering a visual perspective. As already noted, this change is an accessibility regression and to make it accessible it would require relevant changes that should be included here. They can't be "added later" because there's no guarantee we'll be able to find a good solution. Any relevant UI change should already include accessibility. |
My apologies Andrea, I didn't mean to ignore your past statements. I assumed per your comment here, and per the latest mockup that Yoast provided in the core editor slack which also featured a docked toolbar, that there was a path ahead for this? |
@joen my role in WordPress and my role at Yoast are two separate things :) Coincidentally, those mockups introduce the idea of a sort of "Edit mode", same as in my comment #2148 (comment) My idea is that in the "Edit mode" the block, the toolbar (and maybe the sidebar) should be the only available and focusable controls and all the rest of the UI should becomes "inert". This could help accessibility as users will be in a sort of "modal" where they have to accomplish a task and the UI makes available only the controls for that task. This part is not mentioned in the mockup, that's a design experimentation. My point here is that any experimentation should already include at least a vague idea of how accessibility should be addressed. Instead, what I see is just a visual approach. I'd like to point out again that when there are relevant UI changes, accessibility can't be added later as a bandaid solution, but should be integrated in the design process. I'm not seeing this happening here, even after months we're collaborating, and that's honestly a bit disheartening. |
Thank you for the clarification, very helpful. I'm sorry you feel this way and I completely understand where it is coming from. There's a lot to do here, and sometimes experimentation moves fast — in this case I mistakenly assumed that due to the fact that this was a CSS only change, combined with entering "edit mode" as you described in your comment could be done by simply starting to type or clicking with the mouse, the mockups already could be built in a way that satisfied your suggestions. However I will try to deeply re-read and think about your comment, and try to make a new mockup as soon as I can. Is there anything else I can do? |
Trying to expand a bit, see screenshot below to get an idea (the opacity layer is just for clarification): If all the UI becomes "inert" except the edited block and its toolbar, then the position of the toolbar in the source doesn't matter so much. The only available and focusable controls would be the block itself and its toolbar. The tab order would cycle just through the block and its toolbar. However, the technical challenge here is making all the rest of the UI not focusable and completely hidden to assistive technologies. I doubt there is a viable solution here and this is the reason why I think this experimentation can't address the underlying accessibility issues. |
I like that a lot, and I like the idea of an 'edit' mode. I should clarify on the yoast mockup, including it in the top toolbar there was purely visual. We wanted to try a fixed toolbar but I didn't like leaving so much whitespace so I put it there. But I could definitely see it as the contextual sticky toolbar that @melchoyce suggests above, or as temporarily taking full control of the top bar in 'edit mode' like in @jasmussen's google screenshots. I also wonder if we can't find a middle road by attaching it to the block in a better way. The thing is that showing the toolbar next to the block all the time is distracting, but if you summon it manually (during some kind of edit mode), it doesn't have to be awkwardly squished between blocks, it can take the space it needs. Attaching it to the block and lifting the whole thing up makes it feel more like a robust whole to me. (For the purpose of this discussion, let's ignore my experimental placement of the icons.) |
Apologies for jumping in here a little late, hopefully can add in some points that will be useful to this discussion My reading of the main cause of this issue is that the toolbar pops up and is distracting. The proposed solution tabled has been to try fixing the toolbar in some location, mainly to avoid the effects of something popping in and out, and disturbing the writing/reading flow. A fixed toolbar solution has several complications. Firstly, we break accessibility. I won't reiterate the discussion, as it's well articulated above. Secondly, we break things independent of accessibility - I ran user tests on something quite similar to this last year, and we discovered that disconnecting the toolbar from the point of action resulted in 100% user test fails. If we return back to the original cause of the issue, i.e. the toolbar pops up and is distracting. We have user tests that show that the likely cause of this is the timing with which we are popping up the toolbar. Perhaps it is worth exploring tweaking the timing of when the toolbar pops-up as an alternate solution to fixing the toolbar #(2279) |
Thanks for your feedback Anna. I think this is worth some clarification, that might have got lost in the discussion. The reason for this suggestion is that:
This led us to think alternative ways to present a toolbar that won't cover content and won't distract the user, leading to this thread. The inspiration from this thread is solidly grounded in industry and design standards that evolved over decades: if you recall early apps used floating palettes, but over time more and more apps started having dedicated areas that showed the properties of what's selected. This is a common UI paradigm across desktop apps, and it has also demonstrated its scalability over time. See both consumer and professional apps like Word, Keynote, Photoshop, etc. Accessibility wise, would be interesting to see for example other companies dealing with the same issue — how did they solve it? I know for example that Word Online has the updating toolbar at the top like the desktop app, and if thats accessible as Microsoft usually does, maybe we can analyze how they did it :) We should try to prototype this one, evaluate how it performs against the current proposal, and if it works, find a way like the one that was suggested above to preserve its accessibility. |
It got the same feeling of unrest from the points you describe too @folletto. To point 2: I like the idea of it hiding when you're typing, I think that will help a lot, and will remove the desire for something like an edit mode. To point 3: I noticed that too. It makes sense to me that it sticks to the top of the window when you scroll down, but sometimes it would stay there if you scroll up again, leaving it in the middle of the block. Fixing that behaviour would already help a lot. And in general, something about the fact that it hovers slightly over two different blocks at once makes it feel out of place. |
@afercia out of curiosity: how is TinyMCE currently accessible — given it has a static toolbar — and how other apps deal with that (i.e. Word in the online version)? |
@folletto the TinyMCE toolbar is pretty accessible, but it's also immediately before the editing area so it's a bit different case. It implements Alt-F10 to move focus to the toolbar. It also uses A few considerations:
Seems the "Toggle Toolbar" button (last one in the first row) breaks keyboard navigation: it is not possible to go through that button with both Tab or Arrow keys. I'm not sure but I think this depends on the WordPress implementation. You can try it yourself, on the TinyMCE demo: https://www.tinymce.com/ |
Thanks everyone! I'm happy this PR served as a basis to discuss the fixed toolbar alternative. Based on this exploration, a lot of improvements already shipped and let's continue the discussion about the fixed toolbar in #2998 |
…stTests Fixes Latests Posts Tests by expanding the scroll to button functionality
People are complaining about the block toolbar showing up constantly and disturbing their writing flow, this PR explores the possibility to use a fixed a block toolbar at the top. And its content change depending on the selected block.
Not done yet: