-
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
Datahub: Fix thumbnail background for org logos #636
Conversation
this fixes the gray background currently applied to logos
to have cleaner classes
Affected libs:
|
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.
Looking good, thanks a lot!
'bg-white': !isPlaceholder | ||
}" | ||
class="h-full w-full relative shrink-0 overflow-hidden flex items-center" | ||
[ngClass]="isPlaceholder ? 'bg-gray-100' : 'bg-white'" |
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.
Very good catch here, we basically had no guarantee that bg-white
would have priority over bg-gray-100
prior to this change
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 more crucial thing is actually setting the isPlaceholder
to false
when updateImageList
is triggered via ngOnChanges()
with a logo, I have the feeling. Not sure if the added tests really cover this well. But yes the html should be cleaner this way, too :-)
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.
yes indeed, the bg-
classes weren't the core problem but they could have become a random and hard to track bug later on.
PR fixes the background color of logos, which is currently gray when loading the datahub on the organisations tab or when turning pages in the orgs tab.