question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cv-side-nav inconsistent render

See original GitHub issue

Detailed description

Describe in detail the issue you’re having.

When using the cv-ui-shell/cv-side-nav.vue component, if I try to render it as a separated component, the layout crashes because one important class isn’t applied, which makes the side-nav get a spacing from top.

Is this a feature request (new component, new icon), a bug, or a general issue?

Bug

Is this issue related to a specific component?

Yes, cv-ui-shell/cv-side-nav.vue

What did you expect to happen? What happened instead? What would you like to see changed?

I expect that if I’m render this component inside a separated file, it still renders the same way as before (with a spacing from top)

What browser are you working in?

Chrome

What version of the Carbon Design System are you using?

@carbon/vue”: “2.20.1” “carbon-components”: “10.9.2”

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

Steps to reproduce the issue

  1. Create a component to render this storybook: http://vue.carbondesignsystem.com/?path=/story/components-cvuishell-header--side-nav-rail-with-header

  2. Get all the code for cv-side-nav and put in a separated file (component) and use this new component

  3. Check that the layout is broken, with the side-nav overlaying the header

Additional information

https://github.com/carbon-design-system/carbon-components-vue/blob/master/packages/core/src/components/cv-ui-shell/cv-side-nav.vue

The problem is because of the class 'bx--side-nav--ux': isChildOfHeader, not being applied on line 8.

This function below, is undefined when the cv-side-nav is written in a separated file. To find the cvHeader as parent, this function should be this.$parent.$parent.isCvHeader. But maybe this isn’t the best approach for fix it.

isChildOfHeader() {
    return this.$parent.isCvHeader;
},

Thank you

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
lee-chasecommented, Jan 23, 2020
0reactions
rafaelmaiachcommented, Jan 23, 2020

@lee-chase yes! This was the way I created mine. I extracted only the menu for a new file and it worked. I’ll go with this approach as it seems changing the whole nav to a new file can lead to some bugs because of events and having one more tag there isn’t a problem.

Thank you Lee!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sidenav bar not rendering properly in material angular
Sidenav bar not rendering properly in material angular. menu displays side by side, but i need one below one. app.component.html
Read more >
fixed rendering problems when inside of sidenav-container ...
If you press 'View Sidenav' you will see the mat-sidenav open but seems that the top of the sidenav is hidden behind the...
Read more >
89984 – SIDEBAR: Inconsistent resizing behaviour in the sidebar
Reproducible with LO 4.4.1.2, Win 8.1 I think it should show the behaviour as in 1. of the in the Bug Report mentioned...
Read more >
Slow/Inconsistent Control Panel Performance in Safari
The issue seems to go away if the window is resized to mobile (where the side nav bar is hidden) or when the...
Read more >
Chi - What's new - Lumen Cloud Assets
Fixed: Sidenav component event listener management has been improved for better ... Fixed: Button web component skeleton rendered with an inconsistent ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found