-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat(cards): refactor cards with content block - FRONT-3606 #2469
Conversation
@@ -193,9 +207,23 @@ export default { | |||
decorators: [withCode, withNotes], | |||
}; | |||
|
|||
export const Card = (args) => card(prepareData(dataCard, args)); | |||
export const Default = (args) => card(prepareData(dataCardDefault, args)); | |||
|
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.
At this point i wonder about the reason why having multiple stories in card. I find that confusing considering that all the optional content of a card has toggles to show/hide them, i think that one single story "default" would be enough, but you probably based also on requests by comm, so just a personal thought..
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.
I won't say that this is a "request", but all their design mention 3 examples of cards (default, tags, list), so I guess that having them with the same naming would avoid some discussions
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.
It seems all good to me, i do have a concern regarding the markup, though, but it is coming from the content block, we have now these very long class names ex: ecl-content-block__secondary-meta-container and this code is going to be everywhere making the source code "heavier" although semantically correct.
wouldn't it be good to have a test also with the "old" data to check the backward compatibility of this implementation..? |
Update card component, to rely on the new content block element
Important:
Data structure has been updated/simplified (), but a temporary backward compatibility has been provided to avoid breaking changes.
Main modifications in data: