This repository was archived by the owner on Jul 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
[1572] Convert User Profile to React #1579
Open
esoterik
wants to merge
18
commits into
master
Choose a base branch
from
1572_user_profile_react
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Okay, the reservation counts on the profile have been moved to react! |
Todo:
|
return { | ||
user: state.user, | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this and all functions like this can be simplified:
const mapStateToProps = (state) => ({
user: state.user,
});
also, note that with how the webpack server runs, we lose access to |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #1572.
This isn't 100% ready, but I think it's at a good point for someone else to look this over. Currently the "basic" (excluding login info, role, requirements, etc) user attributes are editable from the show with no reload!
Running
npm i
should install all of the required npm packages; runforeman start -f Procfile.dev
instead ofrails server
.Tests currently fail on Travis (see this discussion that I just found); I'm looking into fixing it.
I'm planning on converting the whole page except for the reservation history to JS in this issue. I'm not sure what should be done about the other user attributes--should they be left on a separate page because they're more sensitive? I'm not sure how to require a password for changes, either, but these are pretty basic ones so I figured that losing the password requirement isn't a big deal.
I'm also not super sure of how the JS is organized. I think I like the organization by resource better than the typical JS organization of organizing by file type (reducer/component/container/etc), and there's not really a community standard.
I've also enabled ESLint in Hound on this branch; I'm expecting lots of comments.Nevermind, it seems like it uses the config onmaster
regardless, I've moved the config to #1577.Edit
I've also only tested this in Firefox v46.0.1; I'm going to start testing in Chromium as well