-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: expose revisions in the UI for all available post types #49601
Comments
For global styles revisions, and possibly templates and other site editor post types, I had envisioned something along the lines of the style book, whereby toggling between revisions would take effect in context independent of the editor canvas: We might be able to genericize the style book slot, and also accommodate a side-by-side view. I jumped down that particular rabbit hole and found that it involves quite a lot of refactoring and component building, so perhaps too ambitious for an initial revisions offering. For global styles in particular, it would also be beneficial to isolate the current global styles in the editor canvas, rather than load each revisions's global styles in the editor which is what the MVP #46667 does. That way previewing revisions styles would have no effect on the global styles the user has, potentially changed or loaded, in the editor. |
That's a good instinct. I wonder if indeed we could show a sort of dots timeline above the scaled down frame, and the items in the sidebar scroll multiple viewports across that timeline. That's a bit of a dreamy scenario which might run into performance issues, and I would imagine we can also keep in place a single frame like you have here, and load different content inside. This is definitely something to explore in the designs. |
It might be challenging performance-wise, but I like that idea!!
I've been playing with this scenario in a PR. I think I've nearly cracked it. 2023-04-19.16.00.06.mp4 |
This is pretty fast work, nice! CC: @WordPress/gutenberg-design can we land a version of this soon or does the design need time in the oven? |
I do see that important options are inside the 3 dot menu so adding Revisions into it would be a natural progression of this drop down. At a later time we can look at the contents of the 3 dot drop down menu to see if some of the options there should be made more visible. As the 3 dot menu options are fairly hidden away and not openly seen. What is great with this revision system is that it matches the Story Book method which seems like a method that should be used in the general revision system. Post and Site Editor etc. Clicking a revision one sees the change in the canvas area. What happens if one has made a change to something below or above what one sees in the viewport? Will the screen jump to show adjustments made if one for instance made changes to the bottom of the screen? As smaller changes might not be that easy to see. I like the wording "Restore and save selected revision" as that says directly what one can do. From what I see in the video I would say this is ready to go. A later step could be to click some kind of details or down arrow in a revisions button to also see a list of changes that are done. Meaning see the visual change in the canvas and also see a list of changes for a specific revision. |
Hm, looking at this with fresh eyes I found the video a little confusing. When you first open the revisions panel there are unsaved changes and there's a warning at the top of the panel saying that if a revisions is restored then those unsaved changes will be lost. Then you change the background, and open the revisions panel again, but this time there's a different UI with the "Save" / "Don't save" buttons. What's the condition that triggers this different UI? I think the design could use some general polish:
Happy to help with the visual details! |
I appreciate the quick feedback @jameskoster @jasmussen and @paaljoachim Very helpful once again 🍺 The demo was hacked together pretty quickly and, yes, needs a major polish, tests (spellcheck!) and probably split up into a couple of PRs to get the groundwork in. It was just to demonstrate the flow. I believe, at least so far, the benefit of this approach is that we can load both styles and block HTML into the preview pane, so it'd be possible to preview template revisions, and mix them with global styles revisions if we wanted to get jiggy with it.
Yeah, the flow is not intuitive. Most of the work was getting the stylebook-like container to work. Basically I'm checking whether the post is "dirty", that is, if it has unsaved changes in order to give the user a chance to save them before they restore a revision (which will overwrite those unsaved changes). I think I need to trigger the prompt before we go to save a revision. 🤷 Anyway, I'm hoping your suggestion of the modal to warn about losing unsaved changes will help make the save path clearer to the user. Still a lot of work to do.
Exactly. I'm grabbing the avatar from the author of each global styles revision.
After I've cleaned up the impossibly messy code and made it presentable, it'd be great to get a design sweep to help tighten up this.
My bl0d is typo. 🤦
Good call on both. I'll build it in.
I reckon it'll be easier to test... ultimately... if I split it up into PRs for:
I'll try to power through the first 3 today so we can do the important design review. |
+1 . Ideally can preview revisions before restoring or needing to decide whether to save/discard current changes. "Restore and save selected revision" copy is also a little confusing to me. I'm assuming we can't split those two actions? 1. Restore revision to see how it feels 2. Save/publish |
I agree. It's over complicating the action. I'm experimenting with confining the save state to the editor, and using the revisions view to only preview revisions and load them into the editor. This has an added benefit of allowing users to load the revision and carry on editing, without forcing them into a save flow. I'm running on the argument that a user can decide which state to save and when not to. |
There's excellent work here, and I'd say the bones are mostly in place. It's probably worth a once-over in terms of design though, just to get all the details right. I'll try and find time asap. One question – did you consider using the zoomed out view (the same that is invoked when choosing a style variation) rather than the style book 'frame'? That could potentially work better as:
|
Zoomed out view. |
@ramonjd That flow works way better imo. Nice one! :) |
I didn't, but it's something we could try!! I've started pulling apart the experimental PR into smaller PRs to get the foundational work merged. The final PR, which is not ready yet, will be one with all the UX/UI features, so I'll ping folks when it's ready so we can tweak and retest things. Once again, thanks for all the help and advice 🙇 |
Really cool to see the collaboration on this one. Kudos, all! |
Here's a design that updates the flows a little, and explores the general appearance of the revisions timeline: revisions.mp4
There's quite a lot to wrap your head around with this, so I'm almost certainly missing a few things. What do y'all think? |
Nice iterations, Jay, I like the timeline. The following is not meant to block any ongoing work here, but I want to connect some dots to a future interface, revisions as surfaced in the save hub in the editor view: ☝️ The above is an obsolete mockup. But it shows a "Revisions" button in the save hub. Is there an easy way to connect these two disparate elements? |
If we're going to have per post type revisions, then we need to think a bit about how a global revisions system would interact. In terms of Styles revisions, I'd expect the behavior in the dark material to be the same. IE click a button to expose a panel containing the revisions list. |
Thanks for the discussions! In the meantime, I've merged the API/other foundational work for the global styles revisions. The UI/UX PR we can test and discuss is here: #50089 I've tried to build things so that we can leave open the possibility of loading template revisions as well. |
@ramonjd nice work! What designs do you need to wrap initial work here? |
I think this is done, we can follow up on specific improvements (like surfacing style revisions access in the browse mode of "styles" view). |
Related to:
Let's investigate how we can expose revisions in the UI for site components such as:
Current issues/bugs
The text was updated successfully, but these errors were encountered: