Skip to content

refactor(required-fields-indicator, global-header, text-editor): replace Box with div #7366

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

Merged
merged 2 commits into from
Jun 9, 2025

Conversation

tomdavies73
Copy link
Contributor

Proposed behaviour

Replaces Box with Div in components that don't properly utilise Box's layout-specific props. This eliminates unnecessary Box component overhead and reduces the bundle size without affecting functionality or styling.

Current behaviour

Currently, Box is used instead of Div in components that don't properly utilise Box's layout-specific props.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

@tomdavies73 tomdavies73 self-assigned this Jun 5, 2025
@tomdavies73 tomdavies73 requested a review from a team as a code owner June 5, 2025 14:41
@tomdavies73 tomdavies73 requested a review from a team as a code owner June 5, 2025 14:41
Comment on lines 25 to 27
StyledIndicatorContainer.defaultProps = {
theme: BaseTheme,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

observation: need to be careful that this PR doesn't undo #7364 if it goes in after it (what with it being an added line)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good shout, I will wait until James' PR is merged

…ace Box with div

Replaces Box with Div in components that don't properly utilise Box's layout-specific props. This
eliminates unnecessary Box component overhead and reduces the bundle size without affecting
functionality or styling
@tomdavies73 tomdavies73 merged commit c73d739 into master Jun 9, 2025
28 checks passed
@tomdavies73 tomdavies73 deleted the FE-7252 branch June 9, 2025 11:14
@carbonci
Copy link
Collaborator

🎉 This PR is included in version 154.7.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants