-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataViews: Add duplicate pattern
action in patterns page
#57592
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -255,3 +255,31 @@ | |
z-index: 2; | ||
} | ||
} | ||
|
||
// TODO: this is duplicated from `patterns-menu-items__convert-modal` styles, | ||
// except for the `z-index`. Need to check if this is still needed. | ||
Comment on lines
+259
to
+260
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the CSS for the modal was required to both constrain the width of the modal and prevent a subtle layout shift when interacting with the category selection control. The rest I think was to bring the styling of the category selector up to the latest approach. Quickly disabling those styles and interacting with the modal resulted in this: ![]() |
||
.dataviews-action-modal__duplicate-pattern { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ntsekouras @aaronrobertshaw can we do this differently, without using an internal dataviews class? I worry that by doing this kind of thing, the dataviews internal classes become public API. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same answer as here:
|
||
// Fix the modal width to prevent added categories from stretching the modal. | ||
[role="dialog"] > [role="document"] { | ||
width: 350px; | ||
} | ||
|
||
.patterns-menu-items__convert-modal-categories { | ||
position: relative; | ||
} | ||
|
||
.components-form-token-field__suggestions-list:not(:empty) { | ||
position: absolute; | ||
border: $border-width solid var(--wp-admin-theme-color); | ||
border-bottom-left-radius: $radius-block-ui; | ||
border-bottom-right-radius: $radius-block-ui; | ||
box-shadow: 0 0 0.5px 0.5px var(--wp-admin-theme-color); | ||
box-sizing: border-box; | ||
z-index: 1; | ||
background-color: $white; | ||
width: calc(100% + 2px); // Account for the border width of the token field. | ||
left: -1px; | ||
min-width: initial; | ||
max-height: $grid-unit-60 * 2; // Adjust to not cover the save button, showing three items. | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found these strings ambiguous, so I proposed
_x
in #57686