Skip to content
Snippets Groups Projects

Remove/convert to utility classes non-page specific styles for profile 2

Merged Elwyn Benson requested to merge 239863-page-specific-bundles-profile-part-2 into master
All threads resolved!

What does this MR do and why?

A second MR continuing on from Remove/convert to utility classes non-page spec... (!141728 - merged)

Part of the page-specific-scss migration effort.

Removes classes from profile.scss. Some were unused, and some could be easily converted to utility classes.

See screenshots for details.

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

Admin -> Settings -> General -> Account & Limit

Replace usage of custom .help-block class (from profile.scss) with .gl-text-secondary

Before After
image image

Profile -> Edit profile -> Notifications

Replace usage of custom .help-block class (from profile.scss) with .gl-text-secondary

I wasn't sure which situations caused help text to show there so was manually editing app/views/profiles/notifications/_email_settings.html.haml line 3 with some hardcoded text to make it show up

Before After
image image

Project -> Settings -> Repository -> Mirroring repositories -> Add New

Replace 2x usages of custom .help-block class (from profile.scss) with .gl-text-secondary

Before After
image image
image image

Move .gitlab-slack-slack-logo into the component.

There is only a single usage of the class, and it does not rely on any SCSS variables or other SCSS that would mean it's better for this class to remain in an SCSS file.

Testing GitLab Slack App

If you do not have the Slack App configured, you can "fake it" without setting up an actual slack instance. From the rails console:

project = Project.find_by_full_path(...)
integration = project.find_or_initialize_integration('gitlab_slack_application')
integration.assign_attributes(active: true)
integration.save!(context: :manual_change)

# Create a mock SlackIntegration record, which normally happens when someone goes through the Slack
# app installation flow, authorizing with their Slack workspace:
SlackIntegration.create(integration: integration, team_id: 'foo', team_name: "Foo Slack Workspace", alias: project.full_path, user_id: 'foo')

Now visit URL to view the slack app:

http://gdk.test:3000/-/profile/slack/edit

(Note slack app will not function, but you can see the logo)

Before After
image image

Edit Profile -> Account -> Service sign-in

Migrated social provider styles into page specific bundle.

Setup google

Instructions for enabling google oauth in GDK can be found here:

https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/google-oauth2.md

Or, if you can't get it fully working like me, the conditions in app/views/profiles/accounts/_providers.html.haml can be hardcoded to force the various states to show in order to verify styles.

Before After
image image
image image
image image
image image

Profile -> Applications -> Edit

Converted .oauth-application-show .scopes-list custom style to utility class.

Before After
image image (2px difference in padding-left....)

profile.scss .user-callout styles - I believe these styles are all unused. Searching for .user-callout throughout the codebase shows a bunch of usages within promotions (e.g. ultimate trial callout promotion), but promotions.scss has its own styles defined for .user-callout. I couldn't see any usages that would be impacted by removal of the styles in profile.scss

How to set up and validate locally

See screenshots above for the various places impacted by this MR.

I'm not super familiar with some of the areas impacted so appreciate any extra sanity testing for other places I've unintentionally changed

Related to #239863 (closed)

Edited by Elwyn Benson

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Justin Ho Tuan Duong approved this merge request

    approved this merge request

  • Justin Ho Tuan Duong requested review from @eduardosanz and removed review request for @justin_ho

    requested review from @eduardosanz and removed review request for @justin_ho

  • Contributor

    E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :white_check_mark: test report for 5b2540cd

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Create      | 60     | 0      | 9       | 0     | 69    | ✅     |
    | Govern      | 66     | 0      | 0       | 1     | 66    | ✅     |
    | Package     | 24     | 0      | 2       | 0     | 26    | ✅     |
    | Release     | 5      | 0      | 0       | 0     | 5     | ✅     |
    | Plan        | 53     | 0      | 0       | 0     | 53    | ✅     |
    | Data Stores | 31     | 0      | 0       | 0     | 31    | ✅     |
    | Verify      | 35     | 0      | 1       | 0     | 36    | ✅     |
    | Monitor     | 7      | 0      | 0       | 0     | 7     | ✅     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Manage      | 0      | 0      | 1       | 0     | 1     | ➖     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 283    | 0      | 13      | 1     | 296   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+

    e2e-package-and-test: :x: test report for 5b2540cd

    expand test summary
    +---------------------------------------------------------------------+
    |                           suites summary                            |
    +----------------+--------+--------+---------+-------+-------+--------+
    |                | passed | failed | skipped | flaky | total | result |
    +----------------+--------+--------+---------+-------+-------+--------+
    | Verify         | 147    | 0      | 30      | 3     | 177   | ✅     |
    | Create         | 568    | 0      | 73      | 18    | 641   | ✅     |
    | Manage         | 36     | 3      | 11      | 2     | 50    | ❌     |
    | Release        | 15     | 0      | 3       | 0     | 18    | ✅     |
    | Govern         | 272    | 0      | 19      | 0     | 291   | ✅     |
    | Package        | 226    | 0      | 17      | 0     | 243   | ✅     |
    | Plan           | 246    | 0      | 13      | 0     | 259   | ✅     |
    | Growth         | 0      | 0      | 6       | 0     | 6     | ➖     |
    | Fulfillment    | 8      | 0      | 75      | 4     | 83    | ✅     |
    | Analytics      | 7      | 0      | 0       | 0     | 7     | ✅     |
    | Monitor        | 36     | 0      | 13      | 0     | 49    | ✅     |
    | Systems        | 8      | 0      | 0       | 0     | 8     | ✅     |
    | ModelOps       | 0      | 0      | 3       | 0     | 3     | ➖     |
    | Data Stores    | 119    | 0      | 28      | 1     | 147   | ✅     |
    | Configure      | 1      | 0      | 9       | 0     | 10    | ✅     |
    | GitLab Metrics | 2      | 0      | 1       | 0     | 3     | ✅     |
    | Secure         | 6      | 0      | 3       | 0     | 9     | ✅     |
    | Ai-powered     | 0      | 0      | 3       | 0     | 3     | ➖     |
    +----------------+--------+--------+---------+-------+-------+--------+
    | Total          | 1697   | 3      | 307     | 28    | 2007  | ❌     |
    +----------------+--------+--------+---------+-------+-------+--------+

    e2e-review-qa: :white_check_mark: test report for fce7a41d

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Create      | 8      | 0      | 3       | 0     | 11    | ✅     |
    | Package     | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Govern      | 3      | 0      | 0       | 0     | 3     | ✅     |
    | Data Stores | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Monitor     | 4      | 0      | 0       | 0     | 4     | ✅     |
    | Plan        | 3      | 0      | 1       | 0     | 4     | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 20     | 0      | 5       | 0     | 25    | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
  • Panos Kanellidis approved this merge request

    approved this merge request

  • Panos Kanellidis requested review from @bwill

    requested review from @bwill

  • Panos Kanellidis removed review request for @panoskanell

    removed review request for @panoskanell

  • Eduardo Sanz García approved this merge request

    approved this merge request

  • Eduardo Sanz García removed review request for @eduardosanz

    removed review request for @eduardosanz

  • Brian Williams approved this merge request

    approved this merge request

  • Brian Williams removed review request for @bwill

    removed review request for @bwill

  • Elwyn Benson mentioned in issue #443392

    mentioned in issue #443392

  • Elwyn Benson added 1 commit

    added 1 commit

    • 5b2540cd - Use classes better suited for form text

    Compare with previous version

  • Elwyn Benson reset approvals from @justin_ho, @bwill, and @eduardosanz by pushing to the branch

    reset approvals from @justin_ho, @bwill, and @eduardosanz by pushing to the branch

  • Elwyn Benson requested review from @eduardosanz

    requested review from @eduardosanz

  • Eduardo Sanz García approved this merge request

    approved this merge request

  • Eduardo Sanz García requested review from @cngo and @justin_ho

    requested review from @cngo and @justin_ho

  • Eduardo Sanz García removed review request for @eduardosanz

    removed review request for @eduardosanz

  • Justin Ho Tuan Duong resolved all threads

    resolved all threads

  • Justin Ho Tuan Duong removed review request for @cngo

    removed review request for @cngo

  • Justin Ho Tuan Duong enabled an automatic merge when the pipeline for 95a24416 succeeds

    enabled an automatic merge when the pipeline for 95a24416 succeeds

  • mentioned in commit b04ad812

  • mentioned in issue #443475 (closed)

  • added workflowstaging label and removed workflowcanary label

  • Elwyn Benson changed milestone to %16.10

    changed milestone to %16.10

  • Please register or sign in to reply
    Loading