Skip to content

Refactor preserve_url_fragment functionality

What does this MR do and why?

  • Remove jQuery dependency
  • Remove static fixture
  • Split appendUrlFragment function into two independent versions.

The JavaScript functionality touched here is responsible of three different actions:

  • Preserving the URL fragment in traditional login forms
  • Preserving the URL fragment in OAuth login forms (by appending redirect_fragment query)
  • Preserving the state of the Remember Me checkbox to the OAuth login forms (by appending remember_me query)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

N/A

How to set up and validate locally

  1. On an incognito window, go to /users/sign_in#dummy.
  2. Make sure that non-OAuth form actions contains the #dummy fragment.
  3. Make sure that OAuth form actions contains the redirect_fragment="dummy" query parameter.
  4. Make sure that toggling the Remember me checkbox appends/remove remember_me=1 query parameter.

Merge request reports

Loading