-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
shell: Make it all reacty #21012
base: main
Are you sure you want to change the base?
shell: Make it all reacty #21012
Conversation
ef20c0f
to
c06e5df
Compare
The host switcher mockups are so old, they used PF3 and had the dashboard: (And the dashboard was where we edited machines prior.) For PF4, if we're doing a 1:1 port, we should consider doing popovers and having a modal show up when you add or edit without dismissing the popover. (It will look different from these mockups for sure.) |
c06e5df
to
40bd4da
Compare
f845f71
to
08db4e9
Compare
test/verify/check-pages
Outdated
@@ -71,6 +71,8 @@ class TestPages(testlib.MachineCase): | |||
m = self.machine | |||
b = self.browser | |||
|
|||
m.upload(["/home/mvo/work/cockpit/dist/shell"], "/usr/share/cockpit") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^_^
fd4891c
to
566ddbc
Compare
hosts_sel.appendChild(this.el); | ||
} | ||
|
||
componentWillUnmount() { | ||
const hosts_sel = document.getElementById("nav-hosts"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like an easy split off PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but it's only necessary here because '#nav-hosts' doesn't exist yet (in this PR only) when the file is loaded. Also, I hope we can get rid of this DOM manipulation completely in this PR. Eventually.
pkg/shell/hosts.jsx
Outdated
@@ -307,7 +306,6 @@ export class CockpitHosts extends React.Component { | |||
item_render={render} | |||
sorting={(a, b) => true} | |||
filtering={this.filterHosts} | |||
current={label} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it seems CockpitNav does not use current
at all, can we then split this removal off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that was a mistake unfortunately. It uses current
to notice when navigation has happened, and then resets the search field.
This might be a good example of hard to understand magic that we want to get rid of. There might be a signal on the ShellState that announces navigation, or we might have a navigation_counter
, or something more obvious.
b5f4113
to
39ba1c5
Compare
39ba1c5
to
7bb403f
Compare
3c98dcc
to
7be28f6
Compare
tests are green, everything below React is messy.
8ec067c
to
13770f8
Compare
269a8de
to
2d3f8aa
Compare
let's git rid of our state objects (but keep pushState and replaceState in the right places).
2d3f8aa
to
7819c2a
Compare
No description provided.