Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate all admin js/css to vite compilation #23141

Merged
merged 1 commit into from
Mar 11, 2025
Merged

Conversation

KevinMind
Copy link
Contributor

@KevinMind KevinMind commented Mar 6, 2025

Fixes: mozilla/addons#15432

Description

Migrate remaining admin pages to use vite for asset compilation

Context

Removed redundant AMOModelAdmin.Media.css['all'] and AMOModelAdmin.Media.js inclusions as django admin automatically merges Media class js/css properties.

Testing

Run the following tests in prod/dev modes

make up DOCKER_TARGET=<production|development>

For each of these admin pages:

  • verify there are no 404/500 type responses for all js/css assets
  • verify there are no critical js console errors
  • verify any additional requirements on the specific page

Note

there are a few expected errors you can ignore CSP google analytics errors

AbuseReportAdmin

BlocklistSubmissionAdmin)

Note

Assuming you have a blocklist submission

Expect the "add or change blocks" section has styled content, namely the border on the addon guid input box

image

DiscoveryItemAdmin

Note

There should be at least one discovery item created, if not create one.

Expect the preview text to be formatted correctly

Note

I discovered an invalid css property "font-weight: medium" which has been replaced with the valid equivalent "500" to indicate a "light" boldness.

image

PromotedAddon

Note

Select a promoted addon, and on the hero section verify the below

Expect the color gradient selection tool is styled correctly

image

Note

expect some hero images to be uploaded here

Verify that the select image options are styled correctly

image

ScannerQueryResult

It's not totally clear to me how exactly to reproduce the conditions for the scanner results admin sections.

There is js and css that adds and styles custom classes depending on some logic... TBD

image

VersionAdmin

Note

Make sure you have a version with a release note or other translated field

Verify that the translated fields (those that have .trans class) have the locale string prefix.

TBD add the screenshot

ActivityLog

Verify that you can add/remove IP addresses via the search results page. Follow this video for details.

Screen.Recording.2025-03-10.at.12.56.14.mov

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add before and after screenshots (Only for changes that impact the UI).
  • Add or update relevant docs reflecting the changes made.

@KevinMind KevinMind force-pushed the kevinmind/addons/2000-2 branch from 27303b5 to e5e9e2a Compare March 10, 2025 10:46
@KevinMind KevinMind requested review from a team and eviljeff and removed request for a team March 10, 2025 13:40
@KevinMind KevinMind force-pushed the kevinmind/addons/2000-2 branch from e5e9e2a to 22d6b21 Compare March 10, 2025 13:47
@KevinMind KevinMind force-pushed the kevinmind/addons/2000-2 branch from 22d6b21 to 469668c Compare March 10, 2025 13:47
Copy link
Member

@eviljeff eviljeff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine, but can you clarify the single files with single import files?

@KevinMind KevinMind merged commit bf0c9f9 into master Mar 11, 2025
42 checks passed
@KevinMind KevinMind deleted the kevinmind/addons/2000-2 branch March 11, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: remaining admin pages
2 participants