Add feature for adjusting meta box split view with wheel gestures#75220
Add feature for adjusting meta box split view with wheel gestures#75220
Conversation
|
Size Change: +820 B (+0.01%) Total Size: 8.76 MB
ℹ️ View Unchanged
|
5679c7f to
567971b
Compare
|
It would be nice if the diff is minimized by avoiding file moves to make it easier to review and see what's changed. Or is that not possible? |
|
It’s totally possible to avoid file moves. They are done atomically so leaving the first couple commits out of the diff shows what actually changed. To me, it seems past time the |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for working on this!
Adds a preference for the feature in case it has potential for being annoying to some
I expect this will be a behavior that most users will appreciate, and that no one will want to intentionally opt out of it. What do you think? How about enabling this feature by default and providing a way for users to opt out if we have negative feedback?
I tend to agree it’d be fine to enable by default. While I generally agree with avoiding extraneous options, I do think this feature can be annoying, so I like the idea of preference. I wouldn’t say it needs to be via the dedicated button in the splitter bar though. The main way I find this annoying is in scrolling upward. If starting at the end of the canvas it shrinks the pane. It seems easy enough to wheel to the end without unintentionally adjusting the split, but when you start to go back up it’s going to shrink it. I suppose there may be some way to make the logic smarter around that – like if you got to the end without causing it to adjust then don’t adjust it as you head back up. |
|
|
Hm, can we try to enable it without an option first and see what people say? It's always easy to add an option later but not to take it away. Ideally it's very smooth and doesn't immediately active on pull of a few pixels, but sort of animates upwards to show people what would happen when you scroll out of bounds more. Sort of like a reverse pull to refresh. :) |
Move meta boxes pane component to its own folder Move meta box initialization hook to hooks folder Add automated adjustment of split view at scroll boundaries Add button to toggle auto-resizing Add preference for auto-resizing; set defaults Make auto-resizing work when pointer is over block popover Revise auto-resize preference toggle button; try magnet icon Keep auto-resize engaged until pointer moves or bounds reached Lessen jank when wheeling upward over the canvas Avoids scrolling the canvas upward while resizing. Requires switch- ing to a non-passive listener. Rename and comment in interest of better poetry Style to improve alignments in between meta box header and content Restore meta box initialization hook to original location Move meta boxes main component inline with layout
567971b to
6850f82
Compare
|
Pardon the delay but now I've updated to remove any new/moved files and removed the preference and button to toggle the feature.
The idea to add the preference doesn't come from a concern about the activation when scrolling out of bounds or to the end because it doesn't trigger too easily. Instead it's about scrolling up from the end when split has been set as somewhere in the middle and is desired to stay there. Regardless, the preference is now removed so we can see. |
|
Flaky tests detected in 6850f82. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23263564139
|
|
Thanks for working on this! I noticed something when I tested it again. If I scroll while keeping the mouse position completely fixed, it may get stuck midway through. Please watch the video below. b2de93678551f9ff3b0213e9abc4483d.mp4 |
|
RC1 is today so this is probably too late to land in 7.0 now? I welcome other opinions 🙂 |
|
I feel that a few more tests are needed. Perhaps we can ship this PR alongside the fully iframed post editor in 7.1? |
Thank you for testing and raising this. I'm aware of it. As best I understand, browsers have some sort wheeling session logic where |
What?
Makes it possible access the meta boxes with input from mouse wheel or touch pad gestures.
Why?
From feedback mainly found in #69923, the primary complaint with the Post editor’s split view UI is being unable to access the meta boxes with the mouse wheel.
How?
wheelevent listeners on the canvas document and the meta box panewheelevents should adjust the split instead of scrollTesting Instructions
It’s great if you can test with touch pads and mouse wheels or any device that causes
wheelevents.Screenshots or screencast
This is currently outdated because the button and preference to toggle the feature have been removed.
https://github.com/user-attachments/assets/6638985d-3a0e-4737-b231-578445cb6d10