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

fix(components): adjusting the height layout of alert on resize #2420

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

Conversation

owilliams320
Copy link
Collaborator

Description

This pull request includes several changes to the AlertBase class in the libs/components/src/alert/alert-base.ts file to enhance its functionality and maintainability. The most important changes include adding a ResizeObserver to handle element resizing, updating the render method for better readability, and minor code formatting improvements.

What's included?

  • Added a ResizeObserver to the AlertBase class to observe and handle element resizing. This includes initializing the observer in the constructor, updating the currentWidth state, and handling cleanup in the disconnectedCallback method. [1] [2]

Test Steps

  • npm run storybook
  • then navigate to the alert story
  • finally add a lot of text in the description and resize the screen

General Tests for Every PR

  • npm run start still works.
  • npm run lint passes.
  • npm run stylelint passes.
  • npm test passes and code coverage is not lower.
  • npm run build still works.
Screenshots or link to StackBlitz/Plunker

Uploading Screen Recording 2025-02-13 at 10.30.18 AM.mov…

@owilliams320 owilliams320 temporarily deployed to covalent-pip-fix-alert--c41qxj February 13, 2025 15:46 Inactive
@owilliams320
Copy link
Collaborator Author

🎉 This PR is included in version 10.0.2-beta.1 🎉

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant