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

🐛 Support custom serializers in table hooks #2079

Merged
merged 2 commits into from
Sep 14, 2024

Conversation

rszwajko
Copy link
Collaborator

@rszwajko rszwajko commented Sep 4, 2024

Changes:

  1. add persistence provider to feature level persistence (IFeaturePersistenceArgs) but not to table layer persistence (ITablePersistenceArgs). This simplifies the provider code (feature-specific providers).
  2. remove meta-persistence target "default" - no target has the same effect.
  3. when in persistence provider mode use default values when the deserialized value is nulish. This solves the problem of initialFilterValues being overwritten in target cards scenario (the hook is called more then once and useState() based logic fails to detect initial load).

Using the newly added feature, store the filters selected in the Target step (Analysis wizard) inside react-hook form in the same way as other values.

Resolves: https://issues.redhat.com/browse/MTA-3438

@rszwajko rszwajko force-pushed the persistFilters branch 2 times, most recently from 852df20 to e26bcbb Compare September 11, 2024 21:12
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

Attention: Patch coverage is 16.98113% with 44 lines in your changes missing coverage. Please review.

Project coverage is 42.01%. Comparing base (b654645) to head (6bb22fe).
Report is 236 commits behind head on main.

Files with missing lines Patch % Lines
client/src/app/hooks/usePersistentState.ts 20.00% 8 Missing ⚠️
...p/hooks/table-controls/filtering/useFilterState.ts 14.28% 6 Missing ⚠️
...ooks/table-controls/expansion/useExpansionState.ts 16.66% 5 Missing ⚠️
...ks/table-controls/pagination/usePaginationState.ts 16.66% 5 Missing ⚠️
...c/app/hooks/table-controls/sorting/useSortState.ts 16.66% 5 Missing ⚠️
...pages/applications/analysis-wizard/set-targets.tsx 0.00% 5 Missing ⚠️
...s/table-controls/active-item/useActiveItemState.ts 20.00% 4 Missing ⚠️
...c/app/hooks/table-controls/useTableControlState.ts 20.00% 4 Missing ⚠️
client/src/app/hooks/table-controls/types.ts 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2079      +/-   ##
==========================================
+ Coverage   39.20%   42.01%   +2.81%     
==========================================
  Files         146      175      +29     
  Lines        4857     5617     +760     
  Branches     1164     1340     +176     
==========================================
+ Hits         1904     2360     +456     
- Misses       2939     3241     +302     
- Partials       14       16       +2     
Flag Coverage Δ
client 42.01% <16.98%> (+2.81%) ⬆️
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rszwajko
Copy link
Collaborator Author

Screencast.from.2024-09-12.21-28-41.mp4

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

LGTM

@sjd78 sjd78 merged commit f389539 into konveyor:main Sep 14, 2024
12 checks passed
Shevijacobson pushed a commit to Shevijacobson/tackle2-ui that referenced this pull request Sep 18, 2024
Changes:
1. add persistence provider to feature level persistence
(IFeaturePersistenceArgs) but not to table layer persistence
(ITablePersistenceArgs). This simplifies the provider code
(feature-specific providers).
2. remove meta-persistence target "default" - no target has the same
effect.
3. when in persistence provider mode use default values when the
deserialized value is nulish. This solves the problem of
initialFilterValues being overwritten in target cards scenario (the hook
is called more then once and useState() based logic fails to detect
initial load).

Using the newly added feature, store the filters selected in the Target
step (Analysis wizard) inside react-hook form in the same way as other
values.

Resolves: https://issues.redhat.com/browse/MTA-3438

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Co-authored-by: Scott Dickerson <[email protected]>
Shevijacobson pushed a commit to Shevijacobson/tackle2-ui that referenced this pull request Sep 18, 2024
Changes:
1. add persistence provider to feature level persistence
(IFeaturePersistenceArgs) but not to table layer persistence
(ITablePersistenceArgs). This simplifies the provider code
(feature-specific providers).
2. remove meta-persistence target "default" - no target has the same
effect.
3. when in persistence provider mode use default values when the
deserialized value is nulish. This solves the problem of
initialFilterValues being overwritten in target cards scenario (the hook
is called more then once and useState() based logic fails to detect
initial load).

Using the newly added feature, store the filters selected in the Target
step (Analysis wizard) inside react-hook form in the same way as other
values.

Resolves: https://issues.redhat.com/browse/MTA-3438

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Co-authored-by: Scott Dickerson <[email protected]>
Signed-off-by: Shevijacobson <[email protected]>
DvoraShechter1 pushed a commit to DvoraShechter1/tackle2-ui that referenced this pull request Sep 19, 2024
Changes:
1. add persistence provider to feature level persistence
(IFeaturePersistenceArgs) but not to table layer persistence
(ITablePersistenceArgs). This simplifies the provider code
(feature-specific providers).
2. remove meta-persistence target "default" - no target has the same
effect.
3. when in persistence provider mode use default values when the
deserialized value is nulish. This solves the problem of
initialFilterValues being overwritten in target cards scenario (the hook
is called more then once and useState() based logic fails to detect
initial load).

Using the newly added feature, store the filters selected in the Target
step (Analysis wizard) inside react-hook form in the same way as other
values.

Resolves: https://issues.redhat.com/browse/MTA-3438

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Co-authored-by: Scott Dickerson <[email protected]>
Signed-off-by: DvoraShechter1 <[email protected]>
DvoraShechter1 pushed a commit to DvoraShechter1/tackle2-ui that referenced this pull request Sep 19, 2024
Changes:
1. add persistence provider to feature level persistence
(IFeaturePersistenceArgs) but not to table layer persistence
(ITablePersistenceArgs). This simplifies the provider code
(feature-specific providers).
2. remove meta-persistence target "default" - no target has the same
effect.
3. when in persistence provider mode use default values when the
deserialized value is nulish. This solves the problem of
initialFilterValues being overwritten in target cards scenario (the hook
is called more then once and useState() based logic fails to detect
initial load).

Using the newly added feature, store the filters selected in the Target
step (Analysis wizard) inside react-hook form in the same way as other
values.

Resolves: https://issues.redhat.com/browse/MTA-3438

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Co-authored-by: Scott Dickerson <[email protected]>
Signed-off-by: DvoraShechter1 <[email protected]>
DvoraShechter1 pushed a commit to DvoraShechter1/tackle2-ui that referenced this pull request Oct 28, 2024
Changes:
1. add persistence provider to feature level persistence
(IFeaturePersistenceArgs) but not to table layer persistence
(ITablePersistenceArgs). This simplifies the provider code
(feature-specific providers).
2. remove meta-persistence target "default" - no target has the same
effect.
3. when in persistence provider mode use default values when the
deserialized value is nulish. This solves the problem of
initialFilterValues being overwritten in target cards scenario (the hook
is called more then once and useState() based logic fails to detect
initial load).

Using the newly added feature, store the filters selected in the Target
step (Analysis wizard) inside react-hook form in the same way as other
values.

Resolves: https://issues.redhat.com/browse/MTA-3438

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Co-authored-by: Scott Dickerson <[email protected]>
sarinailinger pushed a commit to sarinailinger/tackle2-ui that referenced this pull request Oct 30, 2024
Changes:
1. add persistence provider to feature level persistence
(IFeaturePersistenceArgs) but not to table layer persistence
(ITablePersistenceArgs). This simplifies the provider code
(feature-specific providers).
2. remove meta-persistence target "default" - no target has the same
effect.
3. when in persistence provider mode use default values when the
deserialized value is nulish. This solves the problem of
initialFilterValues being overwritten in target cards scenario (the hook
is called more then once and useState() based logic fails to detect
initial load).

Using the newly added feature, store the filters selected in the Target
step (Analysis wizard) inside react-hook form in the same way as other
values.

Resolves: https://issues.redhat.com/browse/MTA-3438

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Co-authored-by: Scott Dickerson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants