Skip to content

Add page_has_* variable definitions for CSS classes

Scott de Jonge requested to merge nav-helper-page-classes-variables into master

What does this MR do and why?

Add page_has_* variable definitions for CSS classes in nav_helper.rb

From: !112643 (comment 1289974941)

nitpick/minor: it would be nice to extract the defined?(@left_sidebar) && @left_sidebar && collapsed_super_sidebar? && @left_sidebar into variables for better readability. One could see right away that classes are applied to the super sidebar and old sidebar under the same conditions.

Screenshots or screen recordings

n/a

How to set up and validate locally

  • Refresh the page and check page has correct CSS classes
  • Enable the feature flag in rails console with rails c
Feature.enable(:super_sidebar_nav)
  • Enable the "New navigation" setting toggle from the user dropdown

CleanShot_2023-01-24_at_17.50.44_2x

  • Refresh the page and check page has correct CSS classes

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

Loading