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

Add Artifact Metadata section to OCI Repository detail pages #4002

Merged
merged 4 commits into from
Sep 12, 2023

Conversation

joshri
Copy link
Contributor

@joshri joshri commented Sep 11, 2023

Closes: weaveworks/weave-gitops-enterprise#3341

Adds a new section to the Metadata component for OCI Repositories for clarity - we were previously displaying revision and source in the info list, but folks were expecting to see it in Metadata (which only recognizes our metadata.weaveworks prefix).

image

@joshri joshri added the area/ui Issues that require front-end work label Sep 11, 2023
Copy link

@jpellizzari jpellizzari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 No blockers, just nits.

ui/components/Metadata.tsx Show resolved Hide resolved

const MetadataSection: React.FC<{ title: string; items: [string, any][] }> = ({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is any type really valid here? If I pass in { foo: { bar: 'baz' }}, will the component render OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was any bc we're turning some of the values into links - I can change it into string | JSX

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the sake of accuracy, I like string | JSX. That way the next person has an idea of what they can pass in.

@yiannistri
Copy link
Contributor

yiannistri commented Sep 12, 2023

@joshri fyi weaveworks/weave-gitops-enterprise#3341 (comment)

Maybe we should just show all annotations as key value pairs, while giving precedence to the pre-defined ones (that start with org.opencontainers.image), wdyt?

@joshri joshri merged commit 897cef1 into main Sep 12, 2023
15 checks passed
@joshri joshri deleted the 3341-oci-metadata branch September 12, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui Issues that require front-end work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Surface OCI artifact metadata in OCIRepository details page
3 participants