Hello Cockpit developers,
for many years, Cockpit related projects used to do this in their top-level HTML:
<link rel="stylesheet" href="../base1/patternfly.css">
This was also an officially documented API, formerly at [1]. The intention (most probably) was that CSS tweaks applied to Cockpit itself would also directly apply to all projects that provide Cockpit pages, to keep a consistent look & feel.
However, this is not sustainable. PatternFly 3 has been replaced with PatternFly 4 a while ago, and Cockpit can't offer a PatternFly 3 API indefinitely. Also, base1/patternfly.css was modified heavily so that PF3 would *look like* PF4 [2]. This broke third-party extensions in a lot of subtle ways.
Thus it is better if pages are bundling their own CSS completely, and thus can update to newer PatternFly releases at their own pace, and visually check that everything fits together. That's why [1] disappeared, and this API is now deprecated. Instead, projects should include PatternFly 3 and/or 4 themselves and import (and regularly sync with) Cockpit's CSS overrides [3].
Projects that only use PatternFly 4 follow starter-kit's example [4]. Projects that still need PatternFly 3 still can instead do what cockpit-podman did [5].
Our next goal is to track down all consumers of base1/patternfly.css, and help them with the conversion. This is what we have found so far:
DONE: - cockpit itself - cockpit-podman - cockpit-ostree - cockpit-certificates
PR FILED: - cockpit-composer: https://github.com/osbuild/cockpit-composer/pull/1001 - subscription-manager: https://github.com/candlepin/subscription-manager/pull/2284 - session-recording: https://github.com/Scribery/cockpit-session-recording/pull/56
TODO (I will file issues today): - https://github.com/oamg/leapp/tree/master/cockpit - https://pagure.io/389-ds-base - https://github.com/NethServer/nethserver-cockpit (has no issues, will email maintainer directly) - https://github.com/abbra/cockpit-app-samba-ad (unclear if it's still active)
UNAFFECTED (does not use base1/patternfly.css): - https://github.com/fleet-commander/fc-admin - https://github.com/hellcatz/zcash-cli-cockpit
If you are aware of any other project, please speak up, and we are happy to help you.
We aim for dropping this API for RHEL 9 (that's pretty firm), and Fedora 34.
Thank you!
Martin
[1] https://cockpit-project.org/guide/latest/api-base1-patternfly.html
[2] So that we could do the migration to PF4 step by step, instead of a single insurmountable step)
[3] We try hard to not have any long-standing customizations. Most of them are PatternFly bug fixes which we forwarded upstream, it just always takes a bit until they get released.
[4] https://github.com/cockpit-project/starter-kit/commit/96514e279e540c
[5] https://github.com/cockpit-project/cockpit-podman/commit/86fa1ee8b84
cockpit-devel@lists.fedorahosted.org