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

Implement search in Details views #4318

Merged
merged 34 commits into from
Jul 9, 2024
Merged

Implement search in Details views #4318

merged 34 commits into from
Jul 9, 2024

Conversation

RobertJoonas
Copy link
Contributor

Changes

  • Refactor the structure of a metric on the frontend - use a Metric class with special creator functions.
  • Create a higher-order component for keeping the query context (such as the query object itself and additional information such as revenueAvailable, importedDataInView, lastLoadTimestamp)
  • Create a new BreakdownModal component that includes the search functionality, and make all current "Details" view modals to use it.
    • Note: some API endpoints (goals, countries, regions, cities) do not support a contains filter. This PR will start using the new BreakdownModal in those reports too, but the search is explicitly disabled via enableSearch={false} prop.

Tests

  • This PR does not require tests

Changelog

  • Entry has been added to changelog

Documentation

  • Docs have been updated

Dark mode

  • The UI has been tested both in dark and light mode

@RobertJoonas RobertJoonas marked this pull request as draft July 8, 2024 08:19
Copy link

github-actions bot commented Jul 8, 2024

Preview environment👷🏼‍♀️🏗️
PR-4318

@RobertJoonas RobertJoonas marked this pull request as ready for review July 8, 2024 10:57
@RobertJoonas RobertJoonas requested a review from ukutaht July 8, 2024 10:57
@RobertJoonas RobertJoonas requested a review from ukutaht July 9, 2024 10:18
<FilterLink
query={props.query}
filterInfo={props.getFilterFor(listItem)}
onClick={props.onClick || noop}
Copy link
Contributor

@macobo macobo Jul 9, 2024

Choose a reason for hiding this comment

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

Why is the || noop needed? Can't the FilterLink component handle undefined as react components do usually?

@RobertJoonas RobertJoonas merged commit 7d0321f into master Jul 9, 2024
10 checks passed
@RobertJoonas RobertJoonas deleted the modal-search branch July 9, 2024 12:01
@RobertJoonas RobertJoonas mentioned this pull request Jul 9, 2024
4 tasks
@aerosol
Copy link
Member

aerosol commented Jul 9, 2024

Well done, this is really cool. WYT about treating the search input with autofocus?

@RobertJoonas RobertJoonas mentioned this pull request Jul 10, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants