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

Remove Cable Ready responses from User related controllers #12997

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

wandji20
Copy link
Contributor

@wandji20 wandji20 commented Nov 26, 2024

What? Why?

  • Closes #
    This is the first part of moving away from Cable Ready in favor of Hotwire related to Replace mrujs with turbo #12794

  • Since Turbo covers everything cable_ready does, we can safely move from cable_ready and mrujs to turbo.

This PR covers changes to the User Session, Password, Registration, and Confirmation Controllers.

What should we test?

The flow for user registration, login, password reset, and confirmation should be retained.

  • Visit home page.
  • Try to sign up with existing email address and observer error message.
  • Sign up successfully.
  • Logout and log in. Test error scenarios.
  • Change password. Test error scenarios.

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

Dependencies

N/A

Documentation updates

N/A

@wandji20 wandji20 marked this pull request as draft November 26, 2024 08:50
@wandji20 wandji20 marked this pull request as ready for review November 26, 2024 09:33
Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So cool!

We need some better testing instructions though. I'll edit them to let the testers know which functionality is affected.

@mkllnk mkllnk added the technical changes only These pull requests do not contain user facing changes and are grouped in release notes label Nov 29, 2024
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for splitting this into a smaller PR.
Just a couple of things to check out:

app/controllers/spree/users_controller.rb Show resolved Hide resolved
app/controllers/spree/user_sessions_controller.rb Outdated Show resolved Hide resolved
app/views/layouts/_alert.html.haml Outdated Show resolved Hide resolved
@wandji20 wandji20 requested a review from dacook December 2, 2024 18:31
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, ready to test!

@filipefurtad0 filipefurtad0 added the pr-staged-fr staging.coopcircuits.fr label Dec 26, 2024
@filipefurtad0 filipefurtad0 self-assigned this Dec 26, 2024
@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Dec 26, 2024

What should we test?

The flow for user registration, login, password reset, and confirmation should be retained.

  • Visiting the home page and attempting to sign up with existing email address triggers the expected error message:

image

  • Signing up works as before, for a valid email address:
    -> after a confirmation email it is possible to log in to the new account

  • Logging out and back in works fine

  • Logging in directly to the /admin page, to test the a 401 Unauthorized scenario 🔴
    -> triggers the login modal, as expected
    -> after entering a customer (instead of admin credentials) logs in successfully but re-triggers the log-in modal. This differs from the previous behavior, where a flash message was displayed instead, please see below:

image

I think this would be a regression, as the modal is relevant to inform the user that access to that page is not granted. Also, the modal should not appear a second time.

  • Changing password works as before.

  • Attempting to change passwords with different passwords
    -> triggers the expected error

image

Summary

Everything looks great, except the 401 scenario. I think this usability regression should be prevented. Would you be up to improive this @wandji20 ? Moving to in progress, for now.

@filipefurtad0 filipefurtad0 removed the pr-staged-fr staging.coopcircuits.fr label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical changes only These pull requests do not contain user facing changes and are grouped in release notes
Projects
Status: In Progress ⚙
Development

Successfully merging this pull request may close these issues.

4 participants