Skip to content

fix: restore Connect button outline in MUI theme - #1350

Open
thisis-Shitanshu wants to merge 1 commit into
kubeflow:notebooks-v2from
thisis-Shitanshu:fix/connect-button-outline
Open

fix: restore Connect button outline in MUI theme#1350
thisis-Shitanshu wants to merge 1 commit into
kubeflow:notebooks-v2from
thisis-Shitanshu:fix/connect-button-outline

Conversation

@thisis-Shitanshu

@thisis-Shitanshu thisis-Shitanshu commented Aug 24, 2026

Copy link
Copy Markdown

What

Fixes the Workspaces action controls rendering differently when Notebooks v2 is embedded in the Kubeflow Community Dashboard.

Fixes #1345

Root cause

The Connect and row-action controls use PatternFly MenuToggle variants.

When comparing the same UI at the same viewport in standalone Notebooks v2 and Community Dashboard, the variant-specific PatternFly tokens were already correct in both environments.

The difference was in which CSS declarations won the cascade:

  • standalone: the PatternFly variant mappings win
  • Community Dashboard: generic mod-arch-kubeflow / MUI compatibility mappings win

For the secondary Connect toggle this changed the final border, background, and horizontal padding.

For the plain row-actions toggle this changed the background and horizontal padding.

Fix

  • Add a common class to both Connect variants.
  • Restore the existing PatternFly secondary semantic mappings for the Connect control.
  • Scope the workspace row-actions toggle through its action cell and restore its existing PatternFly plain mappings.
  • Reuse PatternFly theme variables rather than hard-coding colors, spacing, or dimensions.

The overrides remain scoped to the affected Workspaces controls.

Verification

Compared the same Workspace at a 1111px viewport in:

  • standalone Notebooks v2 / Tilt
  • Community Distribution baseline
  • Community Distribution with this PR

Before, Community resolved:

  • Connect border: transparent
  • Connect padding: 10px
  • Connect background: #fff
  • row-actions background: #fff
  • row-actions padding: 10px

After the fix, the Community controls match the standalone variant semantics:

  • Connect width: 134.953125px
  • Connect height: 37px
  • Connect padding: 24px / 24px
  • Connect background: transparent
  • Connect border: #1976d2
  • row-actions: 37px × 37px
  • row-actions padding: 8px / 8px
  • row-actions background: transparent

Hover/focus behavior was also verified.

Checks:

  • npm run prettier:check
  • npm run test:lint
  • npm run test:type-check
  • npm run test:unit — 452 tests passed
  • npm run build

@github-project-automation github-project-automation Bot moved this to Needs Triage in Kubeflow Notebooks Aug 24, 2026
@google-oss-prow google-oss-prow Bot added the area/frontend area - related to frontend components label Aug 24, 2026
@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign paulovmr for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow Bot added area/v2 area - version - kubeflow notebooks v2 size/S labels Aug 24, 2026
@thisis-Shitanshu
thisis-Shitanshu force-pushed the fix/connect-button-outline branch from a8a9e49 to 1f7bb0b Compare August 24, 2026 19:37

@christian-heusel christian-heusel left a comment

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.

What you shared in your screenshot still looks different from the "expected" one in #1345, could you recheck the differences? From a broad look the spacing / button layout still seems to be different 😅

@christian-heusel

Copy link
Copy Markdown
Member

/ok-to-test

Signed-off-by: Shitanshu Pandey <shitanshu.19p@gmail.com>
@thisis-Shitanshu
thisis-Shitanshu force-pushed the fix/connect-button-outline branch from 1f7bb0b to ab4ad60 Compare August 26, 2026 08:26
@google-oss-prow google-oss-prow Bot added size/M and removed size/S labels Aug 26, 2026
@thisis-Shitanshu

Copy link
Copy Markdown
Author

Hi @christian-heusel!

Thanks for catching that. I rechecked the controls against standalone at the same viewport and found the spacing/layout difference came from the same CSS cascade issue as the missing outline.

The PatternFly variant tokens were already correct, but in the Community Dashboard the generic MUI compatibility mappings were winning instead. This affected the Connect border, background and horizontal padding, and the adjacent plain row-action toggle's background/padding as well.

I've updated the fix to restore the existing PatternFly variant mappings only for these Workspaces controls, without hard-coding colors or dimensions. I also verified the updated Community build against standalone, including hover/focus states, and all frontend checks pass (452 tests).

Would appreciate another look when you have time 😊

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

Labels

area/frontend area - related to frontend components area/v2 area - version - kubeflow notebooks v2 ok-to-test size/M

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

2 participants