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

Port TreeView to use redux-toolkit #2774

Merged
merged 5 commits into from
Nov 8, 2023
Merged

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Nov 1, 2023

Part of #1953


This change is Reviewable

@imnasnainaec imnasnainaec added frontend maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. component: TreeView labels Nov 1, 2023
@imnasnainaec imnasnainaec self-assigned this Nov 1, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Files Coverage Δ
src/components/ProjectScreen/index.tsx 100.00% <100.00%> (ø)
src/rootReducer.ts 100.00% <ø> (ø)
src/components/TreeView/index.tsx 61.22% <0.00%> (ø)
src/components/DataEntry/index.tsx 81.57% <33.33%> (ø)
src/components/TreeView/Redux/TreeViewActions.ts 84.21% <81.25%> (+22.67%) ⬆️
src/components/TreeView/Redux/TreeViewReducer.ts 75.00% <75.00%> (+21.15%) ⬆️

... and 1 file with indirect coverage changes

📢 Thoughts on this report? Let us know!

@imnasnainaec imnasnainaec marked this pull request as ready for review November 1, 2023 17:43
@imnasnainaec imnasnainaec requested a review from jmgrady November 1, 2023 17:43
@imnasnainaec imnasnainaec changed the title Port TreeView to redux-toolkit Port TreeView to use redux-toolkit Nov 3, 2023
Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 10 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: 9 of 10 files reviewed, 2 unresolved discussions (waiting on @imnasnainaec)


src/components/TreeView/Redux/TreeViewActions.ts line 25 at r2 (raw file):

export function resetTree(): Action {
  return resetAction();

Change to resetTreeAction. (and in TreeViewReducers.ts)

Code quote:

resetAction

src/components/TreeView/Redux/TreeViewReducer.ts line 16 at r2 (raw file):

    setDomainLanguageAction: (state, action) => {
      state.currentDomain.lang = action.payload;
      state.language = action.payload;

What is the benefit of keeping the semantic domain language as a separate field in the redux state? It is available in the currentDomain and there are several lines of code devoted to keeping them in sync.

Code quote:

      state.language = action.payload;

Copy link
Collaborator Author

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

Reviewable status: 6 of 10 files reviewed, all discussions resolved (waiting on @imnasnainaec and @jmgrady)


src/components/TreeView/Redux/TreeViewReducer.ts line 16 at r2 (raw file):

Previously, jmgrady (Jim Grady) wrote…

What is the benefit of keeping the semantic domain language as a separate field in the redux state? It is available in the currentDomain and there are several lines of code devoted to keeping them in sync.

I'd like to save this refactor for when we handle custom domains.

@imnasnainaec imnasnainaec enabled auto-merge (squash) November 8, 2023 16:27
Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 10 files at r1, 3 of 3 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec merged commit 1c1db26 into master Nov 8, 2023
15 of 17 checks passed
@imnasnainaec imnasnainaec deleted the redux-toolkit-tree-view branch November 8, 2023 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: TreeView frontend maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants