-
Notifications
You must be signed in to change notification settings - Fork 2
Add human readable labels to filter headings #3644
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
Conversation
2d8742b
to
0f7e5d7
Compare
0f7e5d7
to
6ff6b84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some questions around design background / considerations. I believe mostly around labels mapping.
Relevant facets design looks good to me, however testing i could see that Explorer page gives me less filters than expected:

I also tried to filter by template type without results but i expect one:

Last point: to review extending explorer documentation in case of needs update.
@@ -277,6 +280,9 @@ var ( | |||
"weave.works/template-type", | |||
}, | |||
Category: CategoryTemplate, | |||
HumanReadableLabelKeys: map[string]string{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please share your design considerations for adding it here vs other solutions like extending changing from Labels: []string{
to Labels: []label{
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seemed like overkill for a Label
to be a first class object. I can see how it might be useful though. I will take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@enekofb Took a pass at this and it involves a lot of cross cutting changes, specifically to converting store.Facets
from a generic map[string][]string
into a proprietary struct
. I think as it is in this PR it is a bit simpler.
Mind if we address in a follow up instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, i think that we could take this opportunity to kind of review our domain model and api ... let me setup something next week to pair on it
@enekofb I cannot reproduce. Explorer is working as expected in my environment. Maybe we can screenshare to figure it out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic Jordan. Tested again and works now 🪂
Thanks for adding the tests.
d169c5a
to
46c5bc6
Compare
Closes #3590
Closes #3583
Adds human readable labels to the explorer filter, and removes facets that aren't relevant for a category.
Here is the

Templates
view; notice the "Template Type" label:Here is the

Applications
view with the irrelevant facet removed: