Skip to content

Refactor(profile preferences): HAML->Vue localization and time settings

What does this MR do?

This MR refactors the localization and time settings of the profile/preferences page from HAML to Vue:

Note: certain odd uses of Pyjamas components, styles, and elements are used to achieve design parity with the legacy HAML elements!

MR sequence

Initially, we are converting HAML to Vue:

The next step will be to migrate these odd uses of components to the encouraged way of using Pyjamas components!

Related history: This effort sprung from the motivation to remove this file: profiles/preferences/update.js.erb from this issue: #250846 (closed).

Screenshots (strongly suggested)

Before: After:
Screen_Shot_2020-11-30_at_17.23.57 Screen_Shot_2020-11-30_at_17.24.51

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

To test this out:

  • Run bundle exec rails c and enable this feature flag: Feature.enable(:user_time_settings)
  • Navigate to http://localhost:3000/profile/preferences and scroll to the bottom.
  • Change the "language" (Note: select a language you can understand!), "first day of the week" and both "time format" (try both on and off!) settings
  • Click "Save changes"
  • Refresh the page, you should see the changes persisted

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related to #250846 (closed)

Edited by Michael Lunøe

Merge request reports