Skip to content

Show new "Your work" sidebar on Snippets pages

Thomas Hutterer requested to merge your_work_sidebar_snippets into master

What does this MR do and why?

This builds on !107345 (merged), adding the Snippets menu item to the new Your work sidebar (#384342 - closed). Clicking Snippets will bring you to your snippets dashboard, which now renders the "Your work" sidebar. It is also rendered on the pages for new/edit/show snippets to make the sidebar a consistent experience.

However, we don't render the "Your work" sidebar while exploring or showing public snippets of other users. These aren't "your work" but belong to the Explore section which will get its own sidebar eventually.

Screenshots or screen recordings

New behavior with FF enabled

your_work_snippets

New UX independent from FF

Before: No breadcrumbs. Limited container width After: Breadcrumbs. Default container width
Screenshot_from_2023-01-05_18-30-21 Screenshot_from_2023-01-05_18-32-29

Also see this discussion.

How to set up and validate locally

  • Make sure you have the your_work_sidebar feature flag enabled:
Feature.enable(:your_work_sidebar)
  • While logged in, go to http://gdk.test:3000/dashboard/projects. This page already showed the sidebar before, so it's a good starting point.
  • Navigate to Snippets from within the sidebar. The snippets dashboard should show and the sidebar menu item you've just clicked should now show as active.
  • Create a new snippet. The sidebar should be visible and Snippets should be the active menu item.
  • Edit a snippet. The sidebar should be visible and Snippets should be the active menu item.
  • Show a snippet. The sidebar should be visible and Snippets should be the active menu item.
  • All these pages should have breadcrumbs.

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 Thomas Hutterer

Merge request reports

Loading