Skip to content

Conversation

@GomezIvann
Copy link
Collaborator

@GomezIvann GomezIvann commented Mar 31, 2025

Checklist

  • The build process is done without errors. All tests pass in the /lib directory.
  • Self-reviewed the code before submitting.
  • Meets accessibility standards.
  • Added/updated documentation to /website as needed.
  • Added/updated tests as needed.

Description
Redesign of the inset component following the new design kit specifications, already using the new token architecture (CSS variables). This PR also includes several documentation updates in the DxcContainer that weren't addressed in its PR.

  • Now the children prop from the <DxcContainer> is not mandatory anymore. This will allow users to build blocks without children in Halstack layouts.

@GomezIvann GomezIvann requested a review from Copilot March 31, 2025 15:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR redesigns the inset component by updating its spacing values to use new CSS token references, and it adjusts related documentation and examples to reflect the updated design kit specifications. Key changes include conversion of hard-coded spacing values to CSS variables in multiple component story files, removal of legacy inset usage and specification pages, and updates to code examples and documentation tables to align with the new token architecture.

Reviewed Changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/lib/src/button/Button.stories.tsx Updated inset spacing value from a fixed rem value to a CSS token.
packages/lib/src/badge/Badge.stories.tsx Converted inset spacing value to a CSS variable for consistency.
packages/lib/src/action-icon/ActionIcon.stories.tsx Replaced fixed spacing with a CSS token in the inset component.
packages/lib/src/accordion/Accordion.stories.tsx Updated multiple inset spacing values to use CSS token references.
apps/website/screens/components/inset/usage/InsetUsagePage.tsx Removed the outdated usage page content in favor of new design.
apps/website/screens/components/inset/specs/InsetSpecsPage.tsx Removed the legacy specifications page content.
apps/website/screens/components/inset/overview/InsetOverviewPage.tsx Added a new overview page with updated introduction and best practices.
apps/website/screens/components/inset/code/examples/* Updated code examples to use CSS token references for spacing and sizing.
apps/website/screens/components/inset/code/InsetCodePage.tsx Revised the documentation table to reflect changes in inset prop names and types.
apps/website/screens/components/inset/InsetPageLayout.tsx Updated tab order and component usage for layout consistency.
apps/website/screens/components/container/* Converted similar spacing and border values in container examples and documentation.
apps/website/pages/components/inset/* Removed legacy pages and updated routing to the new overview and code pages.
Comments suppressed due to low confidence (1)

apps/website/screens/components/inset/code/InsetCodePage.tsx:26

  • Ensure that the prop names displayed in the documentation table match the actual API of the DxcInset component. For instance, the change from 'space' to 'bottom' (and the reordering of 'top', 'horizontal', and 'vertical') should be reviewed for consistency with the component implementation.
<td>bottom</td>

@GomezIvann GomezIvann requested a review from Copilot April 1, 2025 09:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the Inset component implementation and related documentation to align with the new design kit specifications and token architecture. Key changes include:

  • Replacing hard-coded spacing values (e.g. "3rem", "1.5rem", "2rem") with the corresponding CSS custom property tokens.
  • Removing outdated usage and specifications pages for the inset component and introducing an overview page.
  • Updating code examples and documentation across various components (Badge, ActionIcon, Accordion, Container) to use the new token-based values.

Reviewed Changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/lib/src/badge/Badge.stories.tsx Updated inset spacing value to use CSS token.
packages/lib/src/action-icon/ActionIcon.stories.tsx Replaced fixed spacing with a design token.
packages/lib/src/accordion/Accordion.stories.tsx Updated multiple inset spacing values to use CSS tokens.
apps/website/screens/components/inset/usage/InsetUsagePage.tsx Removed the usage page to match new design direction.
apps/website/screens/components/inset/specs/InsetSpecsPage.tsx Removed the specifications page as part of the redesign.
apps/website/screens/components/inset/overview/InsetOverviewPage.tsx Introduced a new overview page for the inset component.
apps/website/screens/components/inset/code/examples/customSides.ts Updated inset and flex examples to use CSS token values.
apps/website/screens/components/inset/code/examples/basicUsage.ts Updated inset code example with new token-based spacing.
apps/website/screens/components/inset/code/InsetCodePage.tsx Revised the props table and documentation to reflect new token usage.
apps/website/screens/components/inset/InsetPageLayout.tsx Updated tab ordering to match the new content structure.
apps/website/screens/components/flex/overview/FlexOverviewPage.tsx Adjusted documentation list ordering for clarity.
apps/website/screens/components/container/overview/examples/defaultBoxModel.ts Removed the default box model example.
apps/website/screens/components/container/overview/examples/alternateBoxModel.ts Removed the alternate box model example.
apps/website/screens/components/container/code/examples/listbox.ts Updated container example with new token-based values.
apps/website/screens/components/container/code/examples/basicUsage.ts Updated container example to reference new tokens.
apps/website/screens/components/container/code/ContainerCodePage.tsx Updated the props documentation for container with new token details.
apps/website/pages/components/inset/usage.tsx Deleted the obsolete usage page.
apps/website/pages/components/inset/specifications.tsx Deleted the obsolete specifications page.
apps/website/pages/components/inset/index.tsx Updated the landing page to use the new overview page.
apps/website/pages/components/inset/code.tsx Added a new page for inset code documentation.

@GomezIvann GomezIvann marked this pull request as ready for review April 1, 2025 09:23
@Mil4n0r Mil4n0r self-assigned this Apr 1, 2025
@Mil4n0r Mil4n0r self-requested a review April 1, 2025 10:58
@Mil4n0r Mil4n0r self-requested a review April 2, 2025 10:24
@Mil4n0r Mil4n0r merged commit bac56e4 into master Apr 2, 2025
4 checks passed
@Mil4n0r Mil4n0r deleted the gomezivann/inset-redesign branch April 2, 2025 10:25
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.

3 participants