Skip to content

Commit

Permalink
fix: vertical tabs from jumping (#20641)
Browse files Browse the repository at this point in the history
* fix: tabpanel shifting in vertical layout

* Change files
  • Loading branch information
eljefe223 authored Dec 1, 2021
1 parent 766416a commit a69b283
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: tabpanel shifting in vertical layout",
"packageName": "@fluentui/web-components",
"email": "[email protected]",
"dependentChangeType": "patch"
}
58 changes: 56 additions & 2 deletions packages/web-components/src/tabs/tabs.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,63 @@ const TabsTemplate = ({ activeId, activeIndicator, orientation }) => `
<fluent-tab id="TabOne">Tab one</fluent-tab>
<fluent-tab id="TabTwo">Tab two</fluent-tab>
<fluent-tab id="TabThree">Tab three</fluent-tab>
<fluent-tab-panel> Tab one content. This is for testing. </fluent-tab-panel>
<fluent-tab-panel>
Tab one content. This is for testing. Tab three content. This is for testing.
<br />
Tab one content. This is for testing.
<br />
Tab one content. This is for testing.
<br />
Tab one content. This is for testing.
<br />
Tab one content. This is for testing.
<br />
Tab one content. This is for testing.
<br />
Tab one content. This is for testing.
<br />
Tab one content. This is for testing.
<br />
Tab one content. This is for testing.
<br />
Tab one content. This is for testing.
<br />
Tab one content. This is for testing.
<br />
Tab one content. This is for testing.
<br />
Tab one content. This is for testing.
<br />
</fluent-tab-panel>
<fluent-tab-panel> Tab two content. This is for testing. </fluent-tab-panel>
<fluent-tab-panel> Tab three content. This is for testing. </fluent-tab-panel>
<fluent-tab-panel>
Tab three content. This is for testing. Tab three content. This is for testing.
<br />
Tab three content. This is for testing.
<br />
Tab three content. This is for testing.
<br />
Tab three content. This is for testing.
<br />
Tab three content. This is for testing.
<br />
Tab three content. This is for testing.
<br />
Tab three content. This is for testing.
<br />
Tab three content. This is for testing.
<br />
Tab three content. This is for testing.
<br />
Tab three content. This is for testing.
<br />
Tab three content. This is for testing.
<br />
Tab three content. This is for testing.
<br />
Tab three content. This is for testing.
<br />
</fluent-tab-panel>
</fluent-tabs>`;

export const Tabs = TabsTemplate.bind({});
Expand Down
1 change: 1 addition & 0 deletions packages/web-components/src/tabs/tabs.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export const tabsStyles: (
position: relative;
width: max-content;
justify-self: end;
align-self: flex-start;
width: 100%;
}
Expand Down

0 comments on commit a69b283

Please sign in to comment.