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

EDSC-4342: Adds features facet icons #1850

Merged
merged 11 commits into from
Feb 5, 2025
Merged

EDSC-4342: Adds features facet icons #1850

merged 11 commits into from
Feb 5, 2025

Conversation

daniel-zamora
Copy link
Contributor

@daniel-zamora daniel-zamora commented Jan 29, 2025

Overview

What is the feature?

The Facets for the "Available in Earthdata Cloud" and "Map Imagery" Should have icons added to them these should match icons used in static/src/js/components/CollectionResults/CollectionResultsItem.jsx for consistency

What is the Solution?

Facets and FacetItem components will allow for adding of icons to facets via a new icon prop

What areas of the application does this impact?

Facets.jsx and FacetsItem.jsx

Testing

Reproduction steps

On main search page with collection results, there should now be icons for cloud and map imagery feature

Attachments

facets

image

Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.72%. Comparing base (894ff55) to head (0c921dc).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1850      +/-   ##
==========================================
+ Coverage   93.68%   93.72%   +0.04%     
==========================================
  Files         778      778              
  Lines       19020    19023       +3     
  Branches     4895     4894       -1     
==========================================
+ Hits        17818    17829      +11     
+ Misses       1155     1147       -8     
  Partials       47       47              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@daniel-zamora daniel-zamora force-pushed the EDSC-4342 branch 3 times, most recently from 1dc679a to 04a2df2 Compare January 29, 2025 17:01
@eudoroolivares2016 eudoroolivares2016 changed the title EDSC-4342 adds features facet icons EDSC-4342: Adds features facet icons Jan 29, 2025
@@ -20,6 +20,7 @@ export const EDSCIcon = ({
size,
title,
variant,
label,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure we want this, considering label is a html attribute and might cause confusion, and make it harder set a html label attribute, if we ever needed to. We could have an explicit ariaLabel prop, or just rely on props being passed through the ...props spread and use aria-label. I think either would be preferable to using label.

@@ -47,6 +49,10 @@ const Facets = (props) => {
featuresFacet.children.push({
applied: featureFacets.availableInEarthdataCloud,
title: 'Available in Earthdata Cloud',
iconProps: {
icon: CloudFill,
label: 'a cloud icon'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Depending on how you decide to define the label, this could be changed to ariaLabel or `"aria-label".

Also, in these labels, we should probably be sure to use proper capitalization, i.e. "A cloud icon".

@@ -55,6 +61,10 @@ const Facets = (props) => {
featuresFacet.children.push({
applied: featureFacets.customizable,
title: 'Customizable',
iconProps: {
icon: Settings,
label: 'a gear icon'
Copy link
Collaborator

Choose a reason for hiding this comment

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

See comment above

@@ -63,6 +73,10 @@ const Facets = (props) => {
if (showMapImagery) {
featuresFacet.children.push({
applied: featureFacets.mapImagery,
iconProps: {
icon: FaMap,
label: 'a map icon'
Copy link
Collaborator

Choose a reason for hiding this comment

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

See comment above

Copy link
Collaborator

@trevorlang trevorlang left a comment

Choose a reason for hiding this comment

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

Accidentally approved 🤦

@abbottry abbottry requested a review from macrouch February 5, 2025 17:31
@daniel-zamora daniel-zamora merged commit 0853c40 into main Feb 5, 2025
11 checks passed
@daniel-zamora daniel-zamora deleted the EDSC-4342 branch February 5, 2025 20:26
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