UI5 / UI5/webcomponents

[components]: replace resize handler with container queries

Open
#7,666 4 comments 0 reactions 1 assignee View on GitHub

@MapTo0 is already working on this.

Since Jan 8, 2025.

enhancement TOPIC B TOPIC P TOPIC RD TOPIC RL
Dominant language
TypeScript
Stars
1.8k
Forks
285
Avg merge
3d 2h
Merged PRs (30d)
59

Description

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 (https://github.com/SAP/ui5-webcomponents/issues/5774) that reports flickering when the components are resized and it will increase the performance of the components.

Reference

Following PR (https://github.com/SAP/ui5-webcomponents/pull/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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.