feat(web): loading icon and error modal on actions + better support for Safari#823
feat(web): loading icon and error modal on actions + better support for Safari#823krish-nvidia wants to merge 5 commits intoNVIDIA:mainfrom
Conversation
…or Safari Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-04-06 15:21:29 UTC | Commit: 11943c5 |
|
It was an intentional decision to gray out the whole page when an action is submitted. We don't want the user to be clicking off the page or attempting to issue another action when one is already pending to avoid conflicts. Most actions should finish within a couple seconds but I can make it so the check mark goes away a bit quicker on a success. The error modal is already dismissible immediately via clicking off of it or the dismiss button. |
Why not? I can always close the tab, and that constitutes clicking off the page. Why do we care if they do other stuff? Also the "avoid conflicts" part is moot because other users may be issuing commands too, conflicts are stuff we have to deal with. The existing approach already disables the button itself to avoid accidental double-clicks, etc... I really don't think we need to block the page here. |
poroh
left a comment
There was a problem hiding this comment.
IMO. It looks better from visual perspective but little bit more restrictive from UX perspective.
To clarify, the previous implementation did the same thing: on submit, it disabled all links, inputs, and selects across the entire page (
These are operations that change machine state, like power cycling, resetting a BMC, or manipulating the BIOS. I'm no UX engineer, but blocking the page for those few seconds feels like a pretty standard pattern (like payment processing screens) which signals something important is happening. It reduces the chance of someone clicking something else mid-flight and potentially leaving things in a half-baked state. |
|
Just had a conversation with Leah, our UI expert, and I've been convinced to leave the spinner next to the button and not block the whole page. Will update the PR shortly. |
It's a pretty standard pattern because it's lazy. It means nobody wants to go and figure out what pieces of the UI are safe to use and which ones aren't, so they just block the whole page and let the user sit and wait. It's not something we should be moving towards if our existing UI works without it.
I wasn't aware we did this... it seems a recent change from a few weeks ago. It's a trivial fix: diff --git a/crates/api/src/web/action_status.rs b/crates/api/src/web/action_status.rs
index b851eca625..62b6bf7ac8 100644
--- a/crates/api/src/web/action_status.rs
+++ b/crates/api/src/web/action_status.rs
@@ -26,8 +26,8 @@ use itertools::Itertools;
// 3. Shows spinner
pub fn action_spinner_script(id: &str) -> String {
const HANDLER: &str = r#"function() {
- document.querySelectorAll('a, input, select, #json-link').forEach(el => el.classList.add('disabled'));
const actionCell = this.closest('.action-cell');
+ actionCell.querySelectorAll('a, input, select, #json-link').forEach(el => el.classList.add('disabled'));
if (actionCell) {
actionCell.querySelector('.action-spinner')?.style.setProperty('visibility', 'visible');
actionCell.querySelector('#action-cell-status')?.style.setProperty('visibility', 'hidden');To be clear, I like everything else about this change, especially having the error message be placed into a common location. I just don't think we need to be disabling the whole page while an operation happens. |
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
I tried it and decided not to go this way because with current design we neither can handle multiple simultaneous actions correctly, nor save user work on selecting next action. This is why I disabled everything. I agree that the best way is to fix these issues but it requires switching paradigm from form POST to Ajax. Without this paradigm shift I believe that we should either block all navigation (as before this PR) or block screen as in initial version of this PR. |

Description
This PR replaces the old inline status bubbles with a dropdown modal from the top for all web admin actions:
It also:
SetFirstBootOrder,DisableSecureBoot,EnableLockdown,DisableLockdown-webkit-backdrop-filterprefixes and abody.preloadclass to fix Safari transition flashesScreenshots
Loading Icon (Disabled Buttons)
Success
Error
Type of Change
Related Issues (Optional)
Breaking Changes
Testing
Additional Notes