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

Fix: Thumbnail multiple images fallback when 404 #570

Merged
merged 7 commits into from
Aug 14, 2023

Conversation

Angi-Kinas
Copy link
Collaborator

@Angi-Kinas Angi-Kinas commented Aug 9, 2023

For the Thumbnail image we want to display (with priority):

  1. the thumbnail image
  2. (if no thumbnail image) the org logo
  3. (if no org logo) the placeholder

The bug exists because there is a thumbnail image but it returns a 404. In this case we should show the org logo. If the org logo also return a 404 it should show the placeholder. This is fixed in this PR.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

Affected libs: ui-elements, feature-catalog, feature-record, feature-router, feature-search, feature-map, feature-dataviz, ui-catalog, ui-search, util-app-config, util-i18n, feature-editor, feature-auth, ui-dataviz, ui-inputs,
Affected apps: metadata-editor, datahub, demo, webcomponents, search, map-viewer, metadata-converter, datafeeder,

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

@coveralls
Copy link

coveralls commented Aug 9, 2023

Coverage Status

coverage: 83.694% (-0.08%) from 83.772% when pulling 742a912 on thumbnail-multiple-images into 92fe7d2 on main.

f-necas and others added 2 commits August 9, 2023 11:09
need to get rid of this multiple fit and fits inputs. find a better way to implement it
@f-necas
Copy link
Collaborator

f-necas commented Aug 9, 2023

Thanks @Angi-Kinas for this nice feature !

It's just a proposition : It may be cleaner if html files doesn't handles arrays. Instead of [images]="[{ url: record.thumbnailUrl }]" we could handle them with some getters ?

Coverage has barely decreased. Covering the existing getter should work for re-increasing it.

I've let some comments.
Nice work 👍🏼

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.

Great work! adapted it to keep the existing UI to work and it's all good :)

@Angi-Kinas Angi-Kinas merged commit 260378e into main Aug 14, 2023
5 checks passed
@Angi-Kinas Angi-Kinas deleted the thumbnail-multiple-images branch August 14, 2023 11:27
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.

4 participants