Skip to content

Set sensible defaults as pinned items in groups and projects

Thomas Hutterer requested to merge thutterer/default-pins into master

What does this MR do and why?

Implements #404883 (closed). See #404883 (comment 1372082739) for more context.

Screenshots or screen recordings

Before After
Project Screenshot_2023-05-02_at_3.44.51_PM Screenshot_2023-05-02_at_3.37.21_PM
Group Screenshot_2023-05-02_at_3.44.28_PM Screenshot_2023-05-02_at_3.37.43_PM
Hover Focus within
Screenshot_2023-05-02_at_3.38.56_PM Screenshot_2023-05-02_at_3.39.33_PM

How to set up and validate locally

  1. The default pins are only show for users who haven't edited their pins yet. To reset your user to that state, do this:
    user = User.first # or whatever your user is
    user.update(pinned_nav_items: {}) # "{}" is also the database default value for this JSONB column
  2. Enable the new nav:
    1. Enable the feature flag:

      echo "Feature.enable(:super_sidebar_nav)" | rails c
    2. Enable the user setting from the user dropdown:

      Screenshot_2022-12-13_at_1.32.43_PM

MR acceptance checklist

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

Edited by Paul Gascou-Vaillancourt

Merge request reports