Skip to content

Add Artifact Metadata section to OCI Repository detail pages#4002

Merged
joshri merged 4 commits intomainfrom
3341-oci-metadata
Sep 12, 2023
Merged

Add Artifact Metadata section to OCI Repository detail pages#4002
joshri merged 4 commits intomainfrom
3341-oci-metadata

Conversation

@joshri
Copy link
Copy Markdown
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
Copy Markdown
Contributor

@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.

Comment thread ui/components/Metadata.tsx
Comment thread ui/components/Metadata.tsx Outdated
return metadataCopy;
};

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

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
Copy Markdown
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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
@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