Skip to content

Conversation

adityagarg06
Copy link
Contributor

Progress on #2042

Changes:

  • Replaced the mapStateToProps and connect functions with useSelector to select the desired state.
  • Removed currentTheme from the PropTypes as it is obtained from Redux Store.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

Sorry, something went wrong.

@raclim raclim added Type:Task Tasks tied specifically to developer operations and maintenance Area: Code Quality For refactoring, cleanup, or improvements to maintainability labels Feb 6, 2024
@lindapaiste
Copy link
Collaborator

FYI I've held off on merging this one because I wanted to see what happened with regards to a problem in the current test code which you may have seen before where the theme value is not always set in the state. That's my mistake -- I wrote some of the test code expecting a deep merge of the Redux state and then we ended up with a shallow merge.

 PASS   client  client/modules/IDE/components/Preferences/Preferences.unit.test.jsx (13.318 s)
  ● Console

    console.error
      Warning: Failed prop type: The prop `currentTheme` is marked as required in `Provider`, but its value is `undefined`.
          in Provider (created by Connect(Provider))
          in Connect(Provider) (created by Wrapper)
          in Provider (created by Wrapper)
          in I18nextProvider (created by Wrapper)
          in Wrapper

      115 |   };
      116 |
    > 117 |   return { store, ...render(ui, { wrapper: Wrapper, ...renderOptions }) };
          |                            ^
      118 | }
      119 |
      120 | /**

I'm going to go ahead and fix that now and merge it into this branch.

@lindapaiste lindapaiste merged commit 64c36ca into processing:develop Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Code Quality For refactoring, cleanup, or improvements to maintainability Type:Task Tasks tied specifically to developer operations and maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants