feat(#3407): add prop to tabs to not stack on mobile, and skip focus on initial load#3408
Conversation
779be6d to
5b1bc51
Compare
| customElement={{ | ||
| tag: "goa-tabs", | ||
| props: { | ||
| stackOnMobile: { attribute: "stack-on-mobile", type: "String" }, |
There was a problem hiding this comment.
This should be a boolean type
| /** Visual style variant. "segmented" shows pill-style tabs with animation. */ | ||
| export let variant: "default" | "segmented" = "default"; | ||
| /** When true, tabs stack vertically on mobile. Set to "false" to keep horizontal layout on all screen sizes. */ | ||
| export let stackOnMobile: string = "true"; |
There was a problem hiding this comment.
I am not sure a prop name like this is the best idea. It comes off like a hack to make something work.
Instead I would suggest something like orientation that accepts values of auto | horizontal | vertical. auto would be the default value that changes the orientation to vertical for mobile devices (current state). Setting it to horizontal would provide the functionality that this PR intended, and vertical would allow teams to use vertical tabs if the so desire (in the case that there are too many that don't fit horizontally on a normal desktop)
There was a problem hiding this comment.
Good idea - I've already refactored stackOnMobile to orientation: auto | horizontal in this PR.
a04a4a3 to
4f8e3a3
Compare
✅ Deploy Preview for goa-design-2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
885e102 to
a23fa2d
Compare
| /** Visual style variant. "segmented" shows pill-style tabs with animation. */ | ||
| export let variant: "default" | "segmented" = "default"; | ||
| /** Tab layout orientation. "auto" stacks vertically on mobile, "horizontal" keeps horizontal on all screen sizes. */ | ||
| export let orientation: string = "auto"; |
There was a problem hiding this comment.
For clarity instead of string, use "auto" | "horizontal"
c1f6fb4 to
82951df
Compare
|
@vanessatran-ddi looks like you need to rebase. Let me know via slack when you push it. |
Co-Authored-By: Vanessa Tran <vanessa.m.tran@gov.ab.ca>
82951df to
319008f
Compare
|
🎉 This PR is included in version 1.41.0-dev.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.11.0-dev.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 6.11.0-dev.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 4.11.0-dev.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 7.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 5.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 7.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
stackOnMobileprop to keep default tabs horizontal on mobileinitialTabis settabindex=-1)Test plan
npm run serve:prs:react→ navigate to "V2 Tabs" in featuresstackOnMobile={false}stay horizontal on mobileCloses
Closes #3407
Closes #2996
Closes #3268