Migrate all admin js/css to vite compilation #23141
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: mozilla/addons#15432
Description
Migrate remaining admin pages to use vite for asset compilation
Context
Removed redundant
AMOModelAdmin.Media.css['all']
andAMOModelAdmin.Media.js
inclusions as django admin automatically mergesMedia
class js/css properties.Testing
Run the following tests in prod/dev modes
For each of these admin pages:
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
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.
PromotedAddon
Note
Select a promoted addon, and on the hero section verify the below
Expect the color gradient selection tool is styled correctly
Note
expect some hero images to be uploaded here
Verify that the select image options are styled correctly
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
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
#ISSUENUM
at the top of your PR to an existing open issue in the mozilla/addons repository.