Skip to content

Resolve whitespace in super sidebar on search page

Scott de Jonge requested to merge super-sidebar-menu-condition into master

What does this MR do and why?

Add v-if="menuItems.length" condition to <sidebar-menu> rendering to remove empty HTML elements being rendered, adding whitespace to the UI

<nav class="gl-p-2 gl-relative">
  <!----> <!---->
  <ul class="gl-p-0 gl-list-style-none"></ul>
</nav>

Screenshots or screen recordings

Before After
127.0.0.1_3000_search 127.0.0.1_3000_search__1_

How to set up and validate locally

  1. Enable super sidebar (if not currently on)
    1. In rails c enable feature flag Feature.enable(:super_sidebar_nav)
    2. Toggle on "new navigation" in user menu
  2. Go to /search there should no longer be space before contents loaded in <sidebar-portal-target />

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports