-
-
Notifications
You must be signed in to change notification settings - Fork 717
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
feat: manage filter state in front end #7768
Conversation
Due to how the back end works, the filter won't work yet. We still need to adjust the query parameters.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
This is a different pr
export const EventLog = (props: IEventLogProps) => { | ||
const { isEnterprise } = useUiConfig(); | ||
const showFilters = useUiFlag('newEventSearch') && isEnterprise(); | ||
if (showFilters) { | ||
return <NewEventLog {...props} />; | ||
} else { | ||
return <LegacyEventLog {...props} />; | ||
} | ||
}; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.
…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 .
Add a
useEventLogSearch
hook and hook it up to the existingEventLog
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.