CleverCloud / clever-components

Collection of Web Components by Clever Cloud
https://www.clever-cloud.com/doc/clever-components/
Apache License 2.0
215 stars 19 forks source link

cc-domain-management: init component #1090

Open florian-sanders-cc opened 2 weeks ago

florian-sanders-cc commented 2 weeks ago

Fixes #1095

How to review?

A few specific questions

No columns for badges ![No columns for badges](https://github.com/CleverCloud/clever-components/assets/100240294/cf7acf3b-a18e-4b83-a3c2-5fdd33cc9d60) **Issues:** Some people are triggered by the "misaligned" aspect. Note that the more you think about it the more you find it annoying but as a user, there are similar cases that I had never noticed as annoying, for instance in GitHub PR view: ![GitHub PR view](https://github.com/CleverCloud/clever-components/assets/100240294/1780263e-07cf-491d-b985-d371f1b83f68)
Column dedicated to primary badge ![Grid - column dedicated to primary badge](https://github.com/CleverCloud/clever-components/assets/100240294/1ee8e24a-18f4-433a-ac1b-eb067f39aa33) **Issues:** Considering "primary" can only applied to one row and that it is always the first row, it feels weird to dedicate a column to it.
Align right for badge columns ![Align right](https://github.com/CleverCloud/clever-components/assets/100240294/309d6e4d-7212-465a-8fa3-be50eb8a1e0c) **Issues:** Badges are pretty far from what they are directly related to: the domain.
My personal preference if you wanna know 1. cards 2. grid as within the preview (primary inlined with the domain name + column for badges, left aligned). 3. grid with no columns for the badges, all inlined next to the domain, GitHub's way

Card design

@hsablonniere has suggested a few nice improvements for the card design, feel free to give your opinion about these as well

Issue with domain names wrapping When there's not enough space (small viewport or long domain name), the domain name wraps to a new line. Sometimes the link icon ends up alone on a line, sometimes the path prefix ends up on a line. We cannot really prevent that but we can improve the design so it happens less often by making the domain name span accross the whole width and position the buttons below it: ![domain cards with domain name spanning across the width and buttons below](https://github.com/CleverCloud/clever-components/assets/100240294/eb8d7ed0-5609-4432-8cf3-9d9af1963301)
Gap between cards or not When there's only one column (small viewport), should we remove the gap between cards and make it look like a "table"? ![domain cards below each other without any gap between them, only borders](https://github.com/CleverCloud/clever-components/assets/100240294/17190cb4-71d6-424a-a023-7a552723e294)

TODO Flo