-
Notifications
You must be signed in to change notification settings - Fork 32
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
fix(DH): Make font-sizes and colors same across the expandable panel #660
Conversation
Affected libs:
|
Thanks @Angi-Kinas 1. D’où viennent ces données ? 2. Licence ou conditions d’utilisation ?
3. Détails Overall, fonts are 14px & 16px, but it's hard to understand strictly the mockup as the font is completely different 😄 |
Thanks @Angi-Kinas ! I'm wondering if the font sizes are not ok in this PR though @fgravin...
I think this will be handled by the theming config, no?
Lucile lately proposed in a JIRA comment to put it in primary color (and then same size as primary text in other panels, I guess). It would look more consistent if there was also a label inside the panel I guess. But primary in 14px won't look consistent neither I think. |
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.
All good on my side, thanks!
@@ -32,27 +35,30 @@ | |||
*ngIf="metadata.lineage" | |||
[title]="'record.metadata.origin' | translate" | |||
> | |||
<p class="mb-5 pt-4 whitespace-pre-line break-words" gnUiLinkify> | |||
<p | |||
class="text-gray-900 mb-5 pt-4 whitespace-pre-line break-words" |
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.
@@ -4,11 +4,12 @@ | |||
> | |||
record.metadata.about | |||
</p> | |||
<div class="mb-6 md-description sm:mb-4 sm:pr-16" *ngIf="metadata.abstract"> | |||
<div class="text-gray-900 mb-6 md-description sm:mb-4 sm:pr-16"> |
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.
The text should be the main
text color, I think it means that no color class is required.
We should not use text-gray
things I guess.
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.
The text should be the
main
text color, I think it means that no color class is required. We should not usetext-gray
things I guess.
the gray-900 is derived from the main color, so that should not be a problem. the main color is almost black and here we wanted a lighter color (as you also mentioned in your review).
cc @tkohr
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.
Ok, I thought using the main
color would allow more consistence with other components, but looking at the card on the home page we also use the derived text-gray-900
, so it seems ok to me, as long as we try to stay consistent with the derived grays ;-)
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.
Why do you remove *ngIf="metadata.abstract"
? Is it the abstract container or not ?
And yes, the abstract should have the main
color, and not text-gray-900
I guess.
I think the colors are:
-
Abstract title: black
Abstract content: main -
D’où viennent ces données ? title: black
Text underneath: main
Property label: grayer
Property color: primary
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.
The ngIf was not removed but just moved to the paragraph. Otherwise the content ghost will not be shown.
Regarding the colors:
main is almost black, so compared to the mockups it would be too dark.
Maybe we shouldn't use pure black
but main
because pure black is apparently bad practice and it's not dependent on the theme.
{{ metadata.lineage }} | ||
</p> | ||
<div | ||
class="py-4 px-6 rounded bg-gray-100 grid grid-cols-2 gap-y-[10px] gap-x-[20px] text-gray-700 info-grid" | ||
> | ||
<div *ngIf="metadata.recordUpdated"> | ||
<p class="text-sm" translate>record.metadata.updatedOn</p> | ||
<p class="text-primary font-medium mt-2"> | ||
<p class="text-primary font-medium mt-[4px]"> |
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.
mt-1
should be the same I think
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 think it is more explixit to put it in px, because it reflects what is in the mockup. In terms of generated css it's almost the same.
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.
Ok, so far we've privileged the non interpolated values (also for the lightest CSS possible, I think). I don't have a strong opinion on this, but maybe we should agree on a best practice.
@fgravin and @tkohr Thanks for the review. To point 2:
Also: |
e37b98f
to
f6c3fe5
Compare
Changed the font-size and color as proposed to:
Also made opening of the panel faster.