-
Notifications
You must be signed in to change notification settings - Fork 667
Card styling/UX improvements #16983
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
Card styling/UX improvements #16983
Conversation
e1be431
to
bbbee69
Compare
Consistent with cards, and fixes a bug where element chips would lose their hyperlink on re-render
233d0fe
to
aa78de3
Compare
Brilliant thanks @brandonkelly |
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.
Only a few of issues that I noticed:
- when you create a new nested entry in a matrix field (view mode cards) for an existing or brand new root entry, once the nested entry is saved, you can’t use the actions menu (3 dots); the edit icon triggers two edit slideouts, reordering doesn’t seem to work (via diamond icon); once you reload the page (or save the root entry), all of the above starts working as expected
- matrix in cards view mode (with the standard title field), when you duplicate a nested entry via actions menu > duplicate, it shows the title as hyperlinked; if you reload, the hyperlink is gone; same with copy and paste; this doesn’t happen when duplicating in the element index view mode;
- if you’ve chosen to show Entry Type in the card and you’re logged in as a non-admin, the Entry Type name is hyperlinked, but you don’t have permissions to edit Entry Types; maybe it would be best not to hyperlink it for non-admins?
- if we’re hyperlinking the Entry Type in the card, should we also hyperlink the Section (to link to the Section’s settings)?
- on the element index page in table view mode, there seems to be a large gap between the last item on the list and the footer
BTW, I love that you can click on the name of the entry type to edit it straight away (e.g. from the field edit page).
Once released, the CKEditor should be updated so that we don’t show the edit button and don’t hyperlink the title in the nested element cards.
Thanks @i-just!
Good catch. Looks like I introduced that in fd65d23 for #16893, so fixed on the 5.7 branch.
Fixed!
Doh, yeah. Updated all components’
Agreed. Updated
Are you referring to the 24px top margin on the footer? If so that’s intentional and hasn’t changed in 5.7 or this PR.
Yep. Actually it would be safe to update now. The instance config passed to showEditButton: false,
hyperlink: false, Those values will just be ignored if running < 5.7. |
Thanks! Looks like the edit icon still opens up two slideouts (when you create a new nested entry in a matrix field (view mode cards) for an existing or brand new root entry).
I meant the space between the last item and the footer. It looks about 15px taller on this PR vs 5.x branch. I measured the space between the bottom of the title and the start of the footer, and it’s around 30px on 5.x and 45px on this branch. (The
Yup, I already have it done locally :) I’ll PR it at some point today. |
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.
For a bit I tried to figure out if we could make matrix blocks and cards share the same rendering path, but it looked like that was a bigger job than was worth taking on right now.
Hi! I've noticed some bugs with the new styles:
In addition to the above I would like to make a proposal to add "White" to the available colors for entry types. Since the default now is implicitly "Gray", it would enable keeping the palette muted but have visual grouping and hierarchy by lightness as opposed to color, like in the example bellow: |
@i-just Doh, missed that. Fixed now!
@thupsi Thanks for testing! Fixed. |
[ci skip]
@brandonkelly I found another small CSS color bug. Text in CKEditor fields inherits the text color of the containing block: |
@thupsi Thanks, posted that on CKEditor’s repo: craftcms/ckeditor#390 |
@brandonkelly not sure if it's just me being a bit picky (apologies if I am!), but the font sizing of Blocks as inline-editable blocks feels a little off now to me. I made a few minor CSS changes using a CP CSS plugin to make a few adjustments. The sizing adjustments I made feel a little more in keeping with the spacing of everything else around it in my opinion. Just thought I'd share my opinions, hope that's okay! |
@iamtompickering Thank for the feedback. I prefer the smaller font size for entry type labels, as a way to set it apart from the tab labels, but I agree the tightened-up inline-editable blocks looks a bit better. So just made that change for the next release. (ea36d22) |
@brandonkelly completely fair and understand the logic behind it! I'm sure I'll learn to love the smaller font size! |
Description
Cards, chips, and inline-editable Matrix blocks are now styled more consistently:
A couple UX improvements are included as well:
Related issues