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

Filtered resource description fallback #197

Merged
merged 8 commits into from
Apr 18, 2024

Conversation

dgading
Copy link
Member

@dgading dgading commented Apr 17, 2024

This PR does the following:

  1. Remove React Text Truncate which is no longer used
  2. Add withQueryProvider to the FilteredResource template
  3. Wrap Resource distribution description with a div instead of a p, since some descriptions contain multiple p tags already
  4. Create a new FilteredResourceDescription component that will show distribution descriptions and if that doesn't exist the dataset.description. If nothing is passed, for initial renders it shows null until those are available.
  5. Adds some tests for the new component.

@dgading dgading requested a review from brdunfield April 18, 2024 15:01
@@ -76,6 +68,8 @@ const FilteredResourceBody = ({
? distribution.data.title
: dataset.title;

let description = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this variable used anywhere?

Copy link
Contributor

@brdunfield brdunfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and thank you for adding tests too :shipit:

@dgading dgading merged commit ab09c01 into main Apr 18, 2024
1 check passed
@dgading dgading deleted the filtered-resource-description-fallback branch April 18, 2024 20:45
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.

2 participants