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

[components]: replace resize handler with container queries #7666

Open
3 of 11 tasks
nnaydenow opened this issue Oct 4, 2023 · 3 comments
Open
3 of 11 tasks

[components]: replace resize handler with container queries #7666

nnaydenow opened this issue Oct 4, 2023 · 3 comments
Assignees
Milestone

Comments

@nnaydenow
Copy link
Contributor

nnaydenow commented Oct 4, 2023

Feature Request Description

Currently, every component that has responsive paddings or visualization based on a specific breakpoint apply class / attribute to the corresponding size and this class / attribute is used to style the component. Usually this class / attribute rely on the component width, where width is observed by resize handler in order to detect changes.

With current issue we want to start to use container queries. Container queries enable you to apply styles to an element based on the size of the element's container.

Motivation

There is issue (#5774) that reports flickering when the components are resized and it will increase the performance of the components.

Reference

Following PR (#7665) can be used for reference how responsive styles of component should be migrated to content queries from resize handler

Resources

To be addressed

  • PopupCommons styles
  • Wizard
  • ShellBar
  • Page
  • MediaGallery
  • TabContainer
  • DynamicSideContent
  • IllustratedMessage
  • Toolbar
  • ProductSwitch
  • FlexibleColumnLayout

Note: Some components might be missed so fill the list if some component is missing

@nnaydenow nnaydenow changed the title [components]: replace resize handler object [components]: replace resize handler with container queries Oct 4, 2023
@hristop
Copy link
Contributor

hristop commented Oct 16, 2023

Internal BLI was created: FIORITECHP1-28821

@dimovpetar
Copy link
Contributor

For Popover and Dialog (Popups), CSS container queries cannot be used. They determine their size based on their content (Child -> Parent). If we make popups containment contexts, their content would be sized based on the popup size (Parent ->Child). Therefore this would end in Child->Parent->Child->Parent->... resizing.
Read more detailed explanation of why this is not possible here https://stackoverflow.com/a/73980194/9136171 .

@nnaydenow
Copy link
Contributor Author

Blocked for the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Approved
Status: Planned
Status: Completed
Development

No branches or pull requests

4 participants