-
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
Use standard select element for small number of authors. #26426
Conversation
Size Change: +155 B (0%) Total Size: 1.28 MB
ℹ️ View Unchanged
|
@youknowriad this would be nice to get into 5.6 as well, ready for review. |
@youknowriad refreshed against trunk - this is ready for review. |
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.
It's simpler than I thought :) Thanks.
@youknowriad Took another pass at this with the higher level approach you suggested:
In addition, I reduced the size of the Could we add On a related note, do our performance metrics measure data over the wire at load? At a minimum it would be worth simulating a system with many users (plus pages and posts) or low low bandwidth for performance checks - then we might see a performance gain (or alternately catch regressions) from this type of change because the page would load faster with less data to load. Adding a 'total data loaded' metric would also be interesting, since data can be a metered resource for some users. I would be happy to work on adding this if you agree it would be valuable. |
packages/editor/src/components/post-author/post-author-combobox.js
Outdated
Show resolved
Hide resolved
packages/editor/src/components/post-author/post-author-select.js
Outdated
Show resolved
Hide resolved
d6562b2
to
420e0a5
Compare
packages/editor/src/components/post-author/post-author-select.js
Outdated
Show resolved
Hide resolved
The current load metric measures the time to load a long post in the editor. Feel free to add new metrics if you think there's any valuable data we can monitor. |
It might be worth measuring a the time to load said post for systems with a large number of users, pages (for page parent selector) and taxonomy terms (eg tags). Although... since [some of] these load items occur asynchronously and the editor may be usable before they complete, their real world user impact may be limited. I'm curious if the current measurements are for when the editor is ready to accept input or when everything has completely loaded (or both)? Can you point me to the current load metric tooling and any docs? |
@youknowriad thank you for the feedback, I will work on addressing these points. |
The current metric is for when the block editor is ready to be used (the first block is visible) https://github.com/WordPress/gutenberg/blob/master/packages/e2e-tests/specs/performance/post-editor.test.js#L133-L138 |
cc8a0e8
to
5ebf486
Compare
@youknowriad refactored |
Pushed some small tweaks but this is looking good to me. Thanks Adam. |
Thanks for the final changes @youknowriad - that looks good! |
Description
Use a standard select element when the number of authors falls below a threshold (default is set to 20).
Fixes #26077
How has this been tested?
<
20 authors: native<select>
dropdown selector, select, save post.Helpful commands for a local test environment:
Generate 10 authors:
wp user generate --role=editor --count=10
Generate 1000 authors:
wp user generate --role=editor --count=1000
Remove all site editors:
wp user delete $(wp user list --role=editor --field=ID) --reassign=2
Screenshots
Site with 11 editors:
Site with 100s of editors:
Types of changes
Checklist: