fxcss 0.23.0__tar.gz → 0.25.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fxcss-0.23.0 → fxcss-0.25.0}/PKG-INFO +239 -19
- {fxcss-0.23.0 → fxcss-0.25.0}/README.md +238 -18
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/__init__.py +1 -1
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/audit.py +181 -63
- fxcss-0.25.0/fxcss/capture.py +258 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/catalogue.py +30 -12
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/check.py +48 -10
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/cli.py +86 -6
- fxcss-0.25.0/fxcss/compare.py +602 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/core.py +508 -23
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/fetch.py +5 -2
- fxcss-0.25.0/fxcss/omni.py +275 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/scaffold.py +72 -6
- fxcss-0.25.0/fxcss/support.py +583 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/templates/firefox-watch.yml +36 -7
- fxcss-0.25.0/fxcss/templates/pr-preview-publish.yml +655 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/templates/pr-preview.yml +56 -2
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss.egg-info/PKG-INFO +239 -19
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss.egg-info/SOURCES.txt +2 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/tests/test_capture_coverage.py +49 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/tests/test_checks.py +201 -12
- fxcss-0.25.0/tests/test_support.py +278 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/tests/test_units.py +367 -10
- fxcss-0.25.0/tests/test_workflows.py +612 -0
- fxcss-0.23.0/fxcss/capture.py +0 -82
- fxcss-0.23.0/fxcss/compare.py +0 -277
- fxcss-0.23.0/fxcss/omni.py +0 -148
- fxcss-0.23.0/fxcss/templates/pr-preview-publish.yml +0 -372
- fxcss-0.23.0/tests/test_workflows.py +0 -274
- {fxcss-0.23.0 → fxcss-0.25.0}/LICENSE +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/__main__.py +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/adopt.py +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/complete.py +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/install.py +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/probe.py +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/sheets.py +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/templates/pr-preview-cleanup.yml +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/templates/readme-previews.yml +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/templates/showcase.yml +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/templates/starter/chrome/userChrome.css +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/templates/starter/custom/accent-red.css +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss/tweaks.py +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss.egg-info/dependency_links.txt +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss.egg-info/entry_points.txt +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss.egg-info/requires.txt +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/fxcss.egg-info/top_level.txt +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/pyproject.toml +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/setup.cfg +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/tests/test_patch_duplicates.py +0 -0
- {fxcss-0.23.0 → fxcss-0.25.0}/tests/test_profile_safety.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fxcss
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.25.0
|
|
4
4
|
Summary: Live-reload, inspect and screenshot-test Firefox userChrome.css themes
|
|
5
5
|
Author: AdamXweb
|
|
6
6
|
License: MIT
|
|
@@ -736,7 +736,9 @@ operating systems separate. `--firefox beta` overrides the list for one run.
|
|
|
736
736
|
| --- | --- |
|
|
737
737
|
| `strict` / `--strict` | Fail on actionable selector findings; `--no-strict` makes them advisory. |
|
|
738
738
|
| `strict_vars` / `--strict-vars` | Also fail on dead custom properties; deliberate `fxcss-keep` overrides remain exempt. |
|
|
739
|
-
| `max_changed_percent` / `--max-changed-percent` | Fail when any view exceeds this percentage, or a new view has no baseline. Set the saved value to `null` for advisory pixel differences. Missing baseline views always need attention. |
|
|
739
|
+
| `max_changed_percent` / `--max-changed-percent` | Fail when any view exceeds this percentage, or a new view has no baseline. Set the saved value to `null` for advisory pixel differences. Missing baseline views always need attention. Standard views a newer fxcss captures that an older baseline lacks are listed as not compared, never failed; `--update-baseline` adds them. |
|
|
740
|
+
| `min_changed_percent` / `--min-changed-percent` | List a view whose change is smaller than this percentage in the report without picturing it or counting it as changed. Must not exceed `max_changed_percent`. |
|
|
741
|
+
| `views` / `--views` | Compare only views matching these patterns, such as `["light-*", "variant-*"]` or `--views 'light-*,variant-*'`. Every view is still captured and checked for coverage. A pattern that matches no view is a configuration error. |
|
|
740
742
|
| `variants` / `--variants` | Capture `all`, named stylesheets or combinations such as `compact+dark`. Set the saved value to `null` to capture the base theme only. |
|
|
741
743
|
| `toolbar` / `--toolbar` | Apply a toolbar arrangement to the toolbar capture. |
|
|
742
744
|
| `baseline`, `out` | Paths relative to the theme root; absolute paths also work. `baseline: null` runs audits and captures without visual comparison. |
|
|
@@ -763,7 +765,10 @@ fxcss shot --out shots/before
|
|
|
763
765
|
Captures the standard set of views as PNGs: browser window, focused address bar,
|
|
764
766
|
find bar and the window-modal dialog in light and dark, then playing and muted
|
|
765
767
|
audio tab indicators, container tabs, an overflowing tab strip, a private window,
|
|
766
|
-
compact density, the sidebar, right-to-left chrome, and customize mode.
|
|
768
|
+
compact density, the sidebar, right-to-left chrome, and customize mode. It also
|
|
769
|
+
captures the surfaces no window view shows, in light and dark: hovered toolbar
|
|
770
|
+
buttons, the search engine button and its menu, the app menu, extensions and
|
|
771
|
+
account panels, and Settings.
|
|
767
772
|
|
|
768
773
|
Audio views set Firefox's playing and muted tab attributes directly. They test
|
|
769
774
|
the appearance of those indicators without requiring a sound device or playing
|
|
@@ -824,6 +829,37 @@ renders nothing.
|
|
|
824
829
|
Some states depend on the Firefox build; unavailable states are reported and
|
|
825
830
|
skipped rather than treated as captured.
|
|
826
831
|
|
|
832
|
+
#### Surfaces outside the window
|
|
833
|
+
|
|
834
|
+
Each of these views is cropped to its own surface, so a change elsewhere — a
|
|
835
|
+
restyled tab strip, say — leaves it alone:
|
|
836
|
+
|
|
837
|
+
| View | Category | What it shows |
|
|
838
|
+
| --- | --- | --- |
|
|
839
|
+
| `*-05-toolbar-hover` | Toolbars | The toolbars with each toolbar button held in its `:hover` state |
|
|
840
|
+
| `*-06-search-engine` | Address bar | The focused address bar with the pointer on the search engine button |
|
|
841
|
+
| `*-07-search-menu` | Address bar | The search engine button's menu, open |
|
|
842
|
+
| `*-08-app-menu` | Panels | The app menu |
|
|
843
|
+
| `*-09-extensions-panel` | Panels | The extensions panel |
|
|
844
|
+
| `*-10-account-panel` | Panels | The account panel |
|
|
845
|
+
| `*-11-settings` | Settings | `about:preferences`, styled by `userContent.css` |
|
|
846
|
+
|
|
847
|
+
Panels are separate OS windows that Marionette cannot see, so these four are
|
|
848
|
+
taken with a screen capture of the panel's area. That needs Pillow (the
|
|
849
|
+
`fxcss[images]` extra) and briefly brings the capture Firefox to the front. The
|
|
850
|
+
capture is first checked against Marionette's own image of the window; when it
|
|
851
|
+
cannot see Firefox (no screen-recording permission on macOS, a Wayland session,
|
|
852
|
+
another window on top) the panel views are reported as unsupported with that
|
|
853
|
+
reason rather than captured wrong. A Firefox without the search engine button
|
|
854
|
+
skips its two views the same way.
|
|
855
|
+
|
|
856
|
+
These views run in a browser session of their own, so the pointer and hover
|
|
857
|
+
locks they use never reach the window views. Its window is up to 1280×900 and
|
|
858
|
+
never larger than the screen, so an open panel lies wholly over Firefox: its
|
|
859
|
+
translucent edges and rounded corners show the browser, not your desktop.
|
|
860
|
+
Anything the system draws on top during the capture is photographed too, so a
|
|
861
|
+
notification that pops up over a panel appears in that view; rerun if one did.
|
|
862
|
+
|
|
827
863
|
### fxcss compare
|
|
828
864
|
|
|
829
865
|
```bash
|
|
@@ -849,6 +885,55 @@ This is what makes it useful in CI: render your theme at the base commit and at
|
|
|
849
885
|
a pull request, and the diff shows a reviewer exactly what the change does. See
|
|
850
886
|
[Using it in CI](#using-it-in-ci).
|
|
851
887
|
|
|
888
|
+
Narrow a comparison to the views you care about, and leave out changes too
|
|
889
|
+
small to be worth a picture:
|
|
890
|
+
|
|
891
|
+
```bash
|
|
892
|
+
fxcss compare --base shots/before --head shots/after --out diff/ \
|
|
893
|
+
--views 'light-*,extra-07-many-tabs' --min-changed-percent 0.5
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
`--views` takes comma-separated patterns, with `*` and `?` as wildcards, matched
|
|
897
|
+
against capture names. The standard names are `light-` or `dark-` followed by
|
|
898
|
+
`01-window`, `02-urlbar`, `03-findbar`, `04-dialog`, `05-toolbar-hover`,
|
|
899
|
+
`06-search-engine`, `07-search-menu`, `08-app-menu`, `09-extensions-panel`,
|
|
900
|
+
`10-account-panel` or `11-settings`; `extra-04-audio`,
|
|
901
|
+
`extra-05-muted`, `extra-06-containers`, `extra-07-many-tabs`,
|
|
902
|
+
`extra-08-private`, `extra-09-compact`, `extra-10-sidebar-bookmarks`,
|
|
903
|
+
`extra-11-sidebar-history`, `extra-12-rtl`, `extra-13-customize`,
|
|
904
|
+
`extra-14-vertical-tabs` and `extra-15-toolbar`; and `variant-<name>` for each
|
|
905
|
+
optional stylesheet. A pattern that matches nothing is an error, so a typo
|
|
906
|
+
cannot quietly shrink the comparison. Unselected views are left out of
|
|
907
|
+
`summary.json` and `full/`.
|
|
908
|
+
|
|
909
|
+
`--min-changed-percent` treats a view whose changed pixels are below that share
|
|
910
|
+
as a small change: `summary.json` lists it under `below_threshold` with its
|
|
911
|
+
percentage, but no comparison image is drawn and it does not count towards
|
|
912
|
+
`changed_views` or `any_change`. A change of exactly the threshold is pictured.
|
|
913
|
+
|
|
914
|
+
#### Distinct changes
|
|
915
|
+
|
|
916
|
+
One change usually shows in many views: a restyled tab strip is in nearly every
|
|
917
|
+
window capture, in every palette. So `compare` also groups what changed into
|
|
918
|
+
**distinct changes**. Within a view, changed regions in the same part of the
|
|
919
|
+
UI (the tab strip, the page, one panel) are one change. Across views, a region
|
|
920
|
+
is the same change when its changed pixels coincide with one already seen, or
|
|
921
|
+
when it is the same move: a toolbar 1px taller pushes the page down in every
|
|
922
|
+
view, which as pixels is different text edges in each, but is recognised as
|
|
923
|
+
"moved down 1px" and grouped whatever page the view shows. Each distinct change
|
|
924
|
+
is drawn once, as `change-NN.png`, cropped to the change from the
|
|
925
|
+
full-resolution captures, and `summary.json` lists it under `changes` with the
|
|
926
|
+
views it appears in.
|
|
927
|
+
|
|
928
|
+
Every change is placed in an area of the UI: Window, Tabs, Toolbars, Address
|
|
929
|
+
bar, Find bar, Sidebar, Content, Dialogs, Panels, Settings or Optional
|
|
930
|
+
stylesheets. For window views the place comes from where Firefox's own
|
|
931
|
+
landmarks were when the capture was taken (recorded in `layout.json` next to
|
|
932
|
+
the screenshots), so a tab strip change reads as Tabs whichever view it was
|
|
933
|
+
found in. Cropped surface views take their own category. Colour is ignored when
|
|
934
|
+
grouping, so the same rule rendering in each palette's colours is one change;
|
|
935
|
+
every view keeps its own comparison image, linked from the change.
|
|
936
|
+
|
|
852
937
|
A successful comparison reports differences; changed pixels alone do not make
|
|
853
938
|
`compare` fail. Review the images to decide whether a change is intended. If
|
|
854
939
|
your project needs a pass/fail threshold, use `fxcss check` or a custom check
|
|
@@ -868,6 +953,7 @@ builds your users will get next.
|
|
|
868
953
|
| `snapshot` | Which browser UI IDs and classes were observed in a Firefox build; saves a JSON baseline. |
|
|
869
954
|
| `changelog` | Which names changed between that baseline and another build, and which removals the theme uses. |
|
|
870
955
|
| `audit` | Which selectors and custom properties need attention in the selected Firefox, with suggested fixes. |
|
|
956
|
+
| `support` | Which Firefox releases a theme change still works on: whether merging it drops styling for older releases. |
|
|
871
957
|
|
|
872
958
|
A snapshot records structure; `shot` records appearance. Neither is a profile
|
|
873
959
|
backup. Use audits and visual comparisons together: a selector can still
|
|
@@ -941,6 +1027,68 @@ Use `--baseline` with a [saved snapshot](#fxcss-snapshot) when the old build is
|
|
|
941
1027
|
no longer installed. Run `fxcss audit --firefox beta` to investigate findings
|
|
942
1028
|
against a selected channel.
|
|
943
1029
|
|
|
1030
|
+
### fxcss support
|
|
1031
|
+
|
|
1032
|
+
```bash
|
|
1033
|
+
fxcss support --base ../theme-before --head . --firefox stable
|
|
1034
|
+
```
|
|
1035
|
+
|
|
1036
|
+
Compares two revisions of a theme and says which Firefox releases the change
|
|
1037
|
+
still works on. Following a Firefox rename fixes the newest release and
|
|
1038
|
+
quietly drops that styling everywhere the old name still lives: a pull request
|
|
1039
|
+
that swaps `#sidebar-box` for `.sidebar-box` because Firefox 158 moved it is
|
|
1040
|
+
right for 158, and takes the styling away from everyone on 157 and earlier,
|
|
1041
|
+
ESR included, the moment it merges. Screenshots rendered with the newest
|
|
1042
|
+
Firefox cannot show that.
|
|
1043
|
+
|
|
1044
|
+
```text
|
|
1045
|
+
> [!WARNING]
|
|
1046
|
+
> **Merging this drops styling for Firefox 157 and earlier, ESR 153 included.**
|
|
1047
|
+
> It removes rules for `#sidebar-box`, which still match there but no longer
|
|
1048
|
+
> match in Firefox 158. Keeping the old name next to the new one
|
|
1049
|
+
> (`#old, .new`) keeps both releases styled.
|
|
1050
|
+
>
|
|
1051
|
+
> New rules for `.sidebar-box` only match from Firefox 158; older releases do
|
|
1052
|
+
> not get them.
|
|
1053
|
+
```
|
|
1054
|
+
|
|
1055
|
+
It looks at what the change removes and adds: selectors, and custom
|
|
1056
|
+
properties the theme sets. A removed rule that still matched on an older
|
|
1057
|
+
release is styling those users lose. An added rule that only matches newer
|
|
1058
|
+
releases is styling they never get. Rules that match on every release, or on
|
|
1059
|
+
none, are left out, and keeping the old name beside the new one is not a drop.
|
|
1060
|
+
Rules in optional stylesheets count too. A `<details>` list gives the file and
|
|
1061
|
+
line of each rule.
|
|
1062
|
+
|
|
1063
|
+
`--oldest` sets how far back to look: `esr` (default) for the current ESR, or a
|
|
1064
|
+
major version such as `140`. The release where a rule starts or stops matching
|
|
1065
|
+
is found by bisection, and the previous release is always checked, because a
|
|
1066
|
+
name Firefox has just retired may be younger than the oldest release checked.
|
|
1067
|
+
When the newest build is a Beta or Nightly, the report also says that merging
|
|
1068
|
+
before it ships drops the styling for every release user. `--channel` labels
|
|
1069
|
+
that build, `--json` and `--markdown` write the report to files, and the exit
|
|
1070
|
+
code is **0** when the check ran and **2** when it could not.
|
|
1071
|
+
|
|
1072
|
+
No older Firefox is run. Release builds are downloaded from
|
|
1073
|
+
archive.mozilla.org as Linux tarballs and only their `omni.ja` archives are
|
|
1074
|
+
read, for the ids, classes and custom properties the shipped chrome mentions.
|
|
1075
|
+
Each build becomes a name index of about 120 KB, kept in
|
|
1076
|
+
`~/.cache/fxcss/firefox-builds` (`--cache` to move it). A change that only edits
|
|
1077
|
+
declarations downloads nothing beyond the oldest build. One that moves names
|
|
1078
|
+
downloads a handful the first time, about 10 seconds each, at most
|
|
1079
|
+
`--max-downloads` (default 8) per run. When that budget runs out the report
|
|
1080
|
+
gives a range rather than a guess. The current ESR comes from
|
|
1081
|
+
product-details.mozilla.org.
|
|
1082
|
+
|
|
1083
|
+
It compares Linux builds throughout, so a name that only exists in macOS or
|
|
1084
|
+
Windows markup is never reported, and names inside `:not()`, `:is()` and
|
|
1085
|
+
attribute selectors are not required: both only ever hide a finding. Names are
|
|
1086
|
+
read from source, including the ones scripts set with `getElementById`,
|
|
1087
|
+
`classList` or `setAttribute`. A name a script builds at run time, from a
|
|
1088
|
+
variable, is the one blind spot, and it can cut either way: a removal can look
|
|
1089
|
+
like a drop, or an addition look newer than it is. `fxcss audit` against the
|
|
1090
|
+
live browser settles a doubtful case.
|
|
1091
|
+
|
|
944
1092
|
### fxcss audit
|
|
945
1093
|
|
|
946
1094
|
```bash
|
|
@@ -1020,9 +1168,20 @@ three cases a live probe cannot tell apart:
|
|
|
1020
1168
|
with the closest consumed name suggested when there is one
|
|
1021
1169
|
(`--panel-background` → `--panel-background-color`).
|
|
1022
1170
|
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1171
|
+
DevTools is counted separately, because it trails the browser's renames.
|
|
1172
|
+
Firefox 158's toolbar reads `--toolbarbutton-background-color-hover`, while
|
|
1173
|
+
DevTools still reads the old `--toolbarbutton-hover-background`. DevTools'
|
|
1174
|
+
stylesheets count as reading a name only when your theme sets it inside
|
|
1175
|
+
`@-moz-document url-prefix("chrome://devtools/")`, the usual way to restyle
|
|
1176
|
+
DevTools from `userChrome.css`. When nothing but DevTools still uses a name
|
|
1177
|
+
your theme sets elsewhere, the audit lists it under **DEVTOOLS ONLY** with the
|
|
1178
|
+
browser's new name. It does this even when the theme reads the name itself.
|
|
1179
|
+
|
|
1180
|
+
Reading the shipped sources also covers documents the live audit cannot open,
|
|
1181
|
+
such as dialogs and in-content pages. It also replaces the second, unthemed
|
|
1182
|
+
Firefox launch the probe needed. A custom property the theme reads but Firefox
|
|
1183
|
+
no longer provides gets the provided name it was renamed to, when the words
|
|
1184
|
+
match (`--toolbarbutton-inner-padding` → `--toolbarbutton-padding-inner`).
|
|
1026
1185
|
|
|
1027
1186
|
A name you keep deliberately — for an ESR that still reads it, say — gets an
|
|
1028
1187
|
inline pragma rather than a CI flag nobody finds later:
|
|
@@ -1031,8 +1190,8 @@ inline pragma rather than a CI flag nobody finds later:
|
|
|
1031
1190
|
--in-content-page-background: var(--gnome-menu-background) !important; /* fxcss-keep: ESR 140 reads it */
|
|
1032
1191
|
```
|
|
1033
1192
|
|
|
1034
|
-
`--strict-vars` turns dead and
|
|
1035
|
-
`fxcss-keep` lines are exempt.
|
|
1193
|
+
`--strict-vars` turns dead, stale and DevTools-only overrides into a non-zero
|
|
1194
|
+
exit for CI; `fxcss-keep` lines are exempt.
|
|
1036
1195
|
|
|
1037
1196
|
#### Unused and unreachable code
|
|
1038
1197
|
|
|
@@ -1101,6 +1260,14 @@ The default setup writes three cooperating workflows:
|
|
|
1101
1260
|
2. **Publish:** validate the artifacts, publish images to `ci-previews`, and
|
|
1102
1261
|
create or update the preview comment. Unchanged views remain available as
|
|
1103
1262
|
full screenshots.
|
|
1263
|
+
|
|
1264
|
+
The comment groups the [distinct changes](#distinct-changes) by area of the UI
|
|
1265
|
+
and pictures each once, from the first platform that has it. The same change
|
|
1266
|
+
on another platform is folded under it, with each platform's views listed and
|
|
1267
|
+
linked to their full before-and-after; a change only one platform shows is
|
|
1268
|
+
labelled as such. A tab strip restyle that touches every view therefore reads
|
|
1269
|
+
as one picture under Tabs rather than one per view per platform. Views a runner
|
|
1270
|
+
could not capture are listed as not compared.
|
|
1104
1271
|
3. **Clean up:** remove a PR's published images when it closes.
|
|
1105
1272
|
|
|
1106
1273
|
Preview comments start once the workflows are on the default branch.
|
|
@@ -1111,6 +1278,50 @@ but does not execute PR code.
|
|
|
1111
1278
|
The preview shows what changed, leaving the reviewer to decide whether it is
|
|
1112
1279
|
correct. It does not reject a PR simply because the screenshots differ.
|
|
1113
1280
|
|
|
1281
|
+
#### Choosing what the preview shows
|
|
1282
|
+
|
|
1283
|
+
Four settings at the top of `pr-preview.yml` control what is captured and
|
|
1284
|
+
what appears in the comment:
|
|
1285
|
+
|
|
1286
|
+
```yaml
|
|
1287
|
+
env:
|
|
1288
|
+
FXCSS_VARIANTS: 'compact,tabs-swapclose' # 'all' (default), '' for none
|
|
1289
|
+
FXCSS_VIEWS: 'light-*,extra-07-many-tabs' # '' (default) shows every view
|
|
1290
|
+
FXCSS_MIN_CHANGED_PERCENT: '0.5' # '0' (default) pictures every change
|
|
1291
|
+
FXCSS_OLDEST_FIREFOX: 'esr' # 'esr' (default), '140', or '' to skip
|
|
1292
|
+
```
|
|
1293
|
+
|
|
1294
|
+
- `FXCSS_VARIANTS` chooses which optional stylesheets are captured, which also
|
|
1295
|
+
shortens the run. Named stylesheets must exist in both the base branch and
|
|
1296
|
+
the pull request; `all` adapts as sheets are added.
|
|
1297
|
+
- `FXCSS_VIEWS` chooses which views are compared and shown, using the
|
|
1298
|
+
[`compare --views`](#fxcss-compare) patterns. Every standard view is still
|
|
1299
|
+
captured. The comment notes that a selection is in effect.
|
|
1300
|
+
- `FXCSS_MIN_CHANGED_PERCENT` leaves out the image for a view where less than
|
|
1301
|
+
that share of pixels changed. The comment still lists each such view with its
|
|
1302
|
+
percentage, so a small change is never reported as no change.
|
|
1303
|
+
- `FXCSS_OLDEST_FIREFOX` is the oldest Firefox the theme supports. Every
|
|
1304
|
+
comment opens with the [`fxcss support`](#fxcss-support) result for it: a
|
|
1305
|
+
warning when merging drops styling for an older release ("Firefox 157 and
|
|
1306
|
+
earlier, ESR 153 included"), a note when new rules only match newer
|
|
1307
|
+
releases, or one line saying support is unchanged. The Linux job runs the
|
|
1308
|
+
check, caches build indexes between runs, and never fails the preview over
|
|
1309
|
+
it; if it cannot run, the comment says so. The Firefox watch reads the same
|
|
1310
|
+
setting.
|
|
1311
|
+
|
|
1312
|
+
Set them when generating the workflows, or edit the file directly:
|
|
1313
|
+
|
|
1314
|
+
```bash
|
|
1315
|
+
fxcss init --variants compact --views 'light-*,variant-*' --min-changed-percent 0.5 \
|
|
1316
|
+
--oldest-firefox 140
|
|
1317
|
+
```
|
|
1318
|
+
|
|
1319
|
+
Settings are validated against the theme before anything is written. Pass
|
|
1320
|
+
`--force` to replace workflows that already exist; that also resets any
|
|
1321
|
+
settings you edited by hand to the values given on the command line. The
|
|
1322
|
+
comment wording comes from `pr-preview-publish.yml`, so regenerate both files
|
|
1323
|
+
together.
|
|
1324
|
+
|
|
1114
1325
|
### Watching Firefox for breakage
|
|
1115
1326
|
|
|
1116
1327
|
The weekly watch checks two things independently:
|
|
@@ -1125,6 +1336,13 @@ Issues close when the associated check is healthy again. Proposed fixes still
|
|
|
1125
1336
|
need review and merging. The default audit uses `--strict --no-unused`, so
|
|
1126
1337
|
custom-property failure checks are not enabled in this workflow.
|
|
1127
1338
|
|
|
1339
|
+
A fix pull request opens with the [`fxcss support`](#fxcss-support) result for
|
|
1340
|
+
the fix, back to `FXCSS_OLDEST_FIREFOX` at the top of `firefox-watch.yml`. A
|
|
1341
|
+
rename that Firefox 158 needs usually drops the styling on 157 and earlier, and
|
|
1342
|
+
a fix opened from Beta or Nightly drops it for every release user until that
|
|
1343
|
+
version ships. The pull request says which before anyone merges. Keep the old
|
|
1344
|
+
name beside the new one to support both.
|
|
1345
|
+
|
|
1128
1346
|
The generated watch does not save structural snapshots or compare screenshots
|
|
1129
1347
|
across Firefox releases. To add that history, compose `snapshot`, `changelog`,
|
|
1130
1348
|
`shot` and `compare` in a custom workflow.
|
|
@@ -1146,7 +1364,7 @@ text.
|
|
|
1146
1364
|
For a custom workflow, the core capture-and-compare steps are:
|
|
1147
1365
|
|
|
1148
1366
|
```yaml
|
|
1149
|
-
- run: pip install "fxcss[images]==0.
|
|
1367
|
+
- run: pip install "fxcss[images]==0.24.0"
|
|
1150
1368
|
- run: fxcss shot --theme base --out shots/base
|
|
1151
1369
|
- run: fxcss shot --theme head --out shots/head
|
|
1152
1370
|
- run: fxcss compare --base shots/base --head shots/head --out out/ --platform ${{ runner.os }}
|
|
@@ -1301,7 +1519,7 @@ the [releases page](https://github.com/AdamXweb/fxcss/releases) has the latest.
|
|
|
1301
1519
|
CI runners' Pythons are not externally managed, so plain pip is fine there:
|
|
1302
1520
|
|
|
1303
1521
|
```bash
|
|
1304
|
-
pip install "fxcss[images]==0.
|
|
1522
|
+
pip install "fxcss[images]==0.24.0"
|
|
1305
1523
|
```
|
|
1306
1524
|
|
|
1307
1525
|
Upgrade an existing pipx installation with `pipx upgrade fxcss`.
|
|
@@ -1363,17 +1581,18 @@ and Linux.
|
|
|
1363
1581
|
`fxcss watch --native-menus=false` switches Firefox to XUL menus so you can work
|
|
1364
1582
|
on that styling from a Mac.
|
|
1365
1583
|
|
|
1366
|
-
###
|
|
1584
|
+
### Panels need a screen capture
|
|
1367
1585
|
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
window.
|
|
1371
|
-
|
|
1372
|
-
|
|
1586
|
+
Panels and menus are separate OS-level windows, so they appear in neither a
|
|
1587
|
+
Marionette chrome screenshot nor a `drawWindow` rasterisation of the browser
|
|
1588
|
+
window. The panel views therefore capture the panel's own screen area, after
|
|
1589
|
+
checking that the screen capture shows the same window Marionette does
|
|
1590
|
+
([Surfaces outside the window](#surfaces-outside-the-window)). Where it cannot,
|
|
1591
|
+
they are reported as unsupported rather than captured from whatever is on top.
|
|
1373
1592
|
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1593
|
+
Context menus are not captured: on macOS they are native menus with no CSS to
|
|
1594
|
+
compare, and elsewhere they would need the same screen capture for little
|
|
1595
|
+
benefit over inspecting them in `watch` with the Browser Toolbox.
|
|
1377
1596
|
|
|
1378
1597
|
### Why not Selenium?
|
|
1379
1598
|
|
|
@@ -1421,6 +1640,7 @@ session's connection, which shows up as your theme mysteriously not applying.
|
|
|
1421
1640
|
| [`init`](#fxcss-init) | Add PR previews and CI checks to your theme repo |
|
|
1422
1641
|
| [`tweaks`](#fxcss-tweaks) | Screenshot every install option into a committable doc |
|
|
1423
1642
|
| [`audit`](#fxcss-audit) | Check selectors and custom properties for compatibility findings |
|
|
1643
|
+
| [`support`](#fxcss-support) | See which Firefox releases a theme change still works on |
|
|
1424
1644
|
| [`changelog`](#fxcss-changelog) | Diff two Firefox builds to see what chrome changed |
|
|
1425
1645
|
| [`snapshot`](#fxcss-snapshot) | Record a Firefox's chrome names, to diff against later |
|
|
1426
1646
|
| [`catalogue`](#fxcss-catalogue) | Build a directory of themeable UI parts |
|