Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review metadata component usage #3482

Open
MartinJJones opened this issue Jul 6, 2023 · 2 comments
Open

Review metadata component usage #3482

MartinJJones opened this issue Jul 6, 2023 · 2 comments
Labels
design Design inconsistencies and quirks

Comments

@MartinJJones
Copy link
Contributor

MartinJJones commented Jul 6, 2023

What

We have a metadata component available in the publishing components gem that can be used in rendering applications.

However, several applications appear to also have their own metadata components, applications could be using their own variation of the component for several reasons, either because the metadata component was not available at the time, or it does not provide all the requirements.

We should look to either directly replace the metadata components in the rendering app with the one from the publishing components gem, or update the metadata component in the gem where appropriate, so the app component can be replaced.

Why

  • Help keep the UI consistent across applications
  • Helps to keep the codebase DRY, we only need to make changes in one place
  • Make it easier to know which component to choose from
  • We may improve the existing component by providing additional features identified in rendering applications

The screenshots below show examples of the varying implementation of the metadata component, as well as the different HTML used, visually they will have different font-size, color and spacing.

Screenshots Comparisons

Content Data Admin

Publishing component Content data admin
metadata-gem content-data-admin

Frontend

Publishing component Frontend
metadata-last-updated metadata-government-frontend

Content Publisher

Publishing component Content publisher
metadata-gem-c-2-lines metadata-content-publisher

Government Frontend

Publishing component - inversed Government Frontend - metadata
metadata-inverse-gem-c government-frontend-important-metadata
Publishing component Government Frontend - published-dates
metadata-last-updated published-dates-metadata

In this example, the metadata component from the gem is already included at the top of this page - https://www.gov.uk/government/case-studies/2013-elections-in-swaziland, but an additional request for the published-dates is sent.

@MartinJJones MartinJJones added the design Design inconsistencies and quirks label Jul 6, 2023
@nnagewad
Copy link

nnagewad commented Jun 7, 2024

@MartinJJones do you have examples where I could see the non-publishing components in action?

Silly question, what will the impact be once front-end apps merge?

@MartinJJones
Copy link
Contributor Author

MartinJJones commented Jun 7, 2024

@MartinJJones do you have examples where I could see the non-publishing components in action?

I've included some examples below, just let me know if you need any further info.

Application Example Comments
Content Publisher https://content-publisher.publishing.service.gov.uk/component-guide/metadata appears on the right hand side when editing a document in content publisher
Frontend https://www.gov.uk/bank-holidays included at the bottom of the page
Government Frontend https://components.publishing.service.gov.uk/component-guide/metadata Examples where this is used: https://www.gov.uk/government/case-studies/2013-elections-in-swaziland (at the end of the content). https://www.gov.uk/business-finance-support/access-to-finance-advice-north-west-england (important variation used at the top of the page

Silly question, what will the impact be once front-end apps merge?

I think this depends on the approach used when the frontend apps are merged, and if this only includes public facing frontend applications, is content-publisher included in the consolidation work for example. It's not something I've been directly involved in, but happy to discuss further, will provide any other info where I can 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Design inconsistencies and quirks
Projects
None yet
Development

No branches or pull requests

2 participants