-
Notifications
You must be signed in to change notification settings - Fork 65
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
fix(RHINENG-9239, RHINENG-9260): Keep filtering in Hybrid Inventory Tabs separate, filter reset when Add Systems modal closes #2171
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2171 +/- ##
=======================================
Coverage 57.06% 57.06%
=======================================
Files 207 208 +1
Lines 6400 6396 -4
Branches 1785 1784 -1
=======================================
- Hits 3652 3650 -2
+ Misses 2748 2746 -2 ☔ View full report in Codecov by Sentry. |
dd5eb8c
to
8574b25
Compare
Hey @bastilian I have went over your comments and updated the PR accordingly |
8574b25
to
c53382c
Compare
Thank you for the quick review @bastilian ! |
@LiorKGOW The code looks good to me, however, while testing I noticed an inconsistency. On the Systems tab both the Conventional and the Immutable Systems persist the filters properly, but in the modal when it closes and the filters should not persist the Immutable tab still keeps them after closing the modal: immu.mp4 |
@bastilian you are right, I have not noticed that |
674b383
to
821c1b2
Compare
@bastilian I have added the code that fixes the inconsistency problem you mentioned, you can find it in the last commit 👍🏼 |
821c1b2
to
44a4138
Compare
Rebased on top of latest master and repushed |
/retest |
92c15d8
to
ece4c0a
Compare
ece4c0a
to
bbc1d36
Compare
+ fix(RHINENG-9260): filter reset when Add Systems modal closes + Remove component state variable + Remove useMemo from the content of Hybrid inventory Tabs + Remove the conditional rendering of both GroupSystems & GroupImmutableSystems components Links to issues: 1. https://issues.redhat.com/browse/RHINENG-9239 2. https://issues.redhat.com/browse/RHINENG-9260
+ Adding a TODO note
The systems table of ImmutableDevicesView, which uses Edge's DevicesView, persists filters in the Session Storage
bbc1d36
to
f00a4c4
Compare
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.
There is one regression: if URL contains pagination, it's no longer applied for conventional tab. I will try to find out what caused it and fix it
Description
This PR addresses issues:
#RHINENG-9239
#RHINENG-9260
Inventory group's details page: Filtering of each tab should be kept separate and saved even when switching between tabs (Conventional and Immutable)
Also, this PR includes 2 commits that change state variable names (tab & activeTabKey) in GroupTabDetails component to improve code readability
4th commit - added Sebastian's suggestion
5th commit - fixed an inconsistency between the different tabs on the "Add Systems" modal
This PR introduces a store instance for each tab, which holds it's own filters for it's InventoryTable. In order to create a new instance of the store for the InventoryTable, you need to provide InventoryTable component with the
isolateStore
prop to render it with a Provider Wrapper which holds a new store instance alongside with the InventoryTable.I have removed the component state inside InventoryGroupDetail/GroupTabDetails.js and put the components inside the returned JSX of the component.
Regarding the Immutable tab inside the "Add Systems" Modal, the filters there were handled a bit differently, you can find small comments inside the 5th commit message which solves this inconsistency issue which was created in previous commits