Fix missing Exceptions icon in project Observe menu

What does this MR do and why?

Fixes the missing icon for Exceptions in the project Observe entries of the "Browse all features" modal.

The project Observe menu set library_icon: 'exceptions', but @gitlab/svgs only has an exception sprite, so no icon rendered. This MR changes it to exception, which the group Observability menu already uses.

The menu-items spec now checks each item's library_icon.

References

None.

Screenshots or screen recordings

Not captured yet. Before/after screenshots will be added after browser validation.

Before After
Exceptions_-_Before Execptions_-_After

How to set up and validate locally

Observability needs a backend, but the sidebar and feature library only check the feature flag and a persisted setting. A mock setting is enough.

  1. Turn on the feature flag :hide_unpinned_sidebar_items

  2. In a Rails console, enable the flag and create a mock setting for a group:

    group = Group.find_by_full_path('gitlab-org')
    Feature.enable(:observability_sass_features, group)
    Observability::GroupO11ySetting.find_or_initialize_by(group_id: group.id).update!(
      o11y_service_url: 'https://gdk-mock.gitlab-o11y.com',
      o11y_service_user_email: 'o11y-mock@example.com',
      o11y_service_password: 'gdk-mock-password',
      o11y_service_post_message_encryption_key: 'gdk-mock-key'
    )
  3. Restart Rails: gdk restart rails-web.

  4. As a Developer or higher in that group, open a project in it, for example gitlab-org/gitlab-test.

  5. Open Browse all features and find the Observe section. Exceptions should show the exception icon.

The mock setting points at a fake host, so the observability pages themselves won't load data.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Austin Regnery

Merge request reports

Loading
Loading