dongjoon-hyun opened a new pull request, #58387:
URL: https://github.com/apache/spark/pull/58387

   ### What changes were proposed in this pull request?
   
   This PR renders the web UI's inline `(kill)`, `(hold)`, and `(resume)` text 
links as buttons, using the `btn btn-sm btn-outline-*` style already used 
elsewhere in the UI.
   
   - Master UI application and driver tables: these controls are already 
wrapped in `POST` forms, so their anchors become `<button type="submit">`.
   - Stage and job tables, and the jobs page summary: these must stay `GET` 
links (SPARK-6846: the YARN AM proxy does not forward `POST`), so they remain 
anchors and gain `role="button"`.
   - `kill` uses `btn-outline-danger` and `hold`/`resume` use 
`btn-outline-secondary`, separating the destructive control from the reversible 
one.
   - Labels drop the parentheses that marked them as links: `(kill)` -> `Kill`, 
`(hold)` -> `Hold`, `(resume)` -> `Resume`.
   - Because a submit button posts its own form, `webui.js` no longer has to 
submit the form on the anchor's behalf. The two otherwise identical 
confirmation handlers collapse into one that works for both links and buttons 
(22 lines -> 8).
   - `kill-link` and `confirm-link` remain as JS and test hooks but no longer 
carry colors; the Bootstrap button variant owns those now.
   - `docs/web-ui.md` and `docs/spark-standalone.md` are updated to match the 
new labels.
   
   ### Why are the changes needed?
   
   These controls perform actions -- killing an application, stage, or job, and 
holding or resuming an application -- but render as small parenthesized 
secondary-colored text, which reads as body copy rather than as something 
clickable, and gives a hit target only as wide as the word.
   
   This also aligns them with the button style the UI has been converging on. 
SPARK-59066 and SPARK-59067 recently moved the History Server's `Download` 
control and the SQL execution page's `Download` control to `btn btn-sm 
btn-outline-secondary`; this PR applies the same style to the remaining inline 
controls.
   
   Converting the Master UI's `POST` controls to real submit buttons also makes 
them reachable by keyboard, which `<a href="#">` was not, and removes the JS 
workaround that submitted the form for them.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, this is a visual change to the web UI. The controls listed above now 
render as buttons and their labels lose the surrounding parentheses.
   
   One behavior change is worth calling out: the Master UI's kill, hold, and 
resume controls are now native submit buttons, so if `webui.js` fails to load, 
clicking one posts the form without showing the confirmation prompt. Previously 
the `<a href="#">` did nothing at all without JS. This matches the driver UI's 
kill and hold controls, which are `GET` links and have always navigated without 
a prompt when JS is unavailable.
   
   ### How was this patch tested?
   
   - Existing coverage is unaffected: `UISeleniumSuite` locates these controls 
by the `kill-link` and `confirm-link` class names, which are preserved, and 
`MasterWebUISuite` asserts on the rendered `app/kill/`, `app/hold/`, and 
`app/resume/` form actions, which are unchanged.
   - `core/compile`, `core/scalastyle`, and `dev/lint-js` pass.
   - Verified manually in a browser against the real `bootstrap.min.css` and 
`webui.css`, in both the light and dark themes, that the confirmation prompt 
still guards every control: cancelling leaves the form unsubmitted and the link 
not followed, and accepting proceeds, for both the submit-button and the anchor 
forms.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to