Skip to content
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

Merged
merged 3 commits into from
Sep 26, 2023
Merged

Conversation

tkohr
Copy link
Collaborator

@tkohr tkohr commented Sep 26, 2023

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.

logos

this fixes the gray background currently applied to logos
@github-actions
Copy link
Contributor

github-actions bot commented Sep 26, 2023

Affected libs: ui-elements, feature-catalog, feature-record, feature-router, feature-search, feature-map, feature-dataviz, ui-catalog, ui-search,
Affected apps: metadata-editor, datahub, demo, webcomponents, search, map-viewer,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

@coveralls
Copy link

coveralls commented Sep 26, 2023

Coverage Status

coverage: 86.268% (+0.4%) from 85.915% when pulling 91a002f on fix-thumbnail-background into 6ccf44e on main.

Copy link
Collaborator

@jahow jahow left a 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'"
Copy link
Collaborator

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

Copy link
Collaborator Author

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 :-)

Copy link
Collaborator

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.

@tkohr tkohr merged commit c12342b into main Sep 26, 2023
5 checks passed
@tkohr tkohr deleted the fix-thumbnail-background branch September 26, 2023 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants