-
Notifications
You must be signed in to change notification settings - Fork 805
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit c1371cc. See p1737057925999759-slack-C02FMH4G8
- Loading branch information
Showing
10 changed files
with
61 additions
and
16 deletions.
There are no files selected for viewing
4 changes: 0 additions & 4 deletions
4
projects/js-packages/shared-extension-utils/changelog/fix-upsell-nudge-safari
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...packages/shared-extension-utils/src/with-has-warning-is-interactive-class-names/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { createHigherOrderComponent } from '@wordpress/compose'; | ||
|
||
import './style.scss'; | ||
|
||
// Injecting the `has-warning` class into the block wrapper component gives us | ||
// the right kind of borders around the block, both visually and conceptually. | ||
// However, it also adds styling to prevent user interaction with that block. | ||
// We thus add a new `is-interactive` class to be able to override that behavior. | ||
export default name => | ||
createHigherOrderComponent( | ||
BlockListBlock => props => ( | ||
<BlockListBlock | ||
{ ...props } | ||
className={ props.name === name ? 'has-warning is-interactive' : props.className } | ||
/> | ||
), | ||
'withHasWarningIsInteractiveClassNames' | ||
); |
13 changes: 13 additions & 0 deletions
13
...ackages/shared-extension-utils/src/with-has-warning-is-interactive-class-names/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.block-editor-block-list__layout | ||
// Override core styles inherited from `.has-warning`: | ||
// we do want blocks with upgrade nudge warning to be interactive | ||
.block-editor-block-list__block.has-warning.is-interactive { | ||
> * { | ||
pointer-events: auto; | ||
user-select: auto; | ||
} | ||
|
||
&:after { | ||
content: none; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters