Disable interface for managing custom Zone CSS and migrate all rules to /media

REOPENED
Unassigned

Status

Mozilla Developer Network
Design
--
enhancement
REOPENED
4 years ago
7 months ago

People

(Reporter: openjck, Unassigned)

Tracking

(Blocks: 1 bug)

Details

(Whiteboard: [type:change][triaged])

(Reporter)

Description

4 years ago
This is very similar to bug 944183, including being just as controversial.

By disabling the interface for managing custom Zone CSS and moving all rules to /media, we would improve performance and allow visual changes currently made through this interface to take advantage of code review and other quality assurance steps we have in place.
(Reporter)

Comment 1

4 years ago
Actually, I'm going to mark this as invalid. I think we do want to improve this at some point, but I'm not convinced this is the best way to do it.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INVALID
(Reporter)

Updated

4 years ago
Resolution: INVALID → WONTFIX
(Reporter)

Comment 2

4 years ago
Going to reopen this, actually.

There may be some kinda-sorta-questionably legitimate reasons to keep Zone CSS editing around (and the list of reasons will increase as the feature remains available), but we can offer better solutions for those needs as we find them. Allowing users to edit page CSS through the interface is never going to be the right solution long term.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
(Reporter)

Comment 3

4 years ago
Another downside of Zone CSS is that volunteers cannot contribute to it. In bug 947613, Anush knew how to fix the bug he discovered, but he was not able to contribute the fix because Zone CSS can only be edited by administrators.

Updated

4 years ago
Severity: normal → enhancement
(Reporter)

Updated

4 years ago
Whiteboard: [type:change][triaged]
So what's the alternative? Are we talking about making this style something that we can give permissions to edit? If so, wonderful!
Blocks: 1158239

Comment 5

8 months ago
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/a6ef8ef13e7b59b6e9cca992d0be5ecd4d4b3321
Bug 944186: Migrate all zone custom CSS to kuma, serve in zones.css

- custom CSS copied out of django database
- broken into smaller component files
- edited to conform to code style guidelines
- duplicate code removed
- styles that are no longer in common usage removed
- added attribute selector based on data-slug to swap header images
  - also re-wrote the image code to be more versatile
  - removed some of the custom image sizes and positions
- added zone heading images to kuma and optimized

https://github.com/mozilla/kuma/commit/9b5e9aaa385ddae0e13c8765f0a92027016ba1ef
Merge pull request #4206 from mozilla/944186-zone-css

Bug 944186: Migrate all zone custom CSS to kuma, serve in zones.css

Comment 6

8 months ago
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/2da82b652730ffcdbc0088b19bbf51279707051e
bug 944186: Merge pull request #4221 from mozilla/944186-zone-css

Correct file name for Firefox zone image

Comment 7

7 months ago
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/68ba7c9f2169c50ac1e6ff94915d7f9d89547478
Bug 944186: Merge pull request #4224 from mozilla/944186-zone-css

Add Addons styles to combined zones.scss

Comment 8

7 months ago
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/c8f06166fe236f6f3689ee29425e8f71ad6338cd
bug 944186: Merge pull request #4209 from escattone/alt-zone-css-944186

Change styles on DocumentZone models

Comment 9

7 months ago
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/274c2b0ac09db63000c85ee3f115c540240045df
bug 944186: Merge pull request #4225 from mozilla/944186-zone-css-dup

Add separate zone style sheets, do not remove combined zones.css yet

Comment 10

7 months ago
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/0a6e4a640da875545a17b662e91a0e4942870293
Bug 944186: Merge pull request #4230 from mozilla/944186-zone-css-names

Bug 944186: Adjust file names for zone styles

Comment 11

7 months ago
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/a00a3fc7ef99fd923a4f193f7fa429886ea312a7
Merge pull request #4235 from mozilla/944186-zone-css-dup

Bug  944186: Tweaks to individual zone styles
Here's what got pushed to production today:

Zones no longer have database-stored CSS.  Instead there is a "css_slug" field.  The Firefox zone has css_slug=firefox, which means that it loads zone-firefox.css, which add the custom image, etc.  That CSS and assets are checked into the Kuma code base.

Zones with an empty css_slug get a generic zones.css files, which is also in Kuma, and gives a blue header, etc.

If you want to experiment with changing zone CSS, you'll need to install a development version of Kuma. make your changes, and submit a PR.  Yes, this is harder than editing it on Kuma, however, it is easier to install a development environment today than it was 4 years ago.

As part of this change, there is some locale fallback, so that translations automatically get the styling of the English zone.  This only works if the zone doesn't have a vanity URL, so Firefox and Add-ons, for example, still need custom setup to get custom zone styling.

There are some additional changes needed before we close the bug.

Comment 13

7 months ago
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/078b9c7c6db1d0b1ca5a6a0d593b2767e32d8071
Bug 944186: Remove duplicate zone styles from zones.scss

https://github.com/mozilla/kuma/commit/511c9dd27cd174699d7fbe17bdce9686de67e3dd
Merge pull request #4229 from mozilla/944186-zone-css-de-dup

Bug 944186: Remove duplicate zone styles from zones.scss
See Also: → bug 1365960

Comment 14

7 months ago
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/5db9be279d8f985cd82888695b3303cb8f7c9fb0
bug 944186: increase cache lifetime for nearest-zone job

* this should ease the spike in celery
  tasks (bug 1366044)
You need to log in before you can comment on or make changes to this bug.