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.
Summary
This PR is for issue: #5824
This migrates the
users/:id/edit
page to the new admin. It still relies on the old backend admin controller for the#update
action as well as the other top level user tabs such as address, order history, and so on.In the next couple PRs I will migrate the remaining tabs to the new interface, but for now I thought it best to keep the old interface for actions such as creating a new user, which we definitely want to still have working.
This PR does not handle the issue of permission dependent interface elements. In the old admin, some buttons would not be visible if the user lacked the permissions to action them. However it looks like that is currently standard for the entirety of the new admin as I don't see any permissions checks or anything like this anywhere in the new admin:
If we are using a new helper or gem to manage this and I am just missing something definitely let me know which implementation I can reference! Otherwise for now I will put this up as is because handling
if can?
permissions checks across the whole of the admin is a bit out of scope for this PR.In the next PRs I will migrate the other tabs of the user admin (address, order history etc) and will add the modal for user creation (although I may leave the user creation backend logic as is for now as it looks like the issue specifically states that the user invitation flow should be considered a separate task.
Again there weren't really designs for this so I just went for it and tried to keep to our existing components as much as possible. Hopefully it looks decent!
The attached video shows the functionality visually:
Screen.Recording.2024-09-18.at.9.29.12.PM.mov
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: