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
Use SVG icon instead of font icon in modeladmin index view #7562
Conversation
Manage this branch in SquashTest this branch here: https://jeromelebleufeatmodeladmin-ind-b64hj.squash.io |
119ff13
to
c4350d5
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.
@jeromelebleu just one comment for now about editing the changelog, it is blocking the CI runner.
I see there is a larger discussion about icons via #7565 so will let that resolve before looking into this further.
However, as per that discussion I noticed that the fa icons did not work with this change but the built in SVG icons did.
Another idea might be to try to leverage the header shared include even more, although it does require a change to that include.
See patch
idea-modeladmin-header.patch.txt
c4350d5
to
4cc4704
Compare
Thanks for your comments @lb-!
I think this PR can be treated separately as it does not target the same components.
I don't use fa icons but I understood that wagtail-font-awesome-svg should work, is it the case?
I don't really see the goal of your proposal; this new template - |
@jeromelebleu thanks for the response above, just ignore that patch suggestion, my thinking was it would be good to leverage the shared includes for all headers but that is not really the purpose of this PR. |
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.
LGTM.
There is a minor (.2px) discrepancy between the final h1 size, but with this version the icon and the heading are better centred next to each other
- This uses the same classes and tags than 'wagtailadmin/shared/header.html' - constructs the <header> element and its children and blocks to that convention
4cc4704
to
2c239cb
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.
@jeromelebleu thanks for your work on this and responding to feedback. @zerolab I have taken a look and think this looks good. As per discussion on other items I think we are now all in with SVG icons.
I have updated this branch with release notes, rebased on master and will merge in.
This uses the same classes and tags than
wagtailadmin/shared/header.html
to construct the<header>
element and its children.Contribute to #6107.