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

Use null rather than empty string for unspecified namespace #77

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

edbaunton
Copy link

It's possible for (arguably misformed) package metadata to have the empty string as the namespace. This can happen for example when ingesting an OCI image that does not have the correct repository URL specified.

Currently guac-visualiser does not let you pick beyond a namespace that is the empty string: it would not make the "package name" dropdown sensitive (although it would correctly populate the options from the GraphQL response).

This commit updates the "empty" state for the package name option from the empty string to null (like is used for version). Then update the disabled param to be determined on whether the namespace is null (rather than the empty string).

It's possible for (arguably misformed) package metadata to have the
empty string as the namespace. This can happen for example when
ingesting an OCI image that does not have the correct repository URL
specified.

Currently guac-visualiser does not let you pick beyond a namespace
that is the empty string: it would not make the "package name"
dropdown sensitive (although it would correctly populate the options
from the GraphQL response).

This commit updates the "empty" state for the package name option from
the empty string to null (like is used for version). Then update the
`disabled` param to be determined on whether the namespace is null
(rather than the empty string).

Signed-off-by: Ed Baunton <[email protected]>
@edbaunton edbaunton force-pushed the edbaunton/empty-namespace branch from 418bd12 to e0a85a3 Compare December 14, 2023 17:54
@lumjjb
Copy link
Contributor

lumjjb commented Jan 16, 2024

hmm i think in the graph data model i think we don't have a null and default to "" in the backend as well. Thoughts @pxp928 @trmiller

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

Successfully merging this pull request may close these issues.

2 participants