From b1395e90ef9fab23c6a166f14fa9a2afa9ae5436 Mon Sep 17 00:00:00 2001 From: Josh Black Date: Thu, 25 May 2023 16:32:37 -0500 Subject: [PATCH 1/2] ci: update ci workflow to run against next-major branch (#3329) --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d0a036dcbe..32ba634a42e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,10 +3,12 @@ on: push: branches: - main + - next-major pull_request: merge_group: branches: - main + - next-major types: - checks_requested From 1fd6d326fc9936428e9485e4f41f2328d8b22684 Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Thu, 25 May 2023 14:48:51 -0700 Subject: [PATCH 2/2] NavList: Fix group dividers (#3328) * Fix NavLIst.Group dividers * Use first-of-type instead of first-child * Update snapshots and stories --- src/NavList/NavList.stories.tsx | 7 ++++- src/NavList/NavList.tsx | 14 +++++----- .../__snapshots__/NavList.test.tsx.snap | 26 +++++++++---------- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/src/NavList/NavList.stories.tsx b/src/NavList/NavList.stories.tsx index 4e1b472570c..f643302c1f8 100644 --- a/src/NavList/NavList.stories.tsx +++ b/src/NavList/NavList.stories.tsx @@ -28,13 +28,18 @@ export const Simple: Story = () => ( export const WithGroup: Story = () => ( - + Item 1 Item 2 Item 3 + + Item 4 + Item 5 + Item 6 + ) diff --git a/src/NavList/NavList.tsx b/src/NavList/NavList.tsx index 077b46d96ad..80550abc989 100644 --- a/src/NavList/NavList.tsx +++ b/src/NavList/NavList.tsx @@ -246,14 +246,16 @@ const defaultSx = {} // TODO: ref prop const Group: React.FC = ({title, children, sx: sxProp = defaultSx, ...props}) => { return ( - + <> {/* Hide divider if the group is the first item in the list */} - - {title && } - - {children} + + + {title && } + + {children} + - + ) } diff --git a/src/NavList/__snapshots__/NavList.test.tsx.snap b/src/NavList/__snapshots__/NavList.test.tsx.snap index 0bf63a4a99d..443240545e4 100644 --- a/src/NavList/__snapshots__/NavList.test.tsx.snap +++ b/src/NavList/__snapshots__/NavList.test.tsx.snap @@ -407,7 +407,7 @@ exports[`NavList renders with groups 1`] = ` list-style: none; } -.c2:first-child { +.c2:first-of-type { display: none; } @@ -701,15 +701,15 @@ exports[`NavList renders with groups 1`] = `
    +
  • -
+
  • -