Skip to content

Remove custom backgrounds from flash alerts

Austin Regnery requested to merge aregnery/remove-flash-alert-bg into master

What does this MR do and why?

Flash alerts were using a specific color variable which was mixing styles in dark mode. This change removes the unique styling from the .scss and migrate a few lingering flash alerts to Pajamas components.

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

Light mode (no visual change)

Before After
CleanShot 2024-09-05 at 08.55.04.png CleanShot 2024-09-05 at 08.54.40.png

Dark mode

Before After
CleanShot 2024-09-05 at 08.53.24.png CleanShot 2024-09-05 at 08.54.07.png

How to set up and validate locally

  1. Trigger a flash alert by creating an issue to resolve a discussion thread in a merge request

  2. Terms of service (can be added via http://gdk.test:3000/admin/application_settings/general#js-terms-settings)

  3. In the milestone overview if you have more than 500 issues warning (http://gdk.test:3000/flightjs/Flight/-/milestones/6#tab-issues)

    Heres a script you can use in the rails console to generate it
    # Replace these with your actual project ID and milestone ID
    project_id = 7  # Your project ID
    milestone_id = 35  # Your milestone ID
    
    # Find the project and milestone by ID
    project = Project.find(project_id)
    milestone = Milestone.find(milestone_id)
    
    # Use the first user in the database, or you could find a specific user by ID
    user = User.first
    
    600.times do |i|
      result = Issues::CreateService.new(
        container: project,
        current_user: user,
        params: {
          title: "Issue #{i+1}",
          description: "This is the description for issue #{i+1}",
          milestone_id: milestone.id
        }
      ).execute
    
      if result.success?
        issue = result.payload[:issue]
        puts "Created issue ##{i+1}: #{issue.iid} (ID: #{issue.id})"
      else
        puts "Failed to create issue ##{i+1}: #{result.message}"
      end
    
      sleep 0.1  # Small delay to avoid overwhelming the system
    end
    
    puts "Finished creating issues."
    
    # Print a summary
    total_issues = project.issues.count
    milestone_issues = milestone.issues.count
    puts "Total issues in project: #{total_issues}"
    puts "Issues assigned to milestone: #{milestone_issues}"
  4. Compare light and dark mode

Edited by Dan MH

Merge request reports

Loading