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

Refactor /users to support react-router v6 #4365

Conversation

ivarnakken
Copy link
Member

Description

Ended up refactoring a bunch of stuff, some minor stuff, some bigger stuff and some bugs.

Result

Actually some minor visual changes this time as well. I couldn't help myself.

Before After
Screenshot 2023-12-09 at 00 21 09 Screenshot 2023-12-09 at 00 19 08

Testing

  • I have thoroughly tested my changes.

I think I tested everything ...

Styling changes, and removal of unnecessary stuff.
Also fix 2 bugs introduced by the recent refactor to `react-final-form`:
- `submitSucceeded` would always be undefined, as we would previously
  get this through `redux-form`.
- The way we listen to user fields (for zxcbn) did not work either.
Ideally it should be able to take in all button types, but I'm planning on
refactoring this further later.
CheckBox's onChange function had a recent change
And make it support `react-router` v6!
Also type some related user actions.
@ivarnakken ivarnakken added review-needed Pull requests that need review bug-fix Pull requests that fix a bug technical-debt Pull requests that reduces technical debt chore Pull requests that does something "boring", yet important, e.g. cleaning up code labels Dec 8, 2023
@ivarnakken ivarnakken requested a review from a team December 8, 2023 23:25
@ivarnakken ivarnakken self-assigned this Dec 8, 2023
Copy link

linear bot commented Dec 8, 2023

@ivarnakken ivarnakken changed the title Refactor user profile to support react-router v6 Refactor /users to support react-router v6 Dec 9, 2023
@ivarnakken ivarnakken added types Pull requests that improve or fix types enhancement Pull requests that make enhancements, instead of just purely new features labels Dec 9, 2023
@ivarnakken ivarnakken changed the title Refactor /users to support react-router v6 Refactor /users to support react-router v6 Dec 13, 2023
Copy link
Member

@eikhr eikhr 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!

app/routes/users/components/ChangePassword.tsx Outdated Show resolved Hide resolved
app/routes/users/components/GroupChange.tsx Outdated Show resolved Hide resolved
Copy link
Member

@eikhr eikhr 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!

* Refactor user settings
* Fix some bugs caused by undefined user objects
* Improve some styling on some user pages (better layout and use of
  cards)
* Improve some types
* Clean up routing
@ivarnakken ivarnakken force-pushed the ivarnakken/aba-714-refactor-users-to-support-react-router-6 branch from f3682fb to 48b19a8 Compare December 15, 2023 14:01
@ivarnakken ivarnakken added the approved Pull requests that have been approved label Dec 15, 2023
@ivarnakken ivarnakken merged commit ef9e224 into migrate-away-from-connected-router Dec 15, 2023
2 checks passed
@ivarnakken ivarnakken deleted the ivarnakken/aba-714-refactor-users-to-support-react-router-6 branch December 15, 2023 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Pull requests that have been approved bug-fix Pull requests that fix a bug chore Pull requests that does something "boring", yet important, e.g. cleaning up code enhancement Pull requests that make enhancements, instead of just purely new features review-needed Pull requests that need review technical-debt Pull requests that reduces technical debt types Pull requests that improve or fix types
Projects
None yet
2 participants