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

feat(compass-saved-aggregations-queries): empty list items COMPASS-5539 #2847

Merged
merged 7 commits into from
Mar 2, 2022

Conversation

mabaasit
Copy link
Contributor

@mabaasit mabaasit commented Feb 28, 2022

feat(compass-saved-aggregations-queries): empty list items COMPASS-5539

Screen.Recording.2022-02-28.at.18.11.25.mov

Description

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@mabaasit mabaasit changed the title test(compass-saved-aggregations-queries): empty list items feat(compass-saved-aggregations-queries): empty list items COMPASS-5539 Feb 28, 2022
const EmptyContent: React.FunctionComponent<
EmptyContentProps & React.HTMLProps<HTMLDivElement>
> = ({ icon, title, subTitle, callToAction }) => {
const Icon =
Copy link
Contributor

@mcasimir mcasimir Feb 28, 2022

Choose a reason for hiding this comment

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

what's the advantage of this if? isn't it better to just make the icon be a JSX.Element and pass icon={<QuerySearchIcon>} in EmptyContent and icon={<SearchResultsIcon>} in NoSearchResults?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually that's a good idea.

Just wondering once we move this to compass-components, it will be better to have these custom icons there and they can be reused in normal Icon component as well.

Copy link
Contributor

@mcasimir mcasimir Feb 28, 2022

Choose a reason for hiding this comment

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

Just wondering once we move this to compass components, it will be better to have these custom icons there and they can be reused in normal Icon components as well.

Yeah, we could do that if those are reused for sure. There is no reason to couple this component with the actual graphic though. The EmptyContent component can accomplish its role fully without knowing what graphic is being used, there is no advantage in giving it that knowledge.

Copy link
Contributor

@mcasimir mcasimir left a comment

Choose a reason for hiding this comment

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

Awesome 👍

@mabaasit mabaasit requested a review from gribnoysup March 1, 2022 10:53
@mabaasit mabaasit marked this pull request as ready for review March 1, 2022 10:54
Copy link
Contributor

@gribnoysup gribnoysup left a comment

Choose a reason for hiding this comment

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

Looks good!

@mabaasit mabaasit merged commit d72b893 into main Mar 2, 2022
@mabaasit mabaasit deleted the COMPASS-5539-empty-items branch March 2, 2022 09:33
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.

None yet

3 participants