Open ramonjd opened 1 day ago
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 props-bot
label.
If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: afercia <afercia@git.wordpress.org>
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.
Size Change: -38 B (0%)
Total Size: 1.82 MB
Filename | Size | Change |
---|---|---|
build/edit-site/index.min.js |
219 kB | -38 B (-0.02%) |
Flaky tests detected in 7855cda31869e98efae6702d36e1788ab24316f6. Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.
🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11943584777 📝 Reported issues:
/test/e2e/specs/site-editor/dataviews-list-layout-keyboard.spec.js
Thanks for the feedback @afercia
Actually, I see this footer is uniquely used for global styles only now, whereas it was built to also handle template records.
It could probably be completely refactored, but so long as it unblocks your work in https://github.com/WordPress/gutenberg/pull/66606 we can roll with it and clean up later.
This allows us to remove the globalstyle record selector.
What?
For the styles panel
<SidebarNavigationScreenGlobalStyles />
component, send the correct recordCount via optional prop to the footer component<SidebarNavigationScreenDetailsFooter />
.Props to @afercia for catching it over in https://github.com/WordPress/gutenberg/pull/66606#issuecomment-2488542836
Why?
<SidebarNavigationScreenGlobalStyles />
was passing a revision record to<SidebarNavigationScreenDetailsFooter />
. Revision records do not contain a_links
object, and therefore the record history count is not accessible.How?
Pass the correct revisionsCount to the component.
Testing Instructions
The record count for global revisions is not actually used in the side panel, so the way to test is it to log out the revisionsCount in
<SidebarNavigationScreenDetailsFooter />
.Create a few global styles revisions by editing a theme's global styles and saving.
The open up the left-hand style panel in the site editor.
Check the
revisionsCount
in the console.Then click on the "Last modified link" to open revisions in the editor. The number in the revisions pane should match.