Skip to content

Conversation

@sajadhsm
Copy link
Contributor

What kind of change does this PR introduce?

Refactors code as a part of hacktoberfest mentioned in #2621.
@Saeris @christianalfoni

What is the current behavior?

/app/pages/common/Modals/PreferencesModal/Appearance/index.js was using Cerebral

What is the new behavior?

/app/pages/common/Modals/PreferencesModal/Appearance/index.tsx now using Overmind

What steps did you take to test this? This is required before we can merge, make sure to test the flow you've updated.

  1. Replaced inject and observer with useOvermind
  2. Converted js files to ts and tsx
  3. Ran yarn test
  4. Ran yarn lint

Checklist

  • Documentation N/A
  • Testing
  • Ready to be merged
  • Added myself to contributors table

@lbogdan lbogdan temporarily deployed to pr2806 October 16, 2019 06:41 Inactive
@Saeris Saeris added Hacktoberfest 🔨 Refactor 🧠 Overmind Indicates that this is related to the app's State Management labels Oct 16, 2019
@kiliman
Copy link

kiliman commented Oct 16, 2019

@sajadhsm For your changes to pass typecheck, you need to update the Props type in /src/components/Preference/PreferenceText.tsx

export type Props = {
  setValue: (value: string) => void;
  value: string;
  placeholder?: string;
  isTextArea?: boolean;
  style?: { [property: string]: string | number };
  block?: boolean;
  rows?: number;
};

image

Copy link
Contributor

@christianalfoni christianalfoni left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks 😄

Tested:

  • Opening the appearance preferences
  • Clicked open editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧠 Overmind Indicates that this is related to the app's State Management 🔨 Refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants