-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Admin] Improve breadcrumbs (especially for ProductVariants and PromotionCoupons) #10512
Conversation
src/Sylius/Bundle/AdminBundle/Resources/config/routing/product.yml
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/AdminBundle/Resources/config/routing/promotion.yml
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/AdminBundle/Resources/views/Product/Update/_breadcrumb.html.twig
Outdated
Show resolved
Hide resolved
IIRC the reason to use codes was to avoid issues when editing. Because if you try to change name to empty, the breeadcrumb will take the data from the entity, which will have empty value bound by the forms logic... :) |
@pjedrzejewski |
The editing issue is very minor compared to the logic of displaying codes (that are an internal property used for processing things), while we have names (that are designed to be displayed everywhere). :) I guess the weirdy forms' logic is not an issue that should be solved by displaying our immutable codes instead of names. Although I will use the tip from @vvasiloi for now, thanks 💪 |
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.
Could you provide some "before" and "after" screenshots? 🐎
src/Sylius/Bundle/AdminBundle/Resources/views/ProductVariant/Update/_breadcrumb.html.twig
Outdated
Show resolved
Hide resolved
@CoderMaggie rebase should fix the build :) |
22b2749
to
14dab4b
Compare
Thank you, Magdalena! 🎉 |
The clue is to use entities names instead of codes, wherever it is possible. especially in entities that are under other entities like coupons or variants.
Product variant edit:
![image](https://user-images.githubusercontent.com/13198869/61623526-14b4f500-ac77-11e9-88a4-ec177f812be9.png)
Before:
After:
![image](https://user-images.githubusercontent.com/13198869/61623469-fb13ad80-ac76-11e9-8df2-be7bd89532f1.png)
Without the variant name:
![image](https://user-images.githubusercontent.com/13198869/61623756-9147d380-ac77-11e9-83d0-b8c3144f45b0.png)
Channels edit:
![image](https://user-images.githubusercontent.com/13198869/61623602-3c0bc200-ac77-11e9-853b-a8611e789927.png)
Before:
After:
![image](https://user-images.githubusercontent.com/13198869/61623651-5b0a5400-ac77-11e9-893b-bc9fe32b724a.png)
And while trying to unsuccessfully remove the name:
![image](https://user-images.githubusercontent.com/13198869/61623693-71181480-ac77-11e9-9f0d-e27b6582d685.png)
After (translation of names to Admin locale)
![image](https://user-images.githubusercontent.com/13198869/61624020-159a5680-ac78-11e9-9425-60b159f5f556.png)
![image](https://user-images.githubusercontent.com/13198869/61624038-21861880-ac78-11e9-9e5f-9b1be0100220.png)
![image](https://user-images.githubusercontent.com/13198869/61624000-0adfc180-ac78-11e9-8458-2d1788b31a10.png)