Implement Web Assets' theme system and selection, and add 'light' theme #118

Merged
Márton Lente merged 97 commits from martonlente/extensions-website:ui/theme-light into main 2024-05-08 14:20:07 +02:00

This pull request is based on #114. Merge the latter first.

This pull request will enable the theme system, and the optional light theme introduced in Web Assets v2. It resolves local contrast issues, and makes the necessary project-specific changes.

The theme remains dark by default, that users can set to either 'system-preferred' or 'light' respectively. User selection is stored in browser's local storage, and will prevail on next page loads.

See the mockups for reference:

extensions-website mockup BWA theme system
extensions-website mockup BWA theme system
extensions-website mockup BWA theme system
extensions-website mockup BWA theme system
extensions-website mockup BWA theme system

This pull request is work in progress.

This pull request is based on #114. Merge the latter first. This pull request will enable the theme system, and the optional light theme introduced in Web Assets v2. It resolves local contrast issues, and makes the necessary project-specific changes. The theme remains dark by default, that users can set to either 'system-preferred' or 'light' respectively. User selection is stored in browser's local storage, and will prevail on next page loads. See the mockups for reference: ![extensions-website mockup BWA theme system](https://projects.blender.org/attachments/d0029777-1e7f-4099-af98-23e2268ac446) ![extensions-website mockup BWA theme system](https://projects.blender.org/attachments/1f5f2e76-ffaa-4adf-8a04-17f2f26d282e) ![extensions-website mockup BWA theme system](https://projects.blender.org/attachments/0fa43dfe-382a-4971-af79-27e7f0709177) ![extensions-website mockup BWA theme system](https://projects.blender.org/attachments/52f51c0c-af28-4fca-9b2a-7658642a56ee) ![extensions-website mockup BWA theme system](https://projects.blender.org/attachments/cb7482bf-d559-487e-96da-b53b18fd6fff) This pull request is work in progress.
Márton Lente added 55 commits 2024-05-06 18:54:34 +02:00
Run post web-assets v2 upgrade script bash helper for converting sizes and units to new rem sizing, and implement 4 px based sizing.
Implement web-assets v2 theme switcher, and initialize a light-theme for the UI.
Refactor template card to use web-assets component markup and styles.
Cleanup and remove redundant project-specific styles ext-card after web-assets v2 upgrade.
Refactor and organize style partials and rules after web-assets v2 upgrade.
Change post web-assets v2 upgrade explicit size values to variable based sizing for modularity.
Fixes Abuse Report status in detail page looked like an alert, not a badge.
Improve template users tabs and and nav pills styles to match UI patterns that are present in Web Assets.
Márton Lente added 35 commits 2024-05-07 12:05:44 +02:00
Add JavaScript app function agreeWith terms to enable button submit if agree with terms button is checked.
Based on the proposal #93

Email subjects change to the following:

```
Add-on approved: "Genuinely Disgusting"
New comment on Add-on "Genuinely Disgusting"
Add-on rated: "Genuinely Disgusting"
Add-on reported: "Genuinely Disgusting"
Add-on rating reported: "Genuinely Disgusting"
Add-on changes requested: "Genuinely Disgusting"
Add-on review requested: "Genuinely Disgusting"
```

Notification emails can also be viewed in the admin `Email previews` section (with fake objects constructed and passed into email template contexts).

Indicating why the email was sent is not in this change because we currently don't store why **precisely** (can only guess it's either because of `moderators` group or extension follow, the state of either can change after the notification was generated). This can be part of the `Notification` records however, after that the reason can be included in the email.

Reviewed-on: #96
Reviewed-by: Oleg-Komarov <oleg-komarov@noreply.localhost>
This reverts commit bddbcd3ad9.
This should help with UI improvements listed in
#105
Normally this shouldn't happen, but due to an incomplete data migration #94
we currently have extensions that have only CMT items and miss the AWR one.
Add templates components form fields placeholders. Placeholder texts' are as specific as possible based on templates' architecture (so that shared fields have generic placeholder texts).
Márton Lente added 1 commit 2024-05-07 12:11:25 +02:00
Márton Lente added 1 commit 2024-05-07 12:34:31 +02:00
Márton Lente added 1 commit 2024-05-07 12:42:28 +02:00
Improve component hero styles when the component is applied on a flatpage. This reolves contrast issues with dark and light themes too.
Márton Lente added 1 commit 2024-05-07 12:51:29 +02:00
Change component list filter background colour for better contrast with dark and light themes.
Márton Lente added 1 commit 2024-05-07 13:10:25 +02:00
Map style component stars bg colour to design system colour so that it improves consistency, and work with both dark and light themes.
Márton Lente changed title from WIP: Implement Web Assets' theme system and selection, and add 'light' theme to Implement Web Assets' theme system and selection, and add 'light' theme 2024-05-07 14:59:14 +02:00
Márton Lente added 1 commit 2024-05-08 14:05:01 +02:00
Márton Lente added 1 commit 2024-05-08 14:09:16 +02:00
Márton Lente merged commit 9300b78c70 into main 2024-05-08 14:20:07 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/extensions-website#118
No description provided.