Skip to content

Resolve "Work items show icons and actions when item is not found"

What does this MR do and why?

When a work item page (-/work_items/[iid]) is rendered and the work item iid doesn't exist, we are rendering the 404 - Not found page as expected. The bug is that the issue and menu icons appear by mistake and the not-found content is not horizontally centered on the page.

Fix: Moved the not-found content component from inside the work item component to be higher in the page component tree, so it is rendered if there's an error fetching the work item. This way all the work item UI components (including the icons) will only render if the content is not loading and there is no error fetching it.

I also added a few more component checks to the empty state test to ensure they are not rendered when the work item is not found.

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2024-05-23_at_5.30.05_PM Screenshot_2024-05-23_at_5.31.23_PM

How to set up and validate locally

  1. Go to a work item page with an id that doesn't exist (-/work_items/5632)
  2. Expect that the "Not found" UI is rendered properly

Related to #460772 (closed)

Edited by Deepika Guliani

Merge request reports