From 67006cc6d3f84b3a7dfdb15cfaf1445092a5cc99 Mon Sep 17 00:00:00 2001 From: Greg Douglas Date: Fri, 27 Sep 2024 15:04:32 -0400 Subject: [PATCH 1/2] Revert "Fix border overlap between Buttons in outlined ButtonGroup (#6966)" This reverts commit 541009478594e3ed6e5a8f5a40426f0c40be6c1a. --- .../core/src/components/button/_button-group.scss | 15 --------------- .../popover/_popover-in-button-group.scss | 13 +++---------- .../core-examples/buttonGroupPopoverExample.tsx | 5 ----- 3 files changed, 3 insertions(+), 30 deletions(-) diff --git a/packages/core/src/components/button/_button-group.scss b/packages/core/src/components/button/_button-group.scss index 316ccc0b8c..6db6b58f9b 100644 --- a/packages/core/src/components/button/_button-group.scss +++ b/packages/core/src/components/button/_button-group.scss @@ -142,26 +142,17 @@ Styleguide button-group } &.#{$ns}-outlined { - > .#{$ns}-popover-target > .#{$ns}-button, > .#{$ns}-button { @include pt-button-outlined(); } &:not(.#{$ns}-vertical) { - > .#{$ns}-popover-target:not(:last-child) > .#{$ns}-button, > .#{$ns}-button:not(:last-child) { border-right: none; } } } - &:not(.#{$ns}-vertical) { - > .#{$ns}-popover-target:not(:last-child) .#{$ns}-button.#{$ns}-outlined, - > .#{$ns}-button.#{$ns}-outlined:not(:last-child) { - border-right: none; - } - } - .#{$ns}-popover-wrapper, .#{$ns}-popover-target { display: flex; @@ -261,16 +252,10 @@ Styleguide button-group } &.#{$ns}-outlined { - > .#{$ns}-popover-target:not(:last-child) .#{$ns}-button, > .#{$ns}-button:not(:last-child) { border-bottom: none; } } - - > .#{$ns}-popover-target:not(:last-child) .#{$ns}-button.#{$ns}-outlined, - > .#{$ns}-button.#{$ns}-outlined:not(:last-child) { - border-bottom: none; - } } &.#{$ns}-align-left .#{$ns}-button { diff --git a/packages/core/src/components/popover/_popover-in-button-group.scss b/packages/core/src/components/popover/_popover-in-button-group.scss index 5a1cfc8cb3..26513ce384 100644 --- a/packages/core/src/components/popover/_popover-in-button-group.scss +++ b/packages/core/src/components/popover/_popover-in-button-group.scss @@ -15,12 +15,7 @@ > .#{$ns}-popover-target:not(:last-child) .#{$ns}-button { border-bottom-right-radius: 0; border-top-right-radius: 0; - } - - &:not(.#{$ns}-outlined) { - > .#{$ns}-popover-target:not(:last-child) .#{$ns}-button:not(.#{$ns}-outlined) { - margin-right: -$button-border-width; - } + margin-right: -$button-border-width; } } @@ -39,10 +34,8 @@ border-radius: 0 0 $pt-border-radius $pt-border-radius; } - &:not(.#{$ns}-outlined) { - > .#{$ns}-popover-target:not(:last-child) .#{$ns}-button:not(.#{$ns}-outlined) { - margin-bottom: -$button-border-width; - } + > .#{$ns}-popover-target:not(:last-child) .#{$ns}-button { + margin-bottom: -$button-border-width; } } } diff --git a/packages/docs-app/src/examples/core-examples/buttonGroupPopoverExample.tsx b/packages/docs-app/src/examples/core-examples/buttonGroupPopoverExample.tsx index bc78d975d5..803a1fa6ff 100644 --- a/packages/docs-app/src/examples/core-examples/buttonGroupPopoverExample.tsx +++ b/packages/docs-app/src/examples/core-examples/buttonGroupPopoverExample.tsx @@ -27,7 +27,6 @@ export interface ButtonGroupPopoverExampleState { fill: boolean; large: boolean; minimal: boolean; - outlined: boolean; vertical: boolean; } @@ -37,7 +36,6 @@ export class ButtonGroupPopoverExample extends React.PureComponent this.setState({ minimal })); - private handleOutlinedChange = handleBooleanChange(outlined => this.setState({ outlined })); - private handleVerticalChange = handleBooleanChange(vertical => this.setState({ vertical })); public render() { @@ -58,7 +54,6 @@ export class ButtonGroupPopoverExample extends React.PureComponent - From ff337e6875e899c0260fa8451459c3eea586c6bc Mon Sep 17 00:00:00 2001 From: Gregory Douglas <2968519+ggdouglas@users.noreply.github.com> Date: Fri, 27 Sep 2024 15:12:16 -0400 Subject: [PATCH 2/2] Keep changes to ButtonGroup docs example --- .../src/examples/core-examples/buttonGroupPopoverExample.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/docs-app/src/examples/core-examples/buttonGroupPopoverExample.tsx b/packages/docs-app/src/examples/core-examples/buttonGroupPopoverExample.tsx index 803a1fa6ff..bc78d975d5 100644 --- a/packages/docs-app/src/examples/core-examples/buttonGroupPopoverExample.tsx +++ b/packages/docs-app/src/examples/core-examples/buttonGroupPopoverExample.tsx @@ -27,6 +27,7 @@ export interface ButtonGroupPopoverExampleState { fill: boolean; large: boolean; minimal: boolean; + outlined: boolean; vertical: boolean; } @@ -36,6 +37,7 @@ export class ButtonGroupPopoverExample extends React.PureComponent this.setState({ minimal })); + private handleOutlinedChange = handleBooleanChange(outlined => this.setState({ outlined })); + private handleVerticalChange = handleBooleanChange(vertical => this.setState({ vertical })); public render() { @@ -54,6 +58,7 @@ export class ButtonGroupPopoverExample extends React.PureComponent +