Mass button migration, part 2
|
---|
Before diving into the review, pick the files you'll be reviewing and add your name in the UX review tracker below. |
What does this MR do and why?
This migrates many links that are styled to look like buttons to the link_button_to
helper added in !121772 (merged).
These migrations were largely done blind, in that a codemod was used to perform them.
Note that a number of the migrated link buttons have existing issues, for instance:
- some do not have an accessible name;
- some use a
disabled
attribute/style, which makes no sense for a link.
This MR does not fix those issues. It is simply about replacing link_to
calls with CSS classes applied with a better encapsulated link_button_to
helper.
Part of https://gitlab.com/gitlab-com/gitlab-OKRs/-/work_items/2030.
Commits
Normalise classes to string
Manually migrate unusual cases
Migrate unusual case
Allow components to use link_button_to
A later commit will update the templates of these components to use this helper method.
Fix previously missed migration
It seems this new RSS link button was added in !123674 (merged) was merged while the previous mass migration MR !121772 (merged) was in review.
Mass button migration
Executed with:
comby \
-config ~/dev/pajamas-adoption-scanner/comby/button-2.toml \
-custom-matcher ~/dev/pajamas-adoption-scanner/comby/haml.json \
-matcher .generic -in-place \
-f .haml
Using the button-migration
branch of the Pajamas Adoption Scanner: https://gitlab.com/gitlab-org/frontend/pajamas-adoption-scanner/-/commits/button-migration
Remove unused styles
Now all buttons here should be Pajamas-compliant, and so colour their icons correctly themselves.
Remove redundant btn-inverse class
Screenshots or screen recordings
In theory, there should be no visual or behavioral differences.
How to set up and validate locally
Because this changes buttons in various places across the app, there's no single process to validate this. Instead, I can provide some heuristics:
- Choose a file in the diff.
- Based on its name, or the user-facing strings inside it, guess where it appears in the app.
- Either:
- try to perform the actions necessary to render the button(s) in the file, or
- change the code to force the button to render.
- Verify the button looks correct.
- Verify clicking the button has the correct behavior. Note: this might not always be a simple page load! Buttons which have, e.g.,
method: :post
or similar on them might have other behavior.
UX review tracker
- Once you have picked the files you will review, add your username next to them (or to the containing folder) so that everyone's aware of who is reviewing what, and we avoid duplicate efforts.
- After you've reviewed them, check them off. Thank you!
-
📂 app/-
📂 assets/stylesheets/page_bundles/-
project.scss
-
-
📂 components/pajamas/-
banner_component.html.haml -
banner_component.rb
-
-
📂 views/-
📂 admin/-
applications/_form.html.haml @annabeldunstone -
hooks/edit.html.haml @seggenberger -
topics/_topic.html.haml @annabeldunstone -
users/show.html.haml @annabeldunstone
-
-
📂 devise/-
sessions/email_verification.haml - Seeking advice! See !125126 (comment 1458126304)
-
-
📂 groups/-
settings/_general.html.haml @annabeldunstone
-
-
invites/show.html.haml -
📂 profiles/-
chat_names/_chat_name.html.haml -
emails/index.html.haml @danmh
-
-
📂 projects/-
_customize_workflow.html.haml -
_home_panel.html.haml @seggenberger -
_new_project_fields.html.haml @seggenberger -
no_repo.html.haml @annabeldunstone -
_readme.html.haml @annabeldunstone -
_wiki.html.haml @annabeldunstone -
blob/_new_dir.html.haml @annabeldunstone -
branches/new.html.haml @seggenberger -
buttons/_download_links.html.haml @seggenberger -
commit/_commit_box.html.haml @seggenberger -
deploy_keys/edit.html.haml @danmh -
diffs/_diffs.html.haml @seggenberger -
environments/empty_metrics.html.haml @danmh no change → !125126 (comment 1461782272) -
forks/error.html.haml -
hook_logs/show.html.haml @danmh -
hooks/edit.html.haml @seggenberger -
📂 issues/service_desk/ @danmh -
jobs/_table.html.haml @sunjungp -
mattermosts/_no_teams.html.haml -
milestones/_form.html.haml @sunjungp -
pages/_list.html.haml -
📂 pages_domains/-
_dns.html.haml -
_lets_encrypt_callout.html.haml -
new.html.haml -
show.html.haml
-
-
pipeline_schedules/_form.html.haml @sunjungp -
📂 protected_tags/shared/ @danmh -
runners/_runner.html.haml @gdoyle -
📂 settings/ -
snippets/index.html.haml @sunjungp
-
-
protected_branches/shared/_protected_branch.html.haml @danmh -
sent_notifications/unsubscribe.html.haml -
📂 shared/-
_auto_devops_implicitly_enabled_banner.html.haml @aregnery -
_no_password.html.haml @aregnery -
_no_ssh.html.haml @aregnery -
🚩 _project_limit.html.haml @aregnery → (see thread) -
_prometheus_configuration_banner.html.haml (comment - could not find) -
_service_ping_consent.html.haml @aregnery -
doorkeeper/applications/_show.html.haml @aregnery -
📂 empty_states/-
_issues.html.haml - @ameliabauerly -
_labels.html.haml - @ameliabauerly -
_merge_requests.html.haml - @ameliabauerly -
_profile_tabs.html.haml - @ameliabauerly -
_snippets.html.haml - @ameliabauerly -
_wikis.html.haml @aregnery
-
-
📂 integrations/-
gitlab_slack_application/_slack_integration_form.html.haml -
prometheus/_custom_metrics.html.haml -
slack_slash_commands/_help.html.haml @aregnery
-
-
issuable/_form.html.haml -
milestones/_milestone.html.haml @sunjungp -
web_hooks/_web_hook_disabled_alert.html.haml
-
-
-
-
📂 ee/app/-
components/namespaces/storage/limit_alert_component.html.haml -
📂 views/-
📂 admin/-
application_settings/_elasticsearch_form.html.haml -
licenses/_summary.html.haml
-
-
📂 groups/-
billings/_subgroup_billing_plan_header.html.haml -
hook_logs/show.html.haml -
hooks/edit.html.haml @seggenberger -
protected_environments/_protected_environment.html.haml @danmh -
saml_group_links/_saml_group_link.html.haml -
📂 settings/domain_verification/-
_lets_encrypt_callout.html.haml -
new.html.haml -
show.html.haml
-
-
-
📂 layouts/header/-
_licensed_user_count_threshold.html.haml -
_read_only_banner.html.haml -
_seat_count_alert.html.haml
-
-
📂 shared/-
_manual_quarterly_reconciliation_banner.html.haml -
_namespace_user_cap_reached_alert.html.haml -
_new_user_signups_cap_reached_alert.html.haml -
_submit_license_usage_data_banner.html.haml -
_ultimate_trial_callout_content.html.haml -
📂 credentials_inventory/-
personal_access_tokens/_personal_access_token.html.haml -
resource_access_tokens/_resource_access_token.html.haml
-
-
📂 promotions/-
_promote_epics.html.haml -
_promote_issue_weights.html.haml -
_promote_mobile_devops.html.haml -
_promotion_link_project.html.haml
-
-
web_hooks/_group_web_hook_disabled_alert.html.haml
-
-
-
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.