[MOOSE-420] FE: Support Core Tabs Block - #382
Conversation
| * we don't lose any of the actual padding we want. | ||
| * ------------------------------------------------------------------------- */ | ||
|
|
||
| .wp-block-tab-list button { |
There was a problem hiding this comment.
❗ Due to block markup constraints, if we want to support horizontal scrolling of the tabs, we can't have margins between the tabs due to the issue of the tab list bottom border (before pseudo element) no spanning the full width of the scrollable container.
Using a bottom border on the tab list is not an option, as then the border appears below the scrollbar and ruins the active illusion with the tab button.
dpellenwood
left a comment
There was a problem hiding this comment.
I love to see us use Core items as they become available. A couple Qs though:
- Do you feel the Core block is ease enough for us to style/customize vs our custom version?
- Do you think there's a way to migrate existing project's tab content from our Tribe Tabs block to the Core version? I.e. - a block migration implementation of some sort?
Thanks for tackling this, Geoff!
Co-authored-by: David Paul Ellenwood <davee@tri.be>
I think if we were to remove the requirement for the "always-on" bottom border on the tab list it would be a lot easier to style and I wouldn't have to jump through loopholes, but other than that one catch the block is easy enough to style. Additionally, the horizontal scrolling is something WP just doesn't handle at all, tabs stack when the tab list is too long. The markup isn't ideal for horizontal scrolling. Not sure what we can do about this though. Horizontal scrolling seems like the only way to handle this.
I think anything is possible, but a manual migration is always easiest with block editor content. I'm not quite sure how a migration between blocks would work unless we're just completely rewriting the post content. Maybe something for BE to look into. |
I think it's worth discussing a bit w/ Design if this is acceptable/do-able for them. :)
It might be worth it to see if a Block Transform could be used for this. |
I think a Block Transform would assume that the Horizontal Tabs block would stay in the codebase until all instances are converted (which would be case anyway with a manual migration). It would certainly help the time it takes to implement the manual changes but it would still be a manual process. |
What does this do/fix?
This pull request migrates the custom "Horizontal Tabs" block implementation (
tribe/horizontal-tabsandtribe/horizontal-tab) to use the new corecore/tabsblock, and introduces a new set of styles and block registration for the core tabs. It also updates related dependencies and introduces new CSS mixins for improved accessibility and styling.Migration to Core Tabs Block:
tribe/horizontal-tabsandtribe/horizontal-tabblocks, including their registration, block JSON, editor scripts, styles, and variables. [1] [2] [3] [4] [5] [6] [7] [8]core/tabsblock instead of the removed custom tabs. [1] [2] [3]Tabs.php) for the newcore/tabsblock.New Tabs Block Styles and Scripts:
core/tabsblock, including theme support for light, dark, and brand themes. [1] [2]Accessibility and Styling Improvements:
inset-focus-visibleCSS mixin for improved focus styles, enhancing accessibility.Dependency Update:
composer.jsonfrom 7.0.4 to 7.1.QA
Testing Environment
Links to relevant issues
Screenshots/video:
Pull request checklist