Skip to content

[SPARK-55810][UI] Fix missing spacing between table and pagination controls in Jobs and Stages page#55626

Closed
XdithyX wants to merge 1 commit into
apache:masterfrom
XdithyX:master
Closed

[SPARK-55810][UI] Fix missing spacing between table and pagination controls in Jobs and Stages page#55626
XdithyX wants to merge 1 commit into
apache:masterfrom
XdithyX:master

Conversation

@XdithyX
Copy link
Copy Markdown
Contributor

@XdithyX XdithyX commented Apr 30, 2026

What changes were proposed in this pull request?

This PR fixes a UI regression in the Spark Web UI (Jobs and Stages pages) where spacing between the data table and the pagination controls ("Page", "Jump to", "Show items") was missing (SPARK-55810).

The issue was introduced during the Bootstrap upgrade in #54552, which caused the pagination controls to appear visually attached to the table. This change restores appropriate spacing between these elements to improve layout clarity and consistency.

Why are the changes needed?

Without proper spacing, the table and pagination controls appear cramped and visually misaligned, which negatively impacts readability and overall user experience in the Spark Web UI.

This is a regression caused by the Bootstrap upgrade and should be fixed to maintain UI consistency.

Does this PR introduce any user-facing change?

Yes.

It improves the visual layout of the Jobs and Stages pages in the Spark Web UI by restoring proper spacing between the table and pagination controls.

How was this patch tested?

  1. Built Spark locally and ran spark-shell
  2. Opened the Spark Web UI and navigated to the "Jobs" and "Stages" tabs
  3. Verified that spacing between the table and pagination controls is correctly applied
  4. Compared behavior before and after the fix to confirm the issue is resolved

Was this patch authored or co-authored using generative AI tooling?

No.

Screenshots

Stages page before the fix Stages page after the fix
Screenshot 2026-05-04 at 2 22 16 PM Screenshot 2026-05-01 at 9 28 42 PM
Jobs page before the fix Jobs page after the fix

@XdithyX
Copy link
Copy Markdown
Contributor Author

XdithyX commented Apr 30, 2026

@dongjoon-hyun @yaooqinn Can you please take a look? Thanks!

@sarutak
Copy link
Copy Markdown
Member

sarutak commented May 1, 2026

Hi @XdithyX, could you enable GA in your forked repository?
Also, could you put screenshots for Jobs page too?


<div class="d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<div class="d-flex align-items-center mb-3">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding mb-3 only to the left inner child breaks symmetry inside the flex container. The left child gains a 1rem bottom margin, but the right child (the Jump-to form) does not, so the two children's bottom edges no longer align under align-items-center. Also, since pageNavigation() is rendered both above and below the table, the same mb-3 gets applied to the bottom nav as well, adding unnecessary spacing there.

Suggested fix: apply the margin to the outer flex container instead:

-    <div class="d-flex justify-content-between align-items-center">
-      <div class="d-flex align-items-center mb-3">
+    <div class="d-flex justify-content-between align-items-center mb-3">
+      <div class="d-flex align-items-center">
         <span class="pe-1">Page: </span>
         <ul class="pagination mb-0">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sarutak Thanks for pointing this out! You're right, the margin should be applied to the outer flex container to keep alignment consistent.
I’ve updated the change accordingly. The earlier version mistakenly applied mb-3 to the inner container.
Also, I have enabled github actions on my fork, CI is currently running.
Added screenshots for Jobs page as well.

Thanks!

@XdithyX
Copy link
Copy Markdown
Contributor Author

XdithyX commented May 2, 2026

@sarutak CI is now green. Please let me know if anything else is needed.

@sarutak
Copy link
Copy Markdown
Member

sarutak commented May 4, 2026

Hi @XdithyX, the latest change LGTM.
Could you put a screenshot of "Jobs page before the fix" before I merge this?

@XdithyX
Copy link
Copy Markdown
Contributor Author

XdithyX commented May 4, 2026

Hi @sarutak Added the screenshots for jobs page before the fix.
Thanks!

@sarutak sarutak closed this in 7866872 May 4, 2026
sarutak pushed a commit that referenced this pull request May 4, 2026
…ntrols in Jobs and Stages page

### What changes were proposed in this pull request?
This PR fixes a UI regression in the Spark Web UI (Jobs and Stages pages) where spacing between the data table and the pagination controls ("Page", "Jump to", "Show items") was missing ([SPARK-55810](https://issues.apache.org/jira/browse/SPARK-55810)).

The issue was introduced during the Bootstrap upgrade in #54552, which caused the pagination controls to appear visually attached to the table. This change restores appropriate spacing between these elements to improve layout clarity and consistency.

### Why are the changes needed?
Without proper spacing, the table and pagination controls appear cramped and visually misaligned, which negatively impacts readability and overall user experience in the Spark Web UI.

This is a regression caused by the Bootstrap upgrade and should be fixed to maintain UI consistency.

### Does this PR introduce _any_ user-facing change?
Yes.

It improves the visual layout of the Jobs and Stages pages in the Spark Web UI by restoring proper spacing between the table and pagination controls.

### How was this patch tested?

1. Built Spark locally and ran spark-shell
2. Opened the Spark Web UI and navigated to the "Jobs" and "Stages" tabs
3. Verified that spacing between the table and pagination controls is correctly applied
4. Compared behavior before and after the fix to confirm the issue is resolved

### Was this patch authored or co-authored using generative AI tooling?
No.

### Screenshots

| Stages page before the fix | Stages page after the fix |
|---------------|--------------|
| <img width="1512" height="674" alt="Screenshot 2026-05-04 at 2 22 16 PM" src="https://github.com/user-attachments/assets/5d8824d3-0fb9-475f-a739-60bdc36db37d" /> | <img width="1509" height="720" alt="Screenshot 2026-05-01 at 9 28 42 PM" src="https://github.com/user-attachments/assets/e3c0928c-ba43-4a74-aeaf-4d4e93f60ef9" /> |

| Jobs page before the fix | Jobs page after the fix |
|--------------|------------|
| <img src="https://github.com/user-attachments/assets/d70cd94f-d52a-485e-b474-20c1777db3c6" width="100%"/> | <img src="https://github.com/user-attachments/assets/1c242b55-d62a-46f0-8bdb-64abb0ca785e" width="100%"/> |
| <img src="https://github.com/user-attachments/assets/5574d44d-722e-403f-ac73-3db69f495655" width="100%"/> | <img src="https://github.com/user-attachments/assets/20015117-1f5d-44ce-b4c1-07a45c640409" width="100%"/> |

Closes #55626 from XdithyX/master.

Authored-by: Adithya Ajith <4adhi007@gmail.com>
Signed-off-by: Kousuke Saruta <sarutak@apache.org>
(cherry picked from commit 7866872)
Signed-off-by: Kousuke Saruta <sarutak@apache.org>
sarutak pushed a commit that referenced this pull request May 4, 2026
…ntrols in Jobs and Stages page

### What changes were proposed in this pull request?
This PR fixes a UI regression in the Spark Web UI (Jobs and Stages pages) where spacing between the data table and the pagination controls ("Page", "Jump to", "Show items") was missing ([SPARK-55810](https://issues.apache.org/jira/browse/SPARK-55810)).

The issue was introduced during the Bootstrap upgrade in #54552, which caused the pagination controls to appear visually attached to the table. This change restores appropriate spacing between these elements to improve layout clarity and consistency.

### Why are the changes needed?
Without proper spacing, the table and pagination controls appear cramped and visually misaligned, which negatively impacts readability and overall user experience in the Spark Web UI.

This is a regression caused by the Bootstrap upgrade and should be fixed to maintain UI consistency.

### Does this PR introduce _any_ user-facing change?
Yes.

It improves the visual layout of the Jobs and Stages pages in the Spark Web UI by restoring proper spacing between the table and pagination controls.

### How was this patch tested?

1. Built Spark locally and ran spark-shell
2. Opened the Spark Web UI and navigated to the "Jobs" and "Stages" tabs
3. Verified that spacing between the table and pagination controls is correctly applied
4. Compared behavior before and after the fix to confirm the issue is resolved

### Was this patch authored or co-authored using generative AI tooling?
No.

### Screenshots

| Stages page before the fix | Stages page after the fix |
|---------------|--------------|
| <img width="1512" height="674" alt="Screenshot 2026-05-04 at 2 22 16 PM" src="https://github.com/user-attachments/assets/5d8824d3-0fb9-475f-a739-60bdc36db37d" /> | <img width="1509" height="720" alt="Screenshot 2026-05-01 at 9 28 42 PM" src="https://github.com/user-attachments/assets/e3c0928c-ba43-4a74-aeaf-4d4e93f60ef9" /> |

| Jobs page before the fix | Jobs page after the fix |
|--------------|------------|
| <img src="https://github.com/user-attachments/assets/d70cd94f-d52a-485e-b474-20c1777db3c6" width="100%"/> | <img src="https://github.com/user-attachments/assets/1c242b55-d62a-46f0-8bdb-64abb0ca785e" width="100%"/> |
| <img src="https://github.com/user-attachments/assets/5574d44d-722e-403f-ac73-3db69f495655" width="100%"/> | <img src="https://github.com/user-attachments/assets/20015117-1f5d-44ce-b4c1-07a45c640409" width="100%"/> |

Closes #55626 from XdithyX/master.

Authored-by: Adithya Ajith <4adhi007@gmail.com>
Signed-off-by: Kousuke Saruta <sarutak@apache.org>
(cherry picked from commit 7866872)
Signed-off-by: Kousuke Saruta <sarutak@apache.org>
@sarutak
Copy link
Copy Markdown
Member

sarutak commented May 4, 2026

Merged to master, branch-4.x and branch-4.2. Thank you @XdithyX !

@sarutak
Copy link
Copy Markdown
Member

sarutak commented May 4, 2026

@XdithyX Could you tell me your JIRA account, or please create it if you don't have.

@XdithyX
Copy link
Copy Markdown
Contributor Author

XdithyX commented May 4, 2026

@sarutak adithyaajith11 is my JIRA username.

@sarutak
Copy link
Copy Markdown
Member

sarutak commented May 4, 2026

Thank you, @XdithyX. Have set the assignee field to you.
https://issues.apache.org/jira/browse/SPARK-55810

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants