SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.53k stars 264 forks source link

Side navigation bar for 2 elements is bigger than it should #2156

Closed arcanist123 closed 4 years ago

arcanist123 commented 4 years ago

Describe the bug A clear and concise description of what the bug is.

I have defined a side navigation bar with 2 elements

the line of navigation bar is too long image

To reproduce Steps to reproduce the behavior:

  1. Create a new angular project
  2. install webcomponents
  3. set the app with the following content <ui5-shellbar primary-title="Recipes">
  1. run the project

Isolated example Please provide an isolated example if possibile, by forking CodeSandbox

Expected behavior The line should not be that long

Screenshots image

Context

Affected components (if known) side navigation bar

Log output / Any errors in the console N/A

{...}
fifoosid commented 4 years ago

Hello @arcanist123

By design, the ui5-side-navigation should fill 100% of the height of its parent. The reason for this bug to happen is simple: the parent element of the Side Navigation doesn't have its height set. In order to fix this issue, try setting the height of the parent element.

Note: If the parent element is not DOM element, but Angular component(like app-root), you will have to set a position property as well.