-
Notifications
You must be signed in to change notification settings - Fork 353
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
Webui pre blivet dialogs #5113
Webui pre blivet dialogs #5113
Conversation
3db5a23
to
d794140
Compare
d794140
to
760b0c3
Compare
Added the tests. |
760b0c3
to
bd6baea
Compare
bd6baea
to
3c9ced2
Compare
3c9ced2
to
d89c94c
Compare
Thanks for adding this and exploring the various options. Delay (option # 1) is the best approach. The other options are a bit confusing if you switch windows between the two. (Most people wouldn't switch back, nor should they really.) It's not obvious why it would still be launching (with a spinner) when the application is already launched, or why clicking cancel (which, by definition, should back out and do nothing) would stop the program. Additionally, if Blivet is doing some long-running action and someone switched back and clicked cancel, it would stop the operation and leave their system in an inconsistent and unusable state. While the delay is not really tied to launching, if the delay is long enough, switching the dialog won't be detected, as Blivet will be above it. The trick is to make delay long enough but not too long. It seems fine there. Is there a way to know if the window closed and to make sure it's at the second dialog if Blivet has exited? Then we could have the short delay and be sure that someone didn't just open and immediately quit Blivet and still have the launching screen. Ideally, if Blivet didn't make any changes, then we could even skip the rescan dialog and go directly back to Anaconda without any dialog at all. |
Yes, that is my point, in current state switching back is in majority of cases an accident
Agreed, perhaps it seemed more obvious to me because I implemented it:). Another approach could be to kill blivet-gui on the next "Modify storage" if it is running in a lost/hidden window (that is what we are using in Gtk GUI and nm-connection-editor app used there, but in this case the window is lost for good if moved to the background). But perhaps the most safe would be just scenario 1. - either user needs try hard to bring back the blivet-gui window (and we can maybe try to make it easier somehow), or just crash hard if it runs blivet-gui second time, but do not kill it (secretly) so we don't leave the system in some inconsistent / unstable state for following installation. |
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.
Looks good to me, thanks! :)
Just some small wording suggestions.
}> | ||
<TextContent> | ||
<Text component={TextVariants.p}> | ||
{_("Blivet is and advanced storage editor that lets you resize, delete, and create partitions. It can set up LVM and much more.")} |
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.
I guess this should be "Blivet GUI" instead of just "Blivet" ? I'm thinking that saying "Blivet GUI" also makes it possible users might find relevant documentation/HOWTOs instead of possibly finding the Blivet library refferrence.
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.
Updated in a separate commit.
blivetProcessRef.current = null; | ||
cockpit.spawn(["killall", "blivet-gui"], { err: "message" }) | ||
.then(() => { | ||
console.log("Blivet stopped."); |
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.
Maybe "Blivet GUI" there as well ? Could be otherwise easily confused with something going wrong the Blivet library itself.
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.
Updated in a separate commit.
I am going to update the PR for the version 1. |
Yes, this should be easy, I'll add it. |
d89c94c
to
7f1274d
Compare
Blivet is a library, Blivet-gui is the name of the application run.
7f1274d
to
4476af5
Compare
Done
Added. Also I've replaced Blivet with Blivet-gui name (webui: use Blivet-gui name instead of Blivet). |
/kickstart-test --waive webui-only |
}> | ||
<TextContent> | ||
<Text component={TextVariants.p}> | ||
{_("Blivet-gui is and advanced storage editor that lets you resize, delete, and create partitions. It can set up LVM and much more.")} |
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.
typo: "an advanced storage editor", not "and advanced storage editor"
Could we extend this to also show information on the required partitions for the current configuration? This would help with https://bugzilla.redhat.com/show_bug.cgi?id=2237527 ... |
Do we not have the required partitions popover implemented yet? 🤔 (I was away on PTO and the end of last month and had a face to face meeting with the Cockpit team last week, so I hadn't had the chance to double check the current state of the installer.) If it is missing (and it sounds like it), then we could integrate it into the "Modify storage" modal as @AdamWill suggests, like this: Reminder: I made up these partitions and sizes. They might happen be accurate, but probably aren't. And there might be other partitions (such as /boot/efi and so on). The only down side of this, is that the reference will go away when Blivet is launched, unless we change how the modal changes from launch to rescan. (It would have to drop the spinner state after the delay instead of switching. And it would have to switch to the rescan modal when Blivet-gui exits.) But it would be clearer what's needed. |
Addresses https://issues.redhat.com/browse/INSTALLER-3638
TODO
The first commit is independent, I'll post it separately.
I started with version of dialog flow designed in the jira issue (1.) but then I tried some other solutions mainly to handle the situation of blivet-gui window
disappearinghidden behind installer window. I am posting screencasts of 2 other solutions (2., 3.).As another alternative it may be also possible to try to force the blivet-gui window always on top but I guess this can be convoluted.UPDATE: looking at it again the blivet-gui window hidden behind installer window is perhaps not such a big issue (I was perhaps mislead by the situation in Gtk GUI and nm-connection-editor where it is more difficult to get the window back.)following the design (https://issues.redhat.com/browse/INSTALLER-3638?focusedId=22823818&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-22823818).
The Rescan dialog appears shortly after blivet-gui is launched (we need to use some delay, we don't have an event)
Normal flow:
https://rvykydal.fedorapeople.org/webui/pre-blivet/pre-blivet-mockup.webm
Lost window flow:
Crash on second run of blivet-gui.
https://rvykydal.fedorapeople.org/webui/pre-blivet/pre-blivet-mockup-lost-window.webm
Move to the Rescan dialog when blivet-gui exits
(commit webui: move to rescan dialog only after quitting blivet-gui)
Normal flow:
https://rvykydal.fedorapeople.org/webui/pre-blivet/pre-blivet-rescan-on-exit.webm
Lost window flow:
https://rvykydal.fedorapeople.org/webui/pre-blivet/pre-blivet-rescan-on-exit-lost-window.webm
It is not possible to continue until user finds
(via Alt-Tab)and closes the window, hence the variant 3)Don't disable Cancel so it can be used escape (and kill blivet-gui) lost blivet-gui window. Same as 2) Move to Rescan dialog when blivet-gui exits (now either by finishing or on Cancel/kill).
(commit webui: allow to kill blivet-gui with Cancel button)
Normal flow:
https://rvykydal.fedorapeople.org/webui/pre-blivet/pre-blivet-kill-on-cancel.webm
Lost window flow:
Lost blivet-gui can be killed by Cancel.
https://rvykydal.fedorapeople.org/webui/pre-blivet/pre-blivet-kill-on-cancel-lost-window.webm
A blivet-gui crash should be still handled as Critical Error:
https://rvykydal.fedorapeople.org/webui/pre-blivet/pre-blivet-kill-on-cancel-crash.webm