5
11
Fork
You've already forked tomato
1

Replace user invite button after click #57

Merged
edwardloveall merged 1 commit from el-turbo-ux into main 2025年12月10日 16:19:45 +01:00

Now that we have turbo, we need to re-think some UX. When inviting a
user, it used to display a message at the top of the screen saying
"Invitation resent" at the top of the page. We keep the scroll positin
so admins working on the user page don't lose their place. This creates
a problem as the message is at the top of the screen and the admin has
no sense of any action having been performed.

So instead, we replace the resend invite button with text saying
"Invite sent" so the admin understands they were successful.

Now that we have turbo, we need to re-think some UX. When inviting a user, it used to display a message at the top of the screen saying "Invitation resent" at the top of the page. We keep the scroll positin so admins working on the user page don't lose their place. This creates a problem as the message is at the top of the screen and the admin has no sense of any action having been performed. So instead, we replace the resend invite button with text saying "Invite sent" so the admin understands they were successful.
edwardloveall force-pushed el-turbo-ux from 2726d9b09d
All checks were successful
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Successful
to d24bcf36a7
Some checks failed
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Failed
2025年12月08日 17:51:15 +01:00
Compare
edwardloveall force-pushed el-turbo-ux from d24bcf36a7
Some checks failed
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Failed
to 05c1eab076
Some checks failed
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Failed
2025年12月08日 18:13:26 +01:00
Compare
edwardloveall force-pushed el-turbo-ux from 05c1eab076
Some checks failed
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Failed
to 22b8b2d194
All checks were successful
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Successful
2025年12月08日 18:35:09 +01:00
Compare
edwardloveall force-pushed el-turbo-ux from 22b8b2d194
All checks were successful
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Successful
to f50bdab443
All checks were successful
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Successful
2025年12月08日 20:31:35 +01:00
Compare
@ -41,0 +40,4 @@
@invited_user = invited_user
@role = invited_user.roles
@users = users_for_role(@role).identity_order
render "users/index", formats: :html
First-time contributor
Copy link

Don't know if you've been considering any view layer updates but a nice in-between step can be defining "decorator" classes for different views that contain all the data required, esp. because you can pass them as view arguments to locals and then use Strict Locals to ensure a single view method gets compiled under the hood.

Don't know if you've been considering any view layer updates but a nice in-between step can be defining "decorator" classes for different views that contain all the data required, esp. because you can pass them as view arguments to [`locals`](https://guides.rubyonrails.org/action_view_overview.html#passing-data-to-partials-with-locals-option) and then use [Strict Locals](https://guides.rubyonrails.org/action_view_overview.html#strict-locals) to ensure a single view method gets compiled under the hood.
Author
Owner
Copy link

Oh interesting. I've been considering something like this, yes, but haven't pulled the trigger. I did not know about strict locals; that's really interesting. I don't think I'll make that switch here, but I'm planning a couple other pages that have a lot of ivars so I'm hoping doing it a few times will help shape the pattern I end up using.

Oh interesting. I've been considering something like this, yes, but haven't pulled the trigger. I did _not_ know about strict locals; that's really interesting. I don't think I'll make that switch here, but I'm planning a couple other pages that have a lot of ivars so I'm hoping doing it a few times will help shape the pattern I end up using.
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rootable/tomato!57
Reference in a new issue
rootable/tomato
No description provided.
Delete branch "el-turbo-ux"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?