Describe your bug or feature request.
In commerce-order--admin.html.twig all <details> classes are written to work with the seven theme (ie. seven-details, seven-details__summary).
I' m using the Claro as administration theme and, on the admin order page, all sidebar <details> (Customer Information - Billing Information etc.) haven' t the appropriate styles.
If a bug, provide steps to reproduce it from a clean install.
- Set Claro as Administration theme
- Visit admin/commerce/orders/(order id)
I solved the issue with this patch. It contains these changes:
1) Passes the machine name of the current theme to commerce order templates.
2) Replaces old classes (seven-details etc.) with the current_theme_name variable ({{ current_theme_name }}-details etc.).
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | patch-8-gin.png | 149.72 KB | nicolasgraph |
| #9 | 3204355-9-commerce-order-admin-template-details-broken-styling.patch | 11.18 KB | nicolasgraph |
| #9 | patch-8-claro.png | 80.89 KB | nicolasgraph |
| #8 | no-patch.png | 21.01 KB | nicolasgraph |
| #6 | 3204355-6-commerce-order-admin-template-details-broken-styling.txt | 5.31 KB | nicolasgraph |
Issue fork commerce-3204355
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
frankdesign commentedThanks for the patch. Problem for me though is that I am using a sub-theme of Claro, so my class names with your patch are "claro-sub-details" rather than "claro-details" etc... Is there any way to use the Claro theme name as per classes on all other ?
F
Comment #3
nicolasgraphIt is missing some more markup and the current theme name is not passed to commerce-order--admin.html.twig.
Comment #4
nicolasgraphHere it is.
Comment #5
nicolasgraphAnd here is the interdiff.
Comment #6
nicolasgraphUsing the current theme is actually not a good idea as Gin use the claro classes.
Comment #7
nicolasgraphHere are some screenshots without the patch using Claro, and with the patch using Claro and Gin.
Comment #8
nicolasgraphComment #9
nicolasgraphHere is a try to get some more enhancements to the order layout.
Comment #10
nicolasgraphComment #11
jsacksick commentedThe patch should be updated following the layout changes introduced in 2.39 and subsequently in dev.
So I wonder if we should be hardcoding Claro, and then experience the same issue later, or hardcode claro + another class name that includes the current theme name...
Comment #16
jsacksick commented