note that this QA should be done using the console (links to specific cases are available within the docs).
At least 4 or 5 reviews are required for this PR.
A few specific questions
Component naming, should we got for cc-domain-list instead? It feels more consistent even though it doesn't only deal with the list of domains.
The API sends us the domain & path concatenated into a single fqdn property:
to display the domain name and the path prefix separately and differently within the list, we need to have two separate properties (domain & pathPrefix). Internally, within the component, the pathPrefix can never be null or empty because it's always at least /.
for the API, the pathPrefix thing does not exist and we have to concatenate (+ encode :-1: ) everything. When no path prefix is set, there is no trailing slash within fqdn.
Question: do we keep fqdn naming or do we change it? At first I went with domainWithPathPrefix but it creates confusion because it's not an actual concatenation of domainName + pathPrefix. I opted to keep fqdn even though I don't like the naming because it highlights that this comes from the API. This is some kind of unique identifier we use to communicate with the API but we don't actually use it apart from within the smart.
Note that in the future, we'll propably add more badges (DNS config status, certificate status) and action buttons will be regrouped into 1 menu button.
I have tried several options for the grid version, none of which totally convinced me so far:
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
[ ] update smart doc with proper links
[x] rebase once forms have been merged
[ ] run prettier once all reviews & feedback have been processed.
Fixes #1095
How to review?
A few specific questions
cc-domain-list
instead? It feels more consistent even though it doesn't only deal with the list of domains.fqdn
property:domain
&pathPrefix
). Internally, within the component, thepathPrefix
can never benull
or empty because it's always at least/
.pathPrefix
thing does not exist and we have to concatenate (+ encode :-1: ) everything. When no path prefix is set, there is no trailing slash withinfqdn
.example.com
:{ fqdn: 'example.com' }
{ fqdn: 'example.com', domainName: 'example.com', pathPrefix: '/' }
fqdn
naming or do we change it? At first I went withdomainWithPathPrefix
but it creates confusion because it's not an actual concatenation ofdomainName + pathPrefix
. I opted to keepfqdn
even though I don't like the naming because it highlights that this comes from the API. This is some kind of unique identifier we use to communicate with the API but we don't actually use it apart from within the smart.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 wayCard 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