yaooqinn opened a new pull request, #54574:
URL: https://github.com/apache/spark/pull/54574

   ### What changes were proposed in this pull request?
   
   This PR replaces the custom JavaScript collapse/toggle system 
(`collapseTable`, `collapseTablePageLoad`, arrow-open/closed classes) with the 
native Bootstrap 5 Collapse API across the entire Spark Web UI.
   
   ### Key Changes
   
   **JavaScript (`webui.js`)**
   - Removed custom `collapseTable()` and `collapseTablePageLoad()` functions
   - Removed 45+ individual `collapseTablePageLoad()` registration calls and 
click handler
   - Added BS5 event-based localStorage persistence using `shown.bs.collapse` / 
`hidden.bs.collapse` events
   - Added page-load restore handler that reads localStorage and collapses 
previously-collapsed sections
   
   **Scala HTML generators (13 files)**
   - Converted all collapsible sections to use `data-bs-toggle="collapse"` + 
`data-bs-target="#id"` on trigger elements
   - Added `id` + `collapse show` classes on content elements (initially 
visible)
   - Added `aria-expanded="true"` for accessibility
   - Used consistent `collapse-table-{name}` ID naming convention
   
   **CSS (`webui.css`)**
   - Replaced `.arrow-open` / `.arrow-closed` toggle classes with a single 
`.arrow-open` class that auto-rotates via `.collapsed` (BS5 adds this class 
automatically to collapsed triggers)
   
   ### Affected pages
   - Environment (7 sections)
   - Jobs (event timeline, active/completed/failed tables)
   - Job detail (event timeline, stages tables)
   - Stages (active/pending/completed/failed tables)
   - Pool page (stages table)
   - Stage detail (DAG viz, task tables, accumulators, executor summary)
   - Storage (RDD table)
   - Executor thread dump
   - SQL executions (running/completed/failed tables)
   - SQL execution detail (physical plan)
   - Streaming (timelines, histograms, receivers)
   - ThriftServer pages (session/operation tables)
   
   ### Why are the changes needed?
   
   Part of the Bootstrap 5 migration umbrella (SPARK-55760). The custom 
collapse system predates BS5 and duplicates functionality that BS5 provides 
natively with better accessibility support (`aria-expanded`, keyboard 
navigation) and simpler code.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No functional change. Collapse/expand behavior and localStorage persistence 
work identically.
   
   ### How was this patch tested?
   
   - Existing unit tests pass (`EnvironmentPageSuite`, `StoragePageSuite`, 
`ThriftServerPageSuite`)
   - Manual testing of collapse behavior across all affected pages
   - Verified localStorage persistence (collapse → reload → stays collapsed)
   - Scalastyle checks pass


-- 
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