Skip to content

Commit

Permalink
Merge branch 'development' into DSD-1121/svgr-spike
Browse files Browse the repository at this point in the history
  • Loading branch information
7emansell authored Dec 6, 2024
2 parents 2c3be36 + 797a35f commit 8bc75e9
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 61 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,25 @@ Currently, this repo is in Prerelease. When it is released, this project will ad

## Prerelease

### Fixes
### Adds

- Fixes issue where focus indicator was being cut off in places in the `Template` component.
- Adds `jest-transformer-svg` to mock SVGs more accurately in our tests

## 3.5.0 (December 5, 2024)

### Adds

- Adds the `"SubNav"`component.
- Adds `jest-transformer-svg` to mock SVGs more accurately in our tests
- Adds the `useScrollFadeStyles` hook.

### Updates

- Updates the `MultiSelect` component to add `itemCount` as a data property to the `items` prop to render the item count for an option.

### Fixes

- Fixes issue where focus indicator was being cut off in places in the `Template` component.

## 3.4.4 (November 20, 2024)

### Adds
Expand Down
18 changes: 9 additions & 9 deletions src/components/MultiSelect/MultiSelect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { changelogData } from "./multiSelectChangelogData";
| Component Version | DS Version |
| ----------------- | ---------- |
| Added | `1.4.0` |
| Latest | `3.4.0` |
| Latest | `3.5.0` |

## Table of Contents

Expand Down Expand Up @@ -139,7 +139,7 @@ count. The format is as follows:
{
id: "architecture",
name: "Architecture",
isDisabled: true,,
isDisabled: true,
itemCount: 7
},
{
Expand All @@ -157,7 +157,7 @@ count. The format is as follows:
name: 'User Experience'
},
{
id: 'tecture',
id: 'architecture',
isDisabled: false,
name: 'Architecture'
},
Expand Down Expand Up @@ -329,7 +329,7 @@ child checkbox will not be clickable and its state will not change.
name: 'User Experience'
},
{
id: 'tecture',
id: 'architecture_design',
isDisabled: false,
name: 'Architecture'
},
Expand Down Expand Up @@ -382,7 +382,7 @@ child checkbox will not be clickable and its state will not change.
name: 'User Experience'
},
{
id: 'tecture',
id: 'architecture_design',
isDisabled: true,
name: 'Architecture'
},
Expand Down Expand Up @@ -446,9 +446,9 @@ the component to allow users to search the available checkbox items.

## Show Item Count

The recommended UX patterns for filtering is to include an item count associated
with each option in a `MultiSelect` component. The item counts can be rendered by
passing the `itemCount` data property to the `items` prop.
The recommended UX pattern for filtering is to include an item count associated
with each option in a `MultiSelect` component. The item counts can be rendered
by passing the `itemCount` data property to the `items` prop.

<Source
code={`
Expand Down Expand Up @@ -482,7 +482,7 @@ passing the `itemCount` data property to the `items` prop.
itemCount: 5,
},
{
id: "tecture",
id: "architecture_design",
name: "Architecture",
itemCount: 3,
},
Expand Down
8 changes: 4 additions & 4 deletions src/components/MultiSelect/MultiSelect.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const withChildrenItems = [
name: "User Experience",
},
{
id: "tecture",
id: "architecture_design",
name: "Architecture",
},
{
Expand Down Expand Up @@ -139,7 +139,7 @@ const withDisabledItems = [
isDisabled: true,
},
{
id: "tecture",
id: "architecture_design",
name: "Architecture",
isDisabled: false,
},
Expand Down Expand Up @@ -185,7 +185,7 @@ const withDisabledAllChildrenItems = [
isDisabled: true,
},
{
id: "tecture",
id: "architecture_design",
name: "Architecture",
isDisabled: true,
},
Expand Down Expand Up @@ -228,7 +228,7 @@ const withItemCountItems = [
itemCount: 5,
},
{
id: "tecture",
id: "architecture_design",
name: "Architecture",
itemCount: 3,
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/MultiSelect/multiSelectChangelogData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { ChangelogData } from "../../utils/ComponentChangelogTable";

export const changelogData: ChangelogData[] = [
{
date: "Prerelease",
version: "Prerelease",
date: "2024-12-05",
version: "3.5.0",
type: "Update",
affects: ["Documentation", "Functionality"],
notes: [
Expand Down
8 changes: 4 additions & 4 deletions src/components/SubNav/SubNav.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import { changelogData } from "./subNavChangelogData";

# SubNav

| Component Version | DS Version |
| ----------------- | ------------ |
| Added | `Prerelease` |
| Latest | `Prerelease` |
| Component Version | DS Version |
| ----------------- | ---------- |
| Added | `3.5.0` |
| Latest | `3.5.0` |

## Table of Contents

Expand Down
4 changes: 2 additions & 2 deletions src/components/SubNav/subNavChangelogData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { ChangelogData } from "../../utils/ComponentChangelogTable";

export const changelogData: ChangelogData[] = [
{
date: "Prerelease",
version: "Prerelease",
date: "2024-12-05",
version: "3.5.0",
type: "New Feature",
affects: ["Documentation", "Functionality"],
notes: ["Added the `SubNav` component"],
Expand Down
8 changes: 4 additions & 4 deletions src/components/Template/Template.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import Link from "../Link/Link";

# Template

| Component Version | DS Version |
| ----------------- | ------------ |
| Added | `0.3.6` |
| Latest | `Prerelease` |
| Component Version | DS Version |
| ----------------- | ---------- |
| Added | `0.3.6` |
| Latest | `3.5.0` |

## Table of Contents

Expand Down
4 changes: 2 additions & 2 deletions src/components/Template/templateChangelogData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { ChangelogData } from "../../utils/ComponentChangelogTable";

export const changelogData: ChangelogData[] = [
{
date: "Prerelease",
version: "Prerelease",
date: "2024-12-05",
version: "3.5.0",
type: "Bug Fix",
affects: ["Styles"],
notes: [
Expand Down
50 changes: 19 additions & 31 deletions src/hooks/useScrollFadeStyles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ import { Meta, Source } from "@storybook/blocks";

| Hook Version | DS Version |
| ------------ | ---------- |
| Added | `Prerelease` |
| Latest | `Prerelease` |
| Added | `3.5.0` |
| Latest | `3.5.0` |


The `useScrollFadeStyles` hook provides a way to manage the visibility of a fade effect on the right edge of a horizontally scrollable element.
It monitors the scroll position and determines whether the fade effect should be shown or hidden based on the scroll state.
The `useScrollFadeStyles` hook provides a way to manage the visibility of a fade effect on the right edge of a horizontally scrollable element.
It monitors the scroll position and determines whether the fade effect should be shown or hidden based on the scroll state.

## Usage

Expand Down Expand Up @@ -41,29 +40,18 @@ const {
zIndex: 1,
});
<Box>
<div>
<List
type="ul"
m="0"
ref={scrollableRef}
inline
noStyling
>
<li>
<SubNavButton id="subnav-action">
Action
</SubNavButton>
</li>
<li>
<SubNavLink id="subnav-link">
Link
</SubNavLink>
</li>
</List>
{showRightFade && <Box sx={fadeEffect()} />}
</div>
</Box>
`}
language="jsx"
/>
{" "}
<Box>
<div>
<List type="ul" m="0" ref={scrollableRef} inline noStyling>
<li>
<SubNavButton id="subnav-action">Action</SubNavButton>
</li>
<li>
<SubNavLink id="subnav-link">Link</SubNavLink>
</li>
</List>
{showRightFade && <Box sx={fadeEffect()} />}
</div>
</Box>
`} language="jsx" />

0 comments on commit 8bc75e9

Please sign in to comment.