Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rename size prop to data-size #2680

Merged
merged 23 commits into from
Oct 25, 2024
Merged

feat: rename size prop to data-size #2680

merged 23 commits into from
Oct 25, 2024

Conversation

Barsnes
Copy link
Member

@Barsnes Barsnes commented Oct 24, 2024

resolves #2673

Copy link

changeset-bot bot commented Oct 24, 2024

⚠️ No Changeset found

Latest commit: ba4d52c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Oct 24, 2024

Preview deployments for this pull request:

Storybook - 25. Oct 2024 - 13:00

Storefront - 25. Oct 2024 - 13:00

Theme - 25. Oct 2024 - 13:00

Copy link
Contributor

github-actions bot commented Oct 24, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 55.58% 3307 / 5949
🔵 Statements 55.58% 3307 / 5949
🔵 Functions 84.84% 168 / 198
🔵 Branches 74.8% 484 / 647
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/react/src/types.ts 0% 0% 0% 0%
packages/react/src/components/Alert/Alert.tsx 100% 100% 100% 100%
packages/react/src/components/Avatar/Avatar.tsx 75% 100% 50% 75% 85, 87-95
packages/react/src/components/Badge/Badge.tsx 11.53% 100% 0% 11.53% 55-71, 73-77, 79
packages/react/src/components/Breadcrumbs/Breadcrumbs.tsx 100% 100% 100% 100%
packages/react/src/components/Button/Button.tsx 97.29% 88.88% 100% 97.29% 76
packages/react/src/components/Chip/Chips.tsx 100% 62.5% 100% 100%
packages/react/src/components/ErrorSummary/ErrorSummary.tsx 27.27% 100% 0% 27.27% 20-30, 32-43, 45
packages/react/src/components/Heading/Heading.tsx 100% 50% 100% 100%
packages/react/src/components/HelpText/HelpText.tsx 100% 100% 100% 100%
packages/react/src/components/Label/Label.tsx 100% 100% 100% 100%
packages/react/src/components/List/Lists.tsx 100% 75% 100% 100%
packages/react/src/components/Modal/Modal.tsx 90.14% 76.47% 75% 90.14% 57-58, 60-61, 65-67
packages/react/src/components/Pagination/Pagination.tsx 100% 50% 100% 100%
packages/react/src/components/Paragraph/Paragraph.tsx 100% 100% 100% 100%
packages/react/src/components/Popover/Popover.tsx 94.77% 71.87% 100% 94.77% 153, 190-191, 194-195, 208-209
packages/react/src/components/Table/Table.tsx 100% 100% 100% 100%
packages/react/src/components/Tabs/Tabs.tsx 100% 66.66% 100% 100%
packages/react/src/components/Tag/Tag.tsx 100% 100% 100% 100%
packages/react/src/components/ToggleGroup/ToggleGroup.tsx 100% 100% 100% 100%
packages/react/src/components/ValidationMessage/ValidationMessage.tsx 100% 100% 100% 100%
packages/react/src/components/form/CharacterCounter.tsx 93.1% 33.33% 33.33% 93.1% 26, 29
packages/react/src/components/form/Checkbox/Checkbox.tsx 100% 66.66% 100% 100%
packages/react/src/components/form/Combobox/Combobox.tsx 88.46% 67.34% 71.42% 88.46% 163-164, 213-216, 258-259, 267, 276-277, 324-325, 433-438, 441-452, 454-457, 461-464
packages/react/src/components/form/Combobox/Custom.tsx 23.4% 100% 100% 23.4% 48-50, 52, 54, 56-57, 59-61, 63, 65-68, 70-75, 77-90, 92
packages/react/src/components/form/Combobox/Empty.tsx 91.66% 66.66% 100% 91.66% 15-16
packages/react/src/components/form/Combobox/Option/Option.tsx 92.95% 62.5% 100% 92.95% 42-43, 84-86
packages/react/src/components/form/Combobox/internal/ComboboxChips.tsx 75.47% 50% 66.66% 75.47% 10-11, 32-42
packages/react/src/components/form/Combobox/internal/ComboboxError.tsx 100% 50% 100% 100%
packages/react/src/components/form/Combobox/internal/ComboboxInput.tsx 98.44% 75% 100% 98.44% 43-44
packages/react/src/components/form/Combobox/internal/ComboboxLabel.tsx 65.85% 40% 100% 65.85% 35-38, 44-50, 52-54
packages/react/src/components/form/Fieldset/Fieldset.tsx 100% 87.5% 100% 100%
packages/react/src/components/form/Input/Input.tsx 100% 100% 100% 100%
packages/react/src/components/form/Radio/Radio.tsx 100% 75% 100% 100%
packages/react/src/components/form/Search/Search.tsx 100% 93.33% 100% 100%
packages/react/src/components/form/Select/Select.tsx 84% 50% 66.66% 84% 29-32
packages/react/src/components/form/Switch/Switch.tsx 94.36% 57.14% 100% 94.36% 77-80
packages/react/src/components/form/Textarea/Textarea.tsx 100% 100% 100% 100%
packages/react/src/components/form/Textfield/Textfield.tsx 83.09% 70% 100% 83.09% 123-126, 146-152, 154-156, 178-184, 186-188
packages/react/src/components/loaders/Spinner/Spinner.tsx 100% 100% 100% 100%
Generated in workflow #600 for commit ba4d52c by the Vitest Coverage Report Action

@Barsnes Barsnes marked this pull request as ready for review October 24, 2024 13:04
Copy link
Contributor

@eirikbacker eirikbacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 🙇 🙏

<Pagination.Item key={itemKey}>
<Pagination.Button {...buttonProps} aria-label={`Side ${page}`}>
{page}
{sizes.map((size) => (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cant you just use one map here and return components in a fragment or array? Thats quite a lot of maps...

Copy link
Member Author

@Barsnes Barsnes Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats what I originally did, but due to us wanting the same component on the x-axis in the grid, we need to have a map for each component, that way it lands in the same grid-column

@mimarz mimarz merged commit d2fc6b9 into next Oct 25, 2024
13 checks passed
@mimarz mimarz deleted the rename-size branch October 25, 2024 11:16
Barsnes added a commit that referenced this pull request Oct 28, 2024
commit ce23f32
Author: Eirik Backer <[email protected]>
Date:   Mon Oct 28 10:31:21 2024 +0100

    fix(Chip): use input component (#2683)

    - Fixes #2669
    - Fixes wrong height implemented (now correctly `32px`)
    - Implements simplified states after dialogue with Marianne
    - Fixes better alignment of label vs. radio/checkbox
    - Implements logic so elements with the `ds-focus--visible` class
    automatically hides focus ring on children (no need for confusing,
    nested focus rings)

commit d5e0ba1
Author: Lasse Febakke Straum <[email protected]>
Date:   Fri Oct 25 15:08:14 2024 +0200

    refactor(tokens): changed spacing and sizing type to dimension (#2688)

    Co-authored-by: Tobias Barsnes <[email protected]>
    Co-authored-by: Michael Marszalek <[email protected]>

commit 6c1f99d
Author: Eirik Backer <[email protected]>
Date:   Fri Oct 25 13:52:51 2024 +0200

    chore: remove tmp field styling in testing story (#2687)

    - Since field styling is now merged, `testing.stories.tsx` no longer
    needs to fake it

commit f4f76d3
Author: Eirik Backer <[email protected]>
Date:   Fri Oct 25 13:41:36 2024 +0200

    fix(Heading+Label+ValidationMessage): clean up css styles (#2677)

    Figma task is added as #2676

commit d2fc6b9
Author: Tobias Barsnes <[email protected]>
Date:   Fri Oct 25 13:16:17 2024 +0200

    feat: rename `size` prop to `data-size` (#2680)

    resolves #2673

commit acef771
Author: Eirik Backer <[email protected]>
Date:   Fri Oct 25 10:24:19 2024 +0200

    fix(Input): inherit line-height (#2685)

    As pointed out by hawk-eye @mimarz 💪 🙏 🦅
    https://designsystemet.slack.com/archives/C07K7NEKXEW/p1729843841118129

commit d3c58b0
Author: Eirik Backer <[email protected]>
Date:   Fri Oct 25 10:04:16 2024 +0200

    fix(Spinner): use forwardRef and aria-label for consistency (#2682)

    - Use `aria-label` for accessible spinner label to be consistent with
    other components
    - Use `forwardRef` on Spinner

    ---------

    Co-authored-by: Tobias Barsnes <[email protected]>

commit 326671a
Author: Une Sofie Kinn Ekroll <[email protected]>
Date:   Fri Oct 25 08:26:49 2024 +0200

    feat(tokens): add modes for semantic color categories main & support (#2643)

    Co-authored-by: Lasse Febakke Straum <[email protected]>

commit 7520547
Author: Eirik Backer <[email protected]>
Date:   Thu Oct 24 14:19:33 2024 +0200

    fix(Radio+Checkbox): use input component (#2607)

    - Part of #2311
    - Fieldset at compound components moved to task #2666
    - Fixes #2459

commit f96289a
Author: Tobias Barsnes <[email protected]>
Date:   Thu Oct 24 11:17:42 2024 +0200

    chore: enable `noUnusedImports` biome rule (#2675)

    enables https://biomejs.dev/linter/rules/no-unused-imports/

commit a452813
Author: Une Sofie Kinn Ekroll <[email protected]>
Date:   Thu Oct 24 10:38:59 2024 +0200

    feat(cli,theme): don't output underlying primitives for semantic color variables (#2641)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor use of size to data-size
3 participants