-
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
DataViews Quick Edit: Rely on the global save flow instead of a custom save button #64389
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@@ -16,6 +16,7 @@ | |||
- `setSelection` prop has been removed. Please use `onChangeSelection` instead. | |||
- `header` field property has been renamed to `label`. | |||
- `DataForm`'s `visibleFields` prop has been renamed to `fields`. | |||
- `DataForm`'s `onChange` prop has been update to receive as argument only the fields that have changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is important for the save flow to show the exact fields that were changed...
ca7f6b3
to
8570bc4
Compare
Size Change: -115 B (-0.01%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
It makes sense in terms of flow/how site editor works, though there's something wrong with the PostCard: it doesn't update beyond the initial render. Gravacao.do.ecra.2024-08-09.as.11.19.09.mov |
@oandregal Are you saying that the "DataViews" doesn't render the "edited" value? It's possible but seems like a separate issue as the edited value can be something that is edited elsewhere without saving (like the full editor) |
Actually, the issue also happens in trunk (notice how the postcard doesn't update and it's stays as "Clearing float", the title of the 1st item selected). It's related to #64365 it's a separate thing: Gravacao.do.ecra.2024-08-09.as.11.34.23.mov |
I ran into something that also happens in trunk: Gravacao.do.ecra.2024-08-09.as.13.16.32.movNote how the "save" button triggers a direct "save" sometimes and other times it triggers the "review modal" — even if the changes to save are always the same (the title I edited in the editor). This PR just makes this flow more evident: Gravacao.do.ecra.2024-08-09.as.13.12.45.movThis was not introduced here, so it's not a blocker for the PR but rather an observation. I find this behavior buggy. Not sure what were the conditions or rationale but I think it should be revisited. Additionally, I wonder how this button should behave. When you are in a editor, it makes sense to show "save" or "review" depending on the number of entities edited or something similar. There's a closeness to your edits: you do them and save — even if you edit the post and global styles (two entities) at the same time, you are in a single screen and there's only a number of things you could have edited. However, if we aspire to make the site editor transitions seamless, the distance (time, screen) between users editing anything in any place (editor, quick edit, etc.) and when they save may be larger. This means they may not remember exactly what they did. This happened to me in a short testing session (minutes): I was certainly confused about what "Save" would do and was reluctant to click it. For this reason, I perhaps lean towards always showing "review" in this particular button. cc @jameskoster as food for thought. |
8570bc4
to
b12e897
Compare
Flaky tests detected in b12e897. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10318785683
|
…m save button (#64389) Co-authored-by: youknowriad <[email protected]> Co-authored-by: oandregal <[email protected]>
Related #55101
What?
This PR updates the quick edit panel to avoid using a dedicated save flow and save button. Instead all modifications are now done using the global save flow and edit state.
Testing Instructions
1- Enable the quick edit experiment.
2- Open the pages "table" data view.
3- Open the quick edit panel
4- Try using the panel to make modifications.