-
Notifications
You must be signed in to change notification settings - Fork 903
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
refactor(core): Convert Cluster filters to react #8272
refactor(core): Convert Cluster filters to react #8272
Conversation
The following commits need their title changed:
Please format your commit title into the form:
This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here. |
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.
👏 Really good work! The new ClusterFilters component is really easy to follow.
}); | ||
|
||
useOnStateChanged(() => { | ||
ClusterState.filterModel.asFilterModel.activate(); |
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.
Should this be checking if the new state is actually the Clusters State?
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.
That is a good point. The previous version does not do that, but adding that check makes sense from an efficiency standpoint.
trueKeyObjectToLabelFilters(sortFilter.labels), | ||
); | ||
|
||
const labelsMap = buildLabelsMap(serverGroupData); |
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.
May want to memoize this for when serverGroupData is large.
const labelsMap = buildLabelsMap(serverGroupData); | |
const labelsMap = useMemo(() => buildLabelsMap(serverGroupData), [serverGroupData]); |
Please fix the commit message |
d3f7355
to
1f52d3d
Compare
1f52d3d
to
6456cde
Compare
Create
ClusterFilter
react component. Remove unused angular code, and ensure backward compatibility.Note:
FilterCheckbox
component already existed in two places. This PR just pulls it out into its own file so the load balancers, clusters, and functions can use it in their filter sections.