Include itemprop attribute in project avatar component
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA
What does this MR do and why?
In a number of places in the HAML templates for avatars we include the itemprop
attribute, for example;
- https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/views/projects/_home_panel.html.haml#L6
- https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/views/users/show.html.haml#L31
It was mentioned by @vvempati in another MR of mine (!147906 (diffs, comment 1832971734)) that I missed passing it into the component, however, if we do want to keep the prop around from the HAML port to Vue, rather than doing it for each component usage it should probably belong in the ProjectAvatar
component itself.
Itemprop@MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/itemprop
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
No visible changes
How to set up and validate locally
- Visit a page using the
ProjectAvatar
component and check in the developer tools thatitemprop="image"
is visible in the DOM
Edited by Andrew Smith