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 /privacy to use Sass @use (issue #10896) #15863

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maureenlholland
Copy link
Collaborator

One-line summary

Updates to new Sass @use syntax, should be no regression

  • I used an AI to write some of this code.

Significant changes and points to review

Issue / Bugzilla link

#10896

Testing

http://localhost:8000/en-US/privacy/
http://localhost:8000/en-US/privacy/email/
http://localhost:8000/en-US/privacy/websites/cookie-settings/

submit form on cookie settings page to see success message
Screenshot 2025-01-14 at 11 47 37 AM

@@ -2,11 +2,8 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

$font-path: '/media/protocol/fonts';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm fairly certain that we can remove all of these individual $font-path and $image-path declarations because they will be set only once on the initial load of lib through the base templates. All subsequent "loads" of the lib file should reference this originally loaded file (with config). Need to find a way to test this to confirm.

https://github.com/mozilla/bedrock/blob/main/media/css/protocol/protocol-mozilla.scss#L10
https://github.com/mozilla/bedrock/blob/main/media/css/protocol/protocol-firefox.scss#L9
https://github.com/mozilla/bedrock/blob/main/media/css/protocol/protocol-mozilla-2024.scss#L7

Copy link
Collaborator Author

@maureenlholland maureenlholland Jan 14, 2025

Choose a reason for hiding this comment

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

For my own future reference, the "privacy" files don't seem to pick up the previous configuration. They use the protocol default "../img"

Added a wordmark to test

no config (default path)
no-config

with config (expected path)
with-config

So it is important to keep these variables when there are internal references within the protocol components (ie. wordmark, logo, modal) @used in the file: https://github.com/search?q=repo%3Amozilla%2Fprotocol%20%24image-path&type=code

@maureenlholland maureenlholland marked this pull request as ready for review January 14, 2025 19:51
@maureenlholland maureenlholland requested a review from a team as a code owner January 14, 2025 19:51
@maureenlholland maureenlholland added P3 Third level priority - Nice to have Needs Review Awaiting code review Review: µ Code review time: 5 minutes or less Frontend HTML, CSS, JS... client side stuff labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend HTML, CSS, JS... client side stuff Needs Review Awaiting code review P3 Third level priority - Nice to have Review: µ Code review time: 5 minutes or less
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant