A better approach for content authoring in Merch cards. #1799
-
Last year, we (Milo commerce team) introduced a new way to author content inside Merch cards that we thought would enable to be consistent with the Consonant specs. This thread is a follow-up to open for discussion a possible new, better way to create merch cards in Milo using Sharepoint. By going with this approach, it is guaranteed that the authored content will match the Consonant design specs, which is the direction we were given by the Studio team.
Since the solution for number 2 is to rewrite the tag names of the headings in a cascading order, an idea came to my mind when reading @rgclayton's comment in my PR, which is to replace the one-to-one mapping approach with a variant-specific mapping that contains the exact heading names in the correct order. And the variant mapping would be something like: With this approach, which would be backward-compatible, authors won't have to worry about which heading they must choose to have their merch cards display content properly. As always, we would love to hear other's feedback. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
hey @Axelcureno i think i like this better, even if the point you mentionned:
gets even more true in that case, as here there would several orders to memorize. This said though this gives more importance to the variant, and once known i guess there will be no problem. side note:
This sounds like lit or web components or both are preventing us to do something. I would rather say this technical limitation is added by us, to reflect a business limitation if you want to call it like that, that is consonant design. |
Beta Was this translation helpful? Give feedback.
-
One thing came to my mind though, @Axelcureno : if i need to put price in heading-m area let say, with the title, this would be handled by your slot sequence? |
Beta Was this translation helpful? Give feedback.
-
I love this idea. |
Beta Was this translation helpful? Give feedback.
-
@npeltier We solved this problem is 2021 where an author could make any heading for SEO reasons, but the styling remained on brand. @Axelcureno is 100% right to call this a limitation of Lit & Web Components (really, the use of slots). If these were built with vanilla JS, this wouldn't be an issue. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/adobecom/consonant/blob/main/blocks/marquee/marquee.js#L32-L34
|
Beta Was this translation helpful? Give feedback.
I love this idea.
With this approach, once PR is merged, GWP can go and progressively update
H2
s toH3
s without fearing that this would break anything.However we should be careful and check ahead whether this would break any existing card.