-
-
Notifications
You must be signed in to change notification settings - Fork 399
Feature(#630): Show brand for ingredients #1203
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
Merged
rolandgeider
merged 6 commits into
wger-project:master
from
anjakDev:feature/630-show-brand-for-ingredients
May 27, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
06e83a4
feat: adds brand field to ingredient model
anjakDev 1457760
feat: displays brand name next to ingredient name in search list
anjakDev 8b5a381
feat: displays brand name underneath title in ingredient details
anjakDev 10cb77c
chore: add tests for changes related to brand field
anjakDev a699fd4
chore: fix formatting
anjakDev 70a5ae3
fix: use theme color for brightness mode compatibility
anjakDev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Is there a reason you added this in the title? Unless it breaks the UI (which I didn't test), I'd vote to simply show the brand insubtitleNevermind, we already have a subtitle
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.
haha yeah, I saw the subtitle is used for the chips/tags, and I thought a while about what the best design choice is of where to put the brand, but adding it to the subtitle felt too crowded and also mismatched with the chips, and I didn't want to add a 'third' row as it would just increase the per-item space too much. Since most items tend to have a short(er) name, I think
nameandbrandsharing the title space looked okay. I'm open to suggestions though!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.
no, you are right, the name and the brand belong more together.
If you want to fix a small thing, instead of changing the alpha here, use the color from one of the
Theme.of(context).colorScheme.xyz(I thinkonSurfaceVariant?), then this also automatically works on the dark modeThere 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.
Good point! I fixed it with the latest commit. I decided to still modify the alpha channel a little in the
ListTiletitle, because otherwise I felt like there was too little contrast between the ingredient name and the brand (since they are sharing a line). For theIngredientDetailsview, I useonSurfaceVariantunmodified, since it's positioned in the line below and has smaller fontSize anyway.