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: manage filter state in front end #7768

Closed

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Aug 6, 2024

Add a useEventLogSearch hook and hook it up to the existing EventLog component.

All the filters work except for the date filters. They don't work because the query parameters in the API don't match what's here, but an update to the API is coming in a follow-up.

This is a little messy because the three different event logs should have slightly different filters, which makes making the type checker happy a bit of a pain. However, I'd like to get back to that in a different follow-up PR later. At the same time, suggestions are welcome.

Copy link

vercel bot commented Aug 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 6, 2024 0:25am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Aug 6, 2024 0:25am

Copy link
Contributor

github-actions bot commented Aug 6, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

This is a different pr
Comment on lines +215 to +223
export const EventLog = (props: IEventLogProps) => {
const { isEnterprise } = useUiConfig();
const showFilters = useUiFlag('newEventSearch') && isEnterprise();
if (showFilters) {
return <NewEventLog {...props} />;
} else {
return <LegacyEventLog {...props} />;
}
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Split the implementation into two separate components. There is some duplication on what they do, but I think it's easier to keep them like this for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the main new bit. It's based on the global feature search.

thomasheartman added a commit that referenced this pull request Aug 6, 2024
This is just the state management part of #7768.

Adds a useEventLogSearch hook.

All the filters work except for the date filters. They don't work
because the query parameters in the API don't match what's here, but an
update to the API is coming in a follow-up.

It's a little tricky to handle this because the three different event
logs should have slightly different filters, which makes making the type
checker happy a bit of a pain. However, I'd like to revisit this in a
follow-up PR.
thomasheartman added a commit that referenced this pull request Aug 7, 2024
…nt search (#7777)

Hooks up the new Event search and filtering capabilities to the new
Event Log component. In doing so, it also splits the existing EventLog
component into two: `LegacyEventLog` and `NewEventLog`. The naming is
probably temporary, as the old EventLog isn't really legacy yet. But we
can rename them later.

The other half of #7768 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant