Skip to content

Commit d7664f8

Browse files
authored
fix(ws): normalize text case for workspace count buttons, update column header (#481)
Signed-off-by: Jenny <[email protected]> fix(ws): add className to remaining buttons in ws kind tabs Signed-off-by: Jenny <[email protected]> fix(ws): Update the column header to "Workspaces" Signed-off-by: Jenny <[email protected]> fix(ws): fix formatting in theme stylesheet
1 parent 8def0ff commit d7664f8

File tree

5 files changed

+64
-36
lines changed

5 files changed

+64
-36
lines changed

workspaces/frontend/src/app/pages/WorkspaceKinds/WorkspaceKinds.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ export const WorkspaceKinds: React.FunctionComponent = () => {
5858
description: { name: 'Description', label: 'Description', id: 'description' },
5959
deprecated: { name: 'Status', label: 'Status', id: 'status' },
6060
numberOfWorkspaces: {
61-
name: 'Number of workspaces',
62-
label: 'Number of workspaces',
63-
id: 'number-of-workspaces',
61+
name: 'Workspaces',
62+
label: 'Workspaces',
63+
id: 'workspaces',
6464
},
6565
}),
6666
[],
@@ -604,6 +604,7 @@ export const WorkspaceKinds: React.FunctionComponent = () => {
604604
<Td dataLabel={columns.numberOfWorkspaces.name}>
605605
<Button
606606
variant="link"
607+
className="workspace-kind-summary-button"
607608
isInline
608609
onClick={() =>
609610
navigate('workspaceKindSummary', {

workspaces/frontend/src/app/pages/WorkspaceKinds/details/WorkspaceKindDetailsImages.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const WorkspaceKindDetailsImages: React.FunctionComponent<WorkspaceDetail
2323
<Button
2424
variant="link"
2525
isInline
26+
className="workspace-kind-summary-button"
2627
onClick={() =>
2728
navigate('workspaceKindSummary', {
2829
params: { kind: workspaceKind.name },

workspaces/frontend/src/app/pages/WorkspaceKinds/details/WorkspaceKindDetailsNamespaces.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export const WorkspaceKindDetailsNamespaces: React.FunctionComponent<
2626
{namespace}:{' '}
2727
<Button
2828
variant="link"
29+
className="workspace-kind-summary-button"
2930
isInline
3031
onClick={() =>
3132
navigate('workspaceKindSummary', {

workspaces/frontend/src/app/pages/WorkspaceKinds/details/WorkspaceKindDetailsPodConfigs.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const WorkspaceKindDetailsPodConfigs: React.FunctionComponent<
2121
{podConfig.displayName}:{' '}
2222
<Button
2323
variant="link"
24+
className="workspace-kind-summary-button"
2425
isInline
2526
onClick={() =>
2627
navigate('workspaceKindSummary', {

workspaces/frontend/src/shared/style/MUI-theme.scss

Lines changed: 57 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
--mui-radio__input--Width: 10px;
6060
--mui-radio__input--Height: 10px;
6161

62-
// Sidebar from https://github.com/kubeflow/kubeflow/blob/4275d99754ac91f6cf5654b03824a73825e9fe55/components/centraldashboard/public/components/main-page.css#L7C1-L13C51
62+
// Sidebar from https://github.com/kubeflow/kubeflow/blob/4275d99754ac91f6cf5654b03824a73825e9fe55/components/centraldashboard/public/components/main-page.css#L7C1-L13C51
6363
--kf-central-primary-background-color: #0a3b71;
6464
--kf-central-sidebar-default-color: #ffffff90;
6565
--kf-central-app-drawer-width: 240px;
@@ -103,7 +103,7 @@
103103
--mui-spacing-8px: var(--mui-spacing);
104104
--mui-spacing-16px: calc(2 * var(--mui-spacing));
105105

106-
--pf-t--global--spacer--gap--group-to-group--vertical--default: var(--pf-t--global--spacer--sm);
106+
--pf-t--global--spacer--gap--group-to-group--vertical--default: var(--pf-t--global--spacer--sm);
107107
--pf-t--global--border--width--box--status--default: 1px;
108108
--pf-t--global--border--radius--pill: var(--mui-shape-borderRadius);
109109
--pf-t--global--text--color--brand--default: var(--mui-palette-primary-main);
@@ -122,7 +122,9 @@
122122
}
123123

124124
.mui-theme .pf-v6-c-alert {
125-
--pf-v6-c-alert--m-warning__title--Color: var(--pf-t--global--text--color--status--warning--default);
125+
--pf-v6-c-alert--m-warning__title--Color: var(
126+
--pf-t--global--text--color--status--warning--default
127+
);
126128
--pf-v6-c-alert__icon--MarginInlineEnd: var(--mui-alert__icon--MarginInlineEnd);
127129
--pf-v6-c-alert__icon--MarginBlockStart: var(--mui-alert__icon--MarginBlockStart);
128130
--pf-v6-c-alert__icon--FontSize: var(--mui-alert__icon--FontSize);
@@ -164,6 +166,10 @@
164166
&:hover {
165167
text-decoration-color: initial;
166168
}
169+
170+
&.workspace-kind-summary-button {
171+
text-transform: none;
172+
}
167173
}
168174

169175
.mui-theme .pf-v6-c-button.pf-m-link.pf-m-inline .pf-v6-c-button__icon {
@@ -182,7 +188,8 @@
182188
--pf-v6-c-card--BorderColor: var(--mui-palette-divider);
183189
}
184190

185-
.pf-v6-c-card__selectable-actions :is(.pf-v6-c-check__label, .pf-v6-c-radio__label, .pf-v6-c-card__clickable-action):hover {
191+
.pf-v6-c-card__selectable-actions
192+
:is(.pf-v6-c-check__label, .pf-v6-c-radio__label, .pf-v6-c-card__clickable-action):hover {
186193
--pf-v6-c-card--BorderColor: var(--mui-palette-grey-300);
187194
}
188195

@@ -210,7 +217,9 @@
210217
}
211218

212219
.mui-theme .pf-v6-c-drawer {
213-
--pf-v6-c-drawer--m-inline--m-expanded__panel--after--BackgroundColor: var(--mui-drawer-BorderLeft);
220+
--pf-v6-c-drawer--m-inline--m-expanded__panel--after--BackgroundColor: var(
221+
--mui-drawer-BorderLeft
222+
);
214223
}
215224

216225
.mui-theme .pf-v6-c-form__group {
@@ -266,12 +275,12 @@
266275
font-size: 16px;
267276
left: 0;
268277
}
269-
278+
270279
.pf-v6-c-form-control {
271280
// Override default form control padding to match button padding in this context
272281
--pf-v6-c-form-control--PaddingBlockStart: var(--mui-spacing-8px);
273282
--pf-v6-c-form-control--PaddingBlockEnd: var(--mui-spacing-8px);
274-
283+
275284
&.workspace-kind-unit-select {
276285
--pf-v6-c-form-control--PaddingInlineEnd: calc(
277286
var(--pf-v6-c-form-control__select--PaddingInlineEnd) +
@@ -295,13 +304,13 @@
295304
resize: none;
296305
--pf-v6-c-form-control--PaddingBlockStart: var(--mui-spacing-16px);
297306
--pf-v6-c-form-control--PaddingBlockEnd: var(--mui-spacing-16px);
307+
298308
#text-file-simple-filename {
299309
--pf-v6-c-form-control--PaddingBlockStart: var(--mui-spacing-8px);
300-
--pf-v6-c-form-control--PaddingBlockEnd: var(--mui-spacing-8px);;
310+
--pf-v6-c-form-control--PaddingBlockEnd: var(--mui-spacing-8px);
301311
}
302312
}
303313

304-
305314
.mui-theme .pf-v6-c-form__section {
306315
--pf-v6-c-form__section--Gap: 0px;
307316
}
@@ -338,7 +347,7 @@
338347
box-sizing: border-box;
339348
}
340349

341-
.mui-theme .pf-v6-c-form-control> :is(input, select, textarea):focus {
350+
.mui-theme .pf-v6-c-form-control > :is(input, select, textarea):focus {
342351
--pf-v6-c-form-control--OutlineOffset: none;
343352
outline: none;
344353
}
@@ -387,7 +396,7 @@
387396
border-color: black;
388397
}
389398

390-
.form-fieldset-wrapper:hover span.pf-v6-c-form-control.pf-m-disabled~.form-fieldset {
399+
.form-fieldset-wrapper:hover span.pf-v6-c-form-control.pf-m-disabled ~ .form-fieldset {
391400
border-color: rgba(0, 0, 0, 0.23);
392401
}
393402

@@ -475,7 +484,6 @@
475484
.tr-fieldset-wrapper .pf-v6-c-form-control,
476485
.toolbar-fieldset-wrapper .pf-v6-c-form-control,
477486
.form-fieldset-wrapper .pf-v6-c-form-control {
478-
479487
--pf-v6-c-form-control--before--BorderColor: transparent !important;
480488
--pf-v6-c-form-control--after--BorderColor: transparent !important;
481489
}
@@ -484,8 +492,8 @@
484492
--pf-v6-c-form__field-group-body--PaddingBlockStart: 8px;
485493
}
486494

487-
.pf-v6-c-form__group .pf-v6-c-form-control:focus-within+.pf-v6-c-form__label,
488-
.pf-v6-c-form__group .pf-v6-c-form-control:not(:placeholder-shown)+.pf-v6-c-form__label {
495+
.pf-v6-c-form__group .pf-v6-c-form-control:focus-within + .pf-v6-c-form__label,
496+
.pf-v6-c-form__group .pf-v6-c-form-control:not(:placeholder-shown) + .pf-v6-c-form__label {
489497
color: var(--mui-palette-primary-main);
490498
}
491499

@@ -518,17 +526,25 @@
518526
.mui-theme .pf-v6-c-menu-toggle {
519527
--pf-v6-c-menu-toggle__toggle-icon--MinHeight: var(--mui-menu-toggle__toggle-icon--MinHeight);
520528
--pf-v6-c-menu-toggle__controls--MinWidth: var(--mui-menu-toggle__controls--MinWidth);
521-
--pf-v6-c-menu-toggle--expanded--BackgroundColor: var(--mui-menu-toggle--expanded--BackgroundColor);
529+
--pf-v6-c-menu-toggle--expanded--BackgroundColor: var(
530+
--mui-menu-toggle--expanded--BackgroundColor
531+
);
522532
--pf-v6-c-menu-toggle--expanded--BorderColor: var(--mui-menu-toggle--expanded--BorderColor);
523533
--pf-v6-c-menu-toggle--PaddingInlineStart: var(--mui-menu-toggle--PaddingInlineStart);
524534
--pf-v6-c-menu-toggle--PaddingInlineEnd: var(--mui-menu-toggle--PaddingInlineEnd);
525535
--pf-v6-c-menu-toggle--ColumnGap: var(--mui-menu-toggle--ColumnGap);
526536
--pf-v6-c-menu-toggle--expanded--Color: var(--mui-palette-common-black);
527537
--pf-v6-c-menu-toggle--hover--BorderColor: var(--mui-menu-toggle--hover--BorderColor);
528538
--pf-v6-c-menu-toggle--BorderColor: var(--mui-menu-toggle--BorderColor);
529-
--pf-v6-c-menu-toggle--hover--BackgroundColor: var(--pf-t--global--background--color--action--plain--hover);
530-
--pf-v6-c-menu-toggle--m-split-button--m-action--m-primary--expanded--child--BackgroundColor: var(--pf-t--global--color--brand--default);
531-
--pf-v6-c-menu-toggle--m-split-button--m-action--m-primary--child--BorderInlineStartColor: var(--mui-palette-primary-dark);
539+
--pf-v6-c-menu-toggle--hover--BackgroundColor: var(
540+
--pf-t--global--background--color--action--plain--hover
541+
);
542+
--pf-v6-c-menu-toggle--m-split-button--m-action--m-primary--expanded--child--BackgroundColor: var(
543+
--pf-t--global--color--brand--default
544+
);
545+
--pf-v6-c-menu-toggle--m-split-button--m-action--m-primary--child--BorderInlineStartColor: var(
546+
--mui-palette-primary-dark
547+
);
532548

533549
text-transform: var(--mui-text-transform);
534550
font-weight: var(--mui-button-font-weight);
@@ -552,8 +568,12 @@
552568
--pf-v6-c-menu-toggle--expanded--Color: var(--pf-t--global--text--color--on-brand--clicked);
553569
}
554570

555-
.mui-theme .pf-v6-c-menu-toggle.pf-m-primary.pf-m-split-button .pf-v6-c-menu-toggle__button[aria-expanded='true'] {
556-
--pf-v6-c-menu-toggle--m-split-button--m-action--m-primary--child--BackgroundColor: var(--mui-palette-primary-dark);
571+
.mui-theme
572+
.pf-v6-c-menu-toggle.pf-m-primary.pf-m-split-button
573+
.pf-v6-c-menu-toggle__button[aria-expanded='true'] {
574+
--pf-v6-c-menu-toggle--m-split-button--m-action--m-primary--child--BackgroundColor: var(
575+
--mui-palette-primary-dark
576+
);
557577
}
558578

559579
.pf-v6-c-menu-toggle.pf-m-secondary.pf-m-split-button {
@@ -617,24 +637,22 @@
617637
row-gap: none;
618638
}
619639

620-
621640
.mui-theme .pf-v6-c-page__sidebar {
622641
--pf-v6-c-page__sidebar--BackgroundColor: var(--kf-central-primary-background-color);
623642
}
624643

625644
.mui-theme .pf-v6-c-page__sidebar-body {
626645
--pf-v6-c-page__sidebar-body--PaddingInlineStart: 0px;
627646
--pf-v6-c-page__sidebar-body--PaddingInlineEnd: 0px;
628-
629647
}
630648

631-
.mui-theme .pf-v6-c-progress-stepper__step.pf-m-info {
649+
.mui-theme .pf-v6-c-progress-stepper__step.pf-m-info {
632650
--pf-v6-c-progress-stepper__step-icon--Color: var(--mui-palette-primary-main);
633-
}
651+
}
634652

635-
.mui-theme .pf-v6-c-progress-stepper__step.pf-m-success {
653+
.mui-theme .pf-v6-c-progress-stepper__step.pf-m-success {
636654
--pf-v6-c-progress-stepper__step-icon--Color: var(--mui-palette-success-main);
637-
}
655+
}
638656

639657
.mui-theme .pf-v6-c-radio.pf-m-standalone:not(.workspace-kind-form-radio) .pf-v6-c-radio__input {
640658
display: none;
@@ -656,11 +674,15 @@
656674
--pf-v6-c-table--cell--PaddingInlineEnd: var(--mui-table--cell--PaddingInlineEnd);
657675
--pf-v6-c-table--cell--PaddingBlockStart: var(--mui-table--cell--PaddingBlockStart);
658676
--pf-v6-c-table--cell--PaddingBlockEnd: var(--mui-table--cell--PaddingBlockEnd);
659-
--pf-v6-c-table--cell--first-last-child--PaddingInline: var(--mui-table--cell--first-last-child--PaddingInline);
677+
--pf-v6-c-table--cell--first-last-child--PaddingInline: var(
678+
--mui-table--cell--first-last-child--PaddingInline
679+
);
660680
--pf-v6-c-table__thead--cell--FontWeight: var(--mui-button-font-weight);
661681
--pf-v6-c-table__thead--cell--FontSize: var(--mui-table__thead--cell--FontSize);
662682
--pf-v6-c-table__tr--BorderBlockEndColor: var(--mui-palette-grey-300);
663-
--pf-v6-c-table__sort-indicator--MarginInlineStart: var(--mui-table__sort-indicator--MarginInlineStart);
683+
--pf-v6-c-table__sort-indicator--MarginInlineStart: var(
684+
--mui-table__sort-indicator--MarginInlineStart
685+
);
664686

665687
letter-spacing: 0.01071em;
666688
}
@@ -678,10 +700,12 @@
678700
transform-origin: center center;
679701
align-self: start;
680702
}
703+
681704
/* CSS workaround for spacing in labels in Workspace Kind */
682705
.form-label-field-group .pf-v6-c-table tr:where(.pf-v6-c-table__tr) > :where(th, td) {
683706
padding-block-start: 0px;
684707
}
708+
685709
/* CSS workaround to use MUI icon for sort icon */
686710
.mui-theme .pf-v6-c-table__sort-indicator::before {
687711
display: block;
@@ -734,7 +758,9 @@
734758
--pf-v6-c-tabs__link--PaddingInlineStart: var(--mui-tabs__link--PaddingInlineStart);
735759
--pf-v6-c-tabs__link--PaddingInlineEnd: var(--mui-tabs__link--PaddingInlineEnd);
736760
--pf-v6-c-tabs__item--m-current__link--Color: var(--pf-t--global--text--color--brand--default);
737-
--pf-v6-c-tabs__item--m-current__link--after--BorderWidth: var(--mui-tabs__item--m-current__link--after--BorderWidth);
761+
--pf-v6-c-tabs__item--m-current__link--after--BorderWidth: var(
762+
--mui-tabs__item--m-current__link--after--BorderWidth
763+
);
738764
--pf-v6-c-tabs__link--FontSize: 0.875rem;
739765
}
740766

@@ -884,12 +910,9 @@
884910
}
885911

886912
.mui-theme .pf-v6-c-toolbar__group.pf-m-filter-group .pf-v6-c-form-control {
887-
888913
// Override default form control padding to match button padding in this context
889914
--pf-v6-c-form-control--PaddingBlockStart: var(--mui-spacing-8px);
890915
--pf-v6-c-form-control--PaddingBlockEnd: var(--mui-spacing-8px);
891-
892-
893916
}
894917

895918
// Fix hover state margin issue by removing problematic padding
@@ -903,13 +926,14 @@
903926

904927
.workspacekind-file-upload {
905928
height: 100%;
929+
906930
.pf-v6-c-file-upload__file-details {
907931
flex-grow: 1;
908932
}
909933
}
910934

911935
/* Workaround for Toggle group header in Workspace Kind Form */
912936
.workspace-kind-form-header .pf-v6-c-toggle-group__button.pf-m-selected {
913-
background-color: #E0F0FF;
937+
background-color: #e0f0ff;
914938
color: var(--pf-t--color--black);
915939
}

0 commit comments

Comments
 (0)