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:
- MR 1: !46138 (merged)
- MR 2: This one
- MR 3: !48805 (closed)
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: |
---|---|
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
To test this out:
- Run
bundle exec rails c
and enable this feature flag:Feature.enable(:user_time_settings)
- If that doesn't work set
userTimeSettings = true
(default totrue
) in profile_preferences_bundle.js
- If that doesn't work set
- 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
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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)