Skip to content

Fix problems in MobileIDEView (#2184) #2185

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 14 commits into from

Conversation

lindapaiste
Copy link
Collaborator

@lindapaiste lindapaiste commented Mar 26, 2023

Builds upon PR #2054
Progress on issue #2184


Changes:

Preferences:

  • MobilePreferences is now a wrapper around the main Preferences content instead of recreating it.
  • Accept a className prop on Preferences so that it can be restyled with styled-components.
  • Make the mobile Screen be an extension of the desktop RootPage, which applies global text colors based on the current theme. So now those text colors are applied to the Preferences.
  • Delete the PreferencePicker which is no longer needed.
  • Remove "MobilePreferences" key from translations, since this data already exists in "Preferences".

Navigation:

  • Convert function getNavOptions into a component NavMenu because it's super weird to call hooks inside a plain function.
  • Combine the two lists of NavMenu items (logged out and logged in) rather than repeating the shared items twice.
  • Fix propTypes error in ActionStrip.
  • Delete FloatingNav which is not used.

MobileIDEView:

  • Use react-redux hooks useSelector and useDispatch instead of connect.
  • Removed a lot of the existing connect props by connecting components deeper in the tree instead of props drilling.
  • Combined the withChangeDot in the MobileIDEView and the original lines in the Editor into a reusable UnsavedChangesIndicator component so that it doesn't need to be repeated in both versions.
  • Converted a bunch of hardcoded string labels into translations.
  • Copied the autosave logic from IDEView into a new component AutosaveHandler which can be used by MobileIDEView. I'm considering this a temporary solution because I did not remove the code from IDEView so now we have it two places.

Etc:

  • Remove all of the props passed to PreviewFrame as they don't do anything.

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

image
image

@raclim
Copy link
Collaborator

raclim commented Oct 18, 2023

Hey, I noticed you closed #2184, so I'm going to go ahead with closing this as well!
Please re-open this or let me know if that isn't the case and is still in-progress, thanks!

@raclim raclim closed this Oct 18, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants