cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
10.99k stars 1.1k forks source link

PatternFly 6 upgrade preparation work #20973

Open jelly opened 2 weeks ago

jelly commented 2 weeks ago

Upgrading to PF6 will be a major task in all our Cockpit projects. This issue is here to collect everything which we can do upfront to make the bump to PF6 less painful:

More PF issues can be found with:

git grep "github.com/patternfly/patternfly"
jelly commented 2 weeks ago

Most of the codemods change code to renamed properties or changed implementations which we can't do upfront.

Instead of changing all our tests to handle pf-v5-c -> pf-v6-c we could write our tests like:

test/verify/check-users:        b.wait_visible("#accounts div.pf-v5-c-empty-state")
test/verify/check-users:        b.wait_visible(f"#accounts div.{self.pf_version}-c-empty-state")
jelly commented 1 week ago

nav tertiary looks :100: different from the horizontal subnav. The screenshot is stretched because of the Flex we have there.

image

garrett commented 1 week ago

nav tertiary looks 💯 different from the horizontal subnav. The screenshot is stretched because of the Flex we have there.

Yep, it's not a replacement, regardless of what they've said. The visual replacement would be tabs, but they should activate a location instead of switch a tab notebook.

In other words, I think this is what we'd want instead (tabs as navigation): https://www.patternfly.org/components/tabs/#tabs-linked-to-nav-elements

If that doesn't work, a fallback could be to use the HTML version instead: https://www.patternfly.org/components/tabs/html#tabs-as-navigation — But I think the React tabs as navigation approach should work.