Skip to content

Commit 9410aa0

Browse files
docs(splitview): update args for horizontally-focused variant
- fixes orientation of top & bottom test cases to be vertical - adds isActive to template for testing and adds isActive to test cases to accurately update baselines for VRTs
1 parent bc7c724 commit 9410aa0

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

components/splitview/stories/splitview.test.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,31 +32,34 @@ export const SplitViewGroup = Variants({
3232
},
3333
{
3434
testHeading: "Top collapsed",
35-
orientation: "horizontal",
35+
orientation: "vertical",
3636
collapsePosition: "top",
3737
panelLabels: ["Top", "Bottom"],
3838
panelStyles: ["height: 0;", "flex: 1;"],
3939
},
4040
{
4141
testHeading: "Bottom collapsed",
42-
orientation: "horizontal",
42+
orientation: "vertical",
4343
collapsePosition: "bottom",
4444
panelLabels: ["Top", "Bottom"],
4545
panelStyles: ["flex: 1;", "height: 0;"],
4646
},
4747
],
4848
stateData: [
4949
{
50-
testHeading: "Focused",
51-
isFocused: true,
50+
testHeading: "Resizable/collapsible",
51+
isResizable: true,
52+
isCollapsible: true,
5253
},
5354
{
54-
testHeading: "Collapsible",
55-
isCollapsible: true,
55+
testHeading: "Resizable, focused",
56+
isFocused: true,
57+
isResizable: true,
5658
},
5759
{
58-
testHeading: "Resizable",
60+
testHeading: "Resizable, active",
5961
isResizable: true,
62+
isActive: true,
6063
},
6164
]
6265
});

components/splitview/stories/template.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const Template = ({
1010
orientation = "horizontal",
1111
isResizable = false,
1212
isFocused = false,
13+
isActive = false,
1314
isCollapsible = false,
1415
collapsePosition,
1516
panelLabels = [],
@@ -46,7 +47,8 @@ export const Template = ({
4647
class=${classMap({
4748
[`${rootClass}-splitter`]: true,
4849
["is-draggable"]: isResizable,
49-
"is-focused": isFocused,
50+
["is-active"]: isActive,
51+
["is-focus-visible"]: isFocused,
5052
[`is-collapsed-${collapsibleClassName}`]: isCollapsible,
5153
})}
5254
tabindex="0"

0 commit comments

Comments
 (0)