Closed (fixed)
Project:
Claro
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Jan 2019 at 19:25 UTC
Updated:
8 Oct 2019 at 10:24 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #2
antonellasevero commentedComment #3
saschaeggiThis is not yet ready from a design side
Comment #4
lauriiiWhere's the card component used? Would it be possible to get more background information about the component in the issue summary and/or link to Figma?
Comment #5
ckrinaComment #6
L2G2Comment #7
L2G2The first pass of the component has been updated in the Figma file, see file above ^^ for reference.
My initial thoughts:
Comment #8
saschaeggi@l2g2 thanks for your design proposal. I've left a comment in Figma regarding some questions. cheers :)
Comment #9
L2G2The second pass of the cards has been implemented in the Figma document.
There are 3 different layouts, with different spacing scales.
Within those options, they were split into a single column, two column, and four column layout.
Screenshot of 3 options in single column layout attached for reference:
Comment #10
L2G2Next version of feedback and adjustments has been implemented. The feedback can be found in Figma on the artboards Card 02.2 and Card 02.3.
Reminder for the variety of card layouts:
Adjustments in Card 02.2:
Adjustments in Card 02.3:
There is a screen shot attached for a quick-look, but take a closer peek in Figma! I think we are at the finish line with these, next steps is to move into the Final components category pending any last words of wisdom/feedback.
@saschaeggi @ckrina
Comment #11
L2G2Comment #12
L2G2Comment #13
L2G2Comment #14
kristen polBased on the comments above, I think this needs to go back to needs review.
Comment #15
volkerk commentedAs discussed with @lauriii, this should be ready for implementation.
I will start working on it.
Comment #16
volkerk commentedComment #17
fhaeberleI'll continue on this.
Comment #18
antonellasev commentedComment #19
fhaeberleI did a start on this to apply the styles to the theme section as I think this is the main purpose of this issue (maybe the issue title is a bit misleading).
I left some tasks because I think this first needs a review.
TODO:
1. style the action links as buttons (apply the button classes to the links)
2. apply different spacings based on card with image (spacing m) and without (spacing l) and different padding spacings for horizontal alignment and vertical alignment
3. accessibility and ltr/rtl check
For point 2: This is a bit confusing in the design. There are different padding spacings for cards with image and without and different padding spacings for horizontal view and vertical view. Check 1col vs 2col vs 4col. Can we agree on a more unified spacing?
Comment #20
finnsky commentedComment #21
finnsky commented1) from my point of view if we have totally override in template we may use .card and .card__image classes in addition to .theme-info etc.
2) also it seems me useless to have same code in 2 places (it also duplicated in css/dist/components/system-admin--appearance.css)
Comment #22
finnsky commentedReworked this patch because i'm sure that Card component can be useful in other places aswell.
TODO:
Uninstalled themes fullwidth on mobile, 2 cols on 768-1200, 4 cols on 1200+
Comment #23
ckrinaAnswering #22, the installed themes should ideally go with the 2 col horizontal, and the uninstalled with 4 col vertical.
Also, about the min-with: 100%, I agreed on that it's not a good solution: we shouldn't be scaling up images. But also images shouldn't be smaller than the card, so maybe different breakpoints should be used.
Also reviewing the patch I see all cards that are using the regular button size and only the full width one should be using a smaller button size.
About the question previously raised about making all paddings the same, I've aligned most of them to the L space (24px/1,5em) and but one of them can't be aligned: the one on in the 2 col Horizontal because we really need the space when we have images + long texts.
Thanks all for all the great work!
Comment #24
finnsky commentedComment #25
finnsky commentedHello all!
1) Added `button--small` class by default for buttons. We don't have fullwidth card here. So seems all buttons are small.
2) Added marginless `card__button--last` class since buttons rendered inside list and it is better to remove last item margin.
Actually it seems me wrong to add margin to button component by default. And it is obviously antiBEM. But it isn't problem of current component.
3) Managed layouts.
Now: installed themes
1 item on 0-587px(screenshot width) and vertical display
1 item on 588px-1365px and horizontal display
2 items on 1366px+ and horizontal display
uninstalled themes always vertical
1 item on 0-587px
2 items on 588px - 1199x
3 items on 1200px - 1365px (i had to add 3 items in list to avoid image stretch)
4 items on 1366px+
4) Managed headings used .heading-f system class. Will it be supported in future?
5) Added twig condition to know when image on the place. to make content pading smaller.
6) Tested in latest safari, opera, chrome, ff, edge(looks good)
...and IE11(looks more or less, after setting max-width to grid items).
Please test
Comment #26
huzookaReviewing.
Comment #27
huzookaRe #25:
This is a huge step forward, thank you all!
Issues that should be resolved:
We replace the whole
system/adminlibrary with our ownclaro/system.admin.The
system-admin--appearance.cssis one of the CSS asset in that replacement library.With the current implementation, since card and card list styles are provided by Claro's global styles, these are loaded unconditionally, for every page, but I don't think that this is a good practice.
Instead of adding these to global styles, I ask you to define a standalone library for card and card-list components, and add this new library as dependency to our
claro/system.admin. This way we wont bloat our global styles.I find this a little dangerous: this hook is too general.
Please implement
template_preprocess_system_themes_page()instead of this and make the needed modifications there!I think that we don't use
.theme-selector,.theme-default,.theme-admin,.theme-info.theme-info__header,and.theme-info__descriptionCSS classes anymore. If I'm right, please remove these from the template!I would separate card component styles and card-list layout styles completely, including their usage in the template.
So instead of adding the
.card-list__itemlayout style to the.cardcomponent root, use a standalone .card-list__itemelement (<div class="card-list__item">) and wrap.cardinto that!This is a really wrong combination.
Why are these needed?
This is not a blocker, just my opinion: I'd use the
flexshorthand instead offlex-grow,flex-shrinkorflex-basis(just because it's easier to track what's happening and why) if they aren't needed because of a special concept.16px, it will be really hard to use this page!A working approach can be found here (/css/src/layout/system-admin--layout.css).
1reminstead of1.5rem)Comment #28
finnsky commented3. I mentioned in #22 that backend should be updated.
5. It may need some additional properties and from bem side it is normal to mix elements with blocks. But yeah - why not.
6. white-space: nowrap; was needed because sometimes button became 2 lined what looked ugly.
7. Shorthand flex not works well with IE
Gonna prepare next patch tomorrow.
Comment #29
finnsky commentedComment #30
finnsky commentedHello. Thanks for review.
1) Fixed. But maybe new one appears. Please check
2) Removed. But system-admin--appearance.css still contains only themes related component, and not related to cards as is. So idk what to do with it
3) Replaced. Looks ugly:) Backenders please help.
4) "If I'm right, please remove these from the template!" i don't know how to check it. Keeped as is for now.
5) It will make things more complicated. And will not give lot of clean. Since as i said it is ok to mix Blocks and Elements because their properties are different.
So here .card-list__item->`external geometry` and .card->`inner styles` So we shouldn't have collisions.
Otherwise we will need to add additional styles to cover flexbox stretches.
6) overflow: hidden; removed. white-space: nowrap; keeped because it is required to have button in one line.
7) Keeped as is to support IE 11
8) Updated.
9) Added styles for small screen only, Cards looks good on bigger screens even with toolbar.
10) Updated.
Comment #31
ckrinaFrom previous comments:
6.
overflow:hiddenis needed for aesthetic purposes. Andflex-wrap: wrapis used to be sure the buttons jump into a new line. So I don’t see anything wrong combining them.Related to this, Ive seen now the card has
border-radius: 2px 2px 0 0;. This is wrong: if you zoom in on Figma spec you’ll see all 4 corners have the same border radius :)So I'd suggest setting
border-radius: 2px;andoverflow: hidden;on the.carditself, but if you want to also avoid @huzooka's concern you could move theoverflow: hiddento the image wrapper.card__imageand move there the top&bottom left border radius there too.New comments:
11. We shouldn't be using the word buttons to define the region
.card__buttons. Actually, they actually shouldn’t be buttons based on #3030987: Refactor usage of button component on links. I’ll create a follow-up to change the appearance of the links/buttons because I think it’s out of the scope of this issue and it'll need design discussion.So I propose using
.card__footeror.card__actionsbecause it’s more generic and can handle also links too.12. We're setting the width for the
.card__imageto 45% from min-width: 85.375rem. So it means we should add:Thanks for all the work on this!
Comment #32
finnsky commentedComment #33
finnsky commentedFixed according #31
Comment #34
ckrinaThanks @finnsky!
1. Sorry for jumping on it later, but after discussing it with @lauriii we think cards should also use Action links on the Appearance page because of #3030987: Refactor usage of button component on links. So the buttons should changed to Actions links in this issue. Here’s the updated design, but probably we should get #3036732: Action link component before moving forward with this one.

2. Breakpoints: on the installed themes section, I think the card should jump to use the 2 cols sooner: probably around 940-960px. Otherwise the thumbnail is too big.
Comment #35
lauriiiHow should we deal with extra-wide monitors? The same issue where the thumbnail renders too large happens on two-column cards on screens widger than ~1920px.
Comment #36
ckrinaI didn't thought on that. I'd say let's add a max-width to the cards, and if they don't reach the end of the page it's OK.
Comment #37
lauriiiSounds good. Could we describe this in the design system? We should know what's the max-width, and how the elements are positioned when they are smaller than the page width.
Comment #38
lauriiiDiscussed with @ckrina and she opened #3076820: [META] Layout redesign as a result. We decided to not worry about the large screens on this issue since it should be addressed globally.
Comment #39
ckrinaAfter a discussion with @lauriii we agreed on moving the actions (buttons and Action links) to the right to avoid to modify the left padding on Action links. Here's the screenshot, but it's already changed on Figma's specs.
Comment #40
huzookaComment #41
huzookaI'm a bit surprised why #30 removed 'details.css' from global library assets and added 'card.css' instead of that...
That's completely wrong. But we need a re-roll here.
Comment #42
huzookaHere's the re-roll of #30.
Comment #43
huzookaComment #44
huzookaRunned into an IE11 flexbug: https://github.com/philipwalton/flexbugs/issues/233.
Comment #45
huzookaComment #46
huzookaScreenshots attached.
Comment #47
ckrinaThe patch doesn't apply anymore.
Also, cards without image should not have an image. See specs:

PD. Thanks for the screenshots, really useful to review the design!
Comment #48
huzookaRe #47:
A card component without an image wont have the 'no-screenshot' placeholder. But for themes, core adds this image if the theme does not define a screenshot path.
Do you want Claro to remove those 'no-screenshot' images for theme cards?
(BTW we're hard-blocked here because of this appearance page lacks of spacing documentation.)
Comment #49
kostyashupenkoLooks like reroll is not needed against 8.x-1.x, i can apply patch from #45
Comment #50
lauriiiTalked with @ckrina and she said that we could remove the no-screenshot image in a follow-up.
We also need another issue for fixing the heading spacings. We probably shouldn't commit this issue before that has been committed to avoid regressions on the appearances page.
Comment #51
lauriiiOpened #3083004: Update heading spacings and #3083003: Remove default no-screenshot image on appearance page.
Comment #53
lauriiiThis looks good now. I made minor code style improvements on commit. Interdiff attached. Thank you all!