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 appendingremember_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
- On an incognito window, go to
/users/sign_in#dummy
. - Make sure that non-OAuth form actions contains the
#dummy
fragment. - Make sure that OAuth form actions contains the
redirect_fragment="dummy"
query parameter. - Make sure that toggling the
Remember me
checkbox appends/removeremember_me=1
query parameter.