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
Fixes #25543 - Breadcrumb switcher doesn't work for filters #6407
Conversation
Do not merge! This patch has not been tested yet. Can an existing organization member please verify this patch? |
2 similar comments
Do not merge! This patch has not been tested yet. Can an existing organization member please verify this patch? |
Do not merge! This patch has not been tested yet. Can an existing organization member please verify this patch? |
Issues: #25543 |
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
ok to test |
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.
Thanks @MariaAga !
I left few inline comments :)
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.
Thanks @MariaAga !
Test failures are related
@MariaAga please fix the rubocop violation |
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.
I'm still not sure if we should be using translated values here. In my experience having a simple model which is nil or an actual value is better. Then when you need to present it to the user, you actually ensure there's a good value. A helper for this (like display_resource_type
) can make sense. Converting from a presentation value back to an actual value is a recipe for problems that are hard to trace back.
2b50952
to
dd6440a
Compare
@ekohl can you take a look? It is now only translated when the value is presented |
@ekohl can you have a look please? |
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.
I'm still not sure about magic strings, just that my computer science professor would fail me if I tried to use them. Generally they're very fragile because you can't really trace the data flow. Adding translations into the mix just screams for bugs. I don't know the code base well enough to say anything useful about whether it would break but only translating it in the presentation (views) is usually the correct way.
@ekohl, instead of all the string handling I added a field |
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.
This looks like the correct approach Small questions but no objections to merging.
What is the status here? |
@xprazak2 I think this is ready for merge, but would prefer someone else to do a final review and merge it. |
Works well, I just left one inline comment. After that, I think we can merge. |
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.
Looks like my comments were addressed. Did not test again.
Thanks everyone! |
When editing a filter
/filters/<id>/edit
, the breadcrumb-switcher showed blank lines in the results box.Also changed breadcrumbs in filters from "filters > filter" to "Roles > role Filters
Edit filter Filter" since filters are a part of roles and aren't a standalone.