-
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
Components: replace TabPanel
with Tabs
in the Font Library Modal
#57181
Conversation
Size Change: -10 B (0%) Total Size: 1.69 MB
ℹ️ View Unchanged
|
086a3d4
to
e0a6006
Compare
e0a6006
to
4da77d1
Compare
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.
I rebased this PR to include the latest changes (including updates to node/npm version).
Just for fun, modify the order of the
DEFAULT_TABS
array
I had lots of fun, thank you for recommending this activity!
packages/edit-site/src/components/global-styles/font-library-modal/index.js
Show resolved
Hide resolved
packages/edit-site/src/components/global-styles/font-library-modal/index.js
Outdated
Show resolved
Hide resolved
TabPanel
with Tabs
in the Font Library Modal
TabPanel
with Tabs
in the Font Library Modal
4da77d1
to
8c2a183
Compare
b3d65a1
to
1def6f1
Compare
Flaky tests detected in 1def6f1. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7389121467
|
rebased, CI checks are passing! |
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.
🚀
Good to merge after all feedback gets addressed
packages/edit-site/src/components/global-styles/font-library-modal/tab-layout.js
Outdated
Show resolved
Hide resolved
Thanks @ciampo, waiting on CI checks now! |
What?
Replaces the legacy TabPanel component with the new Tabs component.
Why?
Part of the work outlined in #52997
How?
TabPanel
is replaced byTabs
and its sub-components. I've also tried to clean up the use ofname
vsid
for tab identification.TabPanel
used aname
property, butTabs
deals exclusively withid
s. Eliminatingname
from the code will hopefully make it easier to parse. This specifcially doesn't impact thename
property on font collections being passed in to the library, as that nomenclature still felt like it made sense.Testing Instructions
trunk
, confirm that each tab visually looks the same, that it behaves the same, and the it's displaying the correct contentDEFAULT_TABS
array inpackages/edit-site/src/components/global-styles/font-library-modal/index.js
so thatinstalled-fonts
is no longer listed first. Reload the site editor and confirm that Library is still the initially selected tab even if it the first one in the listTesting Instructions for Keyboard
tabpanel
contents.