Migrate Buttons to Pajamas::ButtonComponent in owner_alert_component.rb
Issue Id: #416038 (closed)
This merge request updates the owner_alert_component.rb file in the ee/app/components/namespaces/combined_storage_users directory to migrate
the existing buttons to use the Pajamas::ButtonComponent abstraction, as outlined in the parent epic &8153.
The following changes have been made:
The namespace_primary_cta method now uses the Pajamas::ButtonComponent with the following properties:
Text: "Manage usage"
Variant: "info"
Tracking Action: "click_button"
Tracking Label: "manage_users_storage_limits"
Link: group_usage_quotas_path(root_namespace, source: 'users-storage-limit-alert-enforcement')
The namespace_secondary_cta method now uses the Pajamas::ButtonComponent with the following properties:
Text: "Explore paid plans"
Variant: "default"
Tracking Action: "click_button"
Tracking Label: "explore_paid_plans"
Link: group_billings_path(root_namespace, source: 'users-storage-limit-alert-enforcement')
Additionally, a link_to code snippet in the admin_user_permission_exports_path method has been updated to use the Pajamas::ButtonComponent:
The Pajamas::ButtonComponent is rendered with the following properties:
Variant: "default"
Link: admin_user_permission_exports_path(format: :csv)
HTML Options:
Class: "gl-button btn btn-default btn-icon"
Data: { toggle: "tooltip", placement: "top", container: "body" }
Title: "Export permissions as CSV (max 100,000 users)"
Icon: "upload"
These changes improve the codebase by migrating the buttons to use the standardized Pajamas::ButtonComponent, ensuring consistent styling and behavior across the application.