Skip to content

Convert OmniAuth login buttons to Pajamas

Eduardo Sanz García requested to merge eduardosanz/sso-button-old-style into master

What does this MR do and why?

Closes #417814 (closed)

  • Extracted OmniAuth login buttons to a HAML partial and use the new partial in two places.

  • Prepended classes and ids associated to JavaScript functionality with js-.... This allows better searchability and maintainability.

  • Replaced a static fixture to a generated fixture. This allows checking real DOM changes.

  • Remove unnecessary classes.

  • Some other minor changes, improved structure of tests, etc.

Changelog: changed

EE: true

Screenshots or screen recordings

Slightly reduce the vertical spacing between the buttons in some cases.

Old style

Before After
image image
Before After
image image
Before After
image image

New style

Before After
image image
Before After
image image
Before After
image image

How to set up and validate locally

On an incognito window check go to one of these pages:

  • /users/sign_in
  • /users/sign_up
  • /-/trial_registrations/new (SaaS emulation required)

To check that the form actions and the buttons href reflects the fragment redirect:

  1. On an incognito window go to: /users/sign_in#testhello
  2. Search for testhello in the DOM
  3. Play with the Remember me button in the OmniAuth buttons.
  4. See the changes in the button href.

Screen_Recording_2023-07-26_at_18.16.59

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eduardo Sanz García

Merge request reports