-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"> | ||
<gn-ui-content-ghost ghostClass="h-32" [showContent]="fieldReady('abstract')"> | ||
<p | ||
class="whitespace-pre-line break-words" | ||
[innerHTML]="metadata.abstract | safe: 'html'" | ||
*ngIf="metadata.abstract" | ||
></p> | ||
</gn-ui-content-ghost> | ||
</div> | ||
|
@@ -32,27 +33,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 commentThe reason will be displayed to describe this comment to others. Learn more. |
||
gnUiLinkify | ||
> | ||
{{ 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 commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||
{{ metadata.recordUpdated && metadata.recordUpdated.toLocaleString() }} | ||
</p> | ||
</div> | ||
<div *ngIf="metadata.updateFrequency"> | ||
<p class="text-sm" translate>record.metadata.updateFrequency</p> | ||
<p class="text-primary font-medium mt-2" translate> | ||
<p class="text-primary font-medium mt-[4px]" translate> | ||
domain.record.updateFrequency.{{ metadata.updateFrequency }} | ||
</p> | ||
</div> | ||
<div *ngIf="metadata.status"> | ||
<p class="text-sm" translate>record.metadata.updateStatus</p> | ||
<p class="text-primary font-medium mt-2" translate> | ||
<p class="text-primary font-medium mt-[4px]" translate> | ||
domain.record.status.{{ metadata.status }} | ||
</p> | ||
</div> | ||
|
@@ -63,7 +67,11 @@ | |
<gn-ui-badge *ngIf="metadata.extras?.isOpenData"> | ||
<span translate>record.metadata.isOpenData</span> | ||
</gn-ui-badge> | ||
<span *ngFor="let usage of usages" gnUiLinkify> | ||
<span | ||
class="text-primary font-medium" | ||
*ngFor="let usage of usages" | ||
gnUiLinkify | ||
> | ||
{{ usage }} | ||
</span> | ||
<span class="noUsage" *ngIf="!hasUsage"> | ||
|
@@ -79,7 +87,7 @@ | |
<p class="text-sm" translate>record.metadata.sheet</p> | ||
<a [href]="metadata.landingPage" target="_blank"> | ||
<mat-icon | ||
class="material-symbols-outlined inline-block align-bottom pt-1.5 text-xs text-black" | ||
class="material-symbols-outlined inline-block align-bottom pt-1.5 text-xs text-black !w-[20px]" | ||
>open_in_new</mat-icon | ||
> | ||
<span class="text-primary break-all">{{ metadata.landingPage }}</span> | ||
|
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 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 derivedtext-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 nottext-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
butmain
because pure black is apparently bad practice and it's not dependent on the theme.