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 deprecated stack filter on the registry-viewer and fix deprecated Color #122

Merged
merged 11 commits into from
Apr 15, 2024

Conversation

thepetk
Copy link
Contributor

@thepetk thepetk commented Apr 12, 2024

What does this PR do / why we need it

This PR adds a filter inside the registry viewer so we can filter out deprecated or non deprecated stacks. A deprecated stack is considered when the Deprecated tag is added on the default version main tag section.

Note that if all the stacks are deprecated or non-deprecated the filter is not appearing (this is the default configuration for our filters)

Example image:
image

An additional fix for this PR is the deprecated color. As it can be seen here the deprecated color is not visible.

The fix simply hardcodes the 2 cases of tag colors (following all other cases of style classes) so tailwind can load them when we run the project.

Which issue(s) does this PR fix

Fixes devfile/api#1064

PR acceptance criteria

  • Unit Tests
  • E2E Tests
  • Documentation
    Update the sidebar if there is a new file added or an existing filename is changed

How to test changes / Special notes to the reviewer

To test the changes someone should:

  • Run minikube locally.
  • Build a new image of registry with a stack that is deprecated (currently all stacks are not deprecated).
  • Deploy a registry deployment to minikube
  • Run the registry viewer locally with:
DEVFILE_REGISTRIES='[{"name":"Community","url":"http://<your registry's address>","fqdn":"/<your registry's address>"}]' yarn nx serve registry-viewer --configuration=development

@openshift-ci openshift-ci bot requested review from elsony and Jdubrick April 12, 2024 13:44
@thepetk
Copy link
Contributor Author

thepetk commented Apr 12, 2024

Will investigate too why the color of the Deprecated tag is not visible and try to add a quick fix in the PR too

@thepetk thepetk force-pushed the ft/update_filters branch from a464ac6 to 9fdd935 Compare April 12, 2024 13:47
thepetk added 4 commits April 12, 2024 14:58
Signed-off-by: thepetk <[email protected]>
Signed-off-by: thepetk <[email protected]>
Signed-off-by: thepetk <[email protected]>
Signed-off-by: thepetk <[email protected]>
@thepetk thepetk changed the title Ft/update filters Add deprecated stack filter on the registry-viewer Apr 12, 2024
Signed-off-by: thepetk <[email protected]>
@thepetk thepetk changed the title Add deprecated stack filter on the registry-viewer Add deprecated stack filter on the registry-viewer and fix deprecated Color Apr 12, 2024
Copy link
Contributor

@Jdubrick Jdubrick left a comment

Choose a reason for hiding this comment

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

/lgtm

I was able to spin up the viewer after altering the registry to ensure there is a fully deprecated stack and can confirm the option is there and properly filters the stacks shown based on what box you tick. I also tried it without altering the registry and the options don't show up on the side as expected.

You can see the filtering in action here:
Screenshot 2024-04-12 at 3 44 34 PM

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

/lgtm

Also tested against our test registry and verified that deprecated filter works as intended.

Looks good @thepetk!

Deprecated Stacks

image

Non-Deprecated Stacks

image

Copy link

openshift-ci bot commented Apr 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jdubrick, michael-valdron, thepetk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Jdubrick,michael-valdron,thepetk]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@thepetk thepetk merged commit c3af943 into devfile:main Apr 15, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Viewer support for deprecated devfile stacks and samples
3 participants