Skip to content

fix(AlertBox): title shouldn't shrink to fit content #7985

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

abinadiS
Copy link

Description

I fix the bug #7983 with @bjohansebas

Validation

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

Copy link

vercel bot commented Jul 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Jul 15, 2025 9:15pm

@bjohansebas
Copy link
Member

I'm working on the Storybook tests.

@bjohansebas bjohansebas added the github_actions:pull-request Trigger Pull Request Checks label Jul 15, 2025
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Jul 15, 2025
@bjohansebas bjohansebas marked this pull request as ready for review July 15, 2025 20:59
@Copilot Copilot AI review requested due to automatic review settings July 15, 2025 20:59
@bjohansebas bjohansebas requested a review from a team as a code owner July 15, 2025 20:59
Copy link
Contributor

@Copilot 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 fixes a styling issue with the AlertBox component's title by ensuring proper layout on smaller screens. The title was wrapping unexpectedly when space was constrained.

  • Adds CSS styling to prevent the AlertBox title from wrapping by applying min-w-max
  • Introduces a new Storybook story to test the AlertBox component in a constrained width scenario

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/ui-components/src/Common/AlertBox/index.module.css Adds .title class with min-w-max styling to prevent title wrapping
packages/ui-components/src/Common/AlertBox/index.stories.tsx Adds SmallWindows story to demonstrate AlertBox behavior in constrained width containers
Comments suppressed due to low confidence (1)

packages/ui-components/src/Common/AlertBox/index.stories.tsx:108

  • [nitpick] The story name 'SmallWindows' is ambiguous. Consider a more descriptive name like 'ConstrainedWidth' or 'NarrowContainer' that better describes what this story is testing.
export const SmallWindows: Story = {

Copy link

codecov bot commented Jul 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.13%. Comparing base (b035290) to head (95fb22e).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7985      +/-   ##
==========================================
+ Coverage   73.10%   73.13%   +0.03%     
==========================================
  Files          95       95              
  Lines        8355     8354       -1     
  Branches      219      218       -1     
==========================================
+ Hits         6108     6110       +2     
+ Misses       2246     2243       -3     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@avivkeller avivkeller changed the title fix style title AlertBox fix(AlertBox): title shouldn't shrink to fit content Jul 15, 2025
@avivkeller avivkeller linked an issue Jul 15, 2025 that may be closed by this pull request
@@ -104,3 +104,24 @@ export default {
},
},
} as Meta;

export const SmallWindows: Story = {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe something like "smallcontainer" because windows is strange

Copy link
Author

Choose a reason for hiding this comment

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

Sounds good.

@ovflowd
Copy link
Member

ovflowd commented Jul 15, 2025

There's no need for a small window story, Chromatic automatically snapshots every story in both a mobile and desktop mode... Or is that not enough? Do we need a 3rd smaller desktop one?

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.

bug: stability component should grow the status area
5 participants