Fix personal projects signed out state on user profile
What does this MR do and why?
In &9056 we are migrating the user profile from HAML/jQuery to Vue. The Personal projects
section uses the GET /users/:user_id/projects
API to fetch the projects. When signed out this API only returns BasicProjectDetails so we need to add a few conditionals to the projects_list_item.vue
to prevent errors. This MR adds a conditional for rendering updated_at
and visibility
attributes.
Reviewer note: There is currently another bug on the Vue version of the profile where the followers/following API return 401 when signed out. This error will be solved by #412929.
UX note: There is currently an incorrect bottom border in the tabs. This is due to a recent change in !118597 (merged). We will be removing the tabs and moving the navigation into the new sidebar in #389842. By removing the tabs we will be able to fix this bug and because this is behind a feature flag I am going to leave it as-is for now.
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Create a personal project
- Create a project and choose your username for the namespace
- Enable the
profile_tabs_vue
feature flagbin/rails console
Feature.enable(:profile_tabs_vue)
- In a private/incognito window visit your profile. There should be no console errors.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.