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

[UI5 Bar]: Button inside slotEnd being cut off #10101

Open
1 task done
PlutaKatarzyna opened this issue Oct 29, 2024 · 1 comment
Open
1 task done

[UI5 Bar]: Button inside slotEnd being cut off #10101

PlutaKatarzyna opened this issue Oct 29, 2024 · 1 comment
Assignees
Labels
bug This issue is a bug in the code enhancement New feature or request feature request SAP UDEx TOPIC B

Comments

@PlutaKatarzyna
Copy link

Bug Description

When long text heading (as startContent slot) and button (as endContent slot) are added to ui5-bar, on smaller devices button is cut off. There is no enough space to fully display button and wrapper width is not configurable.

Screenshot 2024-10-29 at 09 39 21

Affected Component

ui5-bar, udex-modal

Expected Behaviour

Could we have shadow parts for: .ui5-bar-startcontent-container, .ui5-bar-midcontent-container, .ui5-bar-endcontent-container element in ui5 bar, so min-width can be controlled by users?

Isolated Example

https://sap.github.io/ui5-webcomponents/play/#eyJpbmRleC5odG1sIjp7Im5hbWUiOiJpbmRleC5odG1sIiwiY29udGVudCI6IjwhLS0gcGxheWdyb3VuZC1mb2xkIC0tPlxuPCFET0NUWVBFIGh0bWw-XG48aHRtbCBsYW5nPVwiZW5cIj5cblxuXG48aGVhZD5cbiAgICBcbiAgICA8c3R5bGU-XG4gICAgICAqOm5vdCg6ZGVmaW5lZCkge1xuICAgICAgICBkaXNwbGF5OiBub25lO1xuICAgICAgfVxuICAgIDwvc3R5bGU-XG5cbiAgICBcbiAgICA8c3R5bGU-XG4gICAgICAqOm5vdCg6ZGVmaW5lZCkge1xuICAgICAgICBkaXNwbGF5OiBub25lO1xuICAgICAgfVxuICAgICAgaDMge1xuICAgICAgICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcbiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICAgICAgdGV4dC13cmFwOiBub3dyYXA7XG4gICAg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mNvbXBvbmVudHMvZGlzdC9CdXR0b24uanNcIjtcbmltcG9ydCBcIkB1aTUvd2ViY29tcG9uZW50cy9kaXN0L0xhYmVsLmpzXCI7XG5pbXBvcnQgXCJAdWk1L3dlYmNvbXBvbmVudHMvZGlzdC9CYXIuanNcIjtcbmltcG9ydCBcIkB1aTUvd2ViY29tcG9uZW50cy1pY29ucy9kaXN0L2hvbWUuanNcIlxuaW1wb3J0IFwiQHVpNS93ZWJjb21wb25lbnRzLWljb25zL2Rpc3QvYWN0aW9uLXNldHRpbmdzLmpzXCJcbiJ9fQ

Steps to Reproduce

  1. Add heading into ui5-bar with slot startContent. Heading should contain long text to either be wrapped or truncated
  2. Add button into ui5-bar with slot endContent
  3. Open page in mobile device simulator to display bar in small resolution
  4. Observe button being cut of

Log Output, Stack Trace or Screenshots

Issue us cause by setting 'min-width' for smaller ui5-bar resolution.
.ui5-bar-root.ui5-bar-root-shrinked .ui5-bar-content-container .
Button placed inside do not have enough space to be displayed correctly.
Setting width to slots wrapper could fix that problem:
Screenshot 2024-10-29 at 09 40 29

Priority

None

UI5 Web Components Version

1.24.8, 2.3.0

Browser

Chrome

Operating System

MacOS , Windows

Additional Context

UDEx reported ticket: https://github.tools.sap/sapudex/digital-design-system/issues/1188

UI5 Bar component is used inside UDEx Modal component header (extension on UI5 Dialog).

Organization

SAP / UDEx components team

Declaration

  • I’m not disclosing any internal or sensitive information.
@PlutaKatarzyna PlutaKatarzyna added the bug This issue is a bug in the code label Oct 29, 2024
@dimovpetar dimovpetar self-assigned this Oct 29, 2024
@dimovpetar
Copy link
Contributor

dimovpetar commented Oct 29, 2024

Hello @SAP/ui5-webcomponents-topic-b ,

Please asses whether exposing those elements as CSS parts is meaningful.

Best regards,
Petar

@dimovpetar dimovpetar removed their assignment Oct 29, 2024
@DMihaylova DMihaylova self-assigned this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug in the code enhancement New feature or request feature request SAP UDEx TOPIC B
Projects
Status: New Issues
Development

No branches or pull requests

4 participants