Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
67f5afb
migrate EditorSnackbar and EditorNotices components to notice package
gigitux Jan 6, 2026
8c64fff
update documentation
gigitux Jan 6, 2026
8d2fe8f
Improve snackbar position based on the screen
gigitux Jan 6, 2026
d579207
Merge branch 'trunk' of github.com:WordPress/gutenberg into add/migra…
gigitux Jan 6, 2026
48c3433
Refactor Notices component to use DefaultNoticeList and NoticesSnackb…
gigitux Jan 6, 2026
9dd5f66
fix tsconfig
gigitux Jan 6, 2026
a5d94d3
update doc
gigitux Jan 6, 2026
dd75987
rename components
gigitux Jan 6, 2026
e8a5a15
update docs
gigitux Jan 6, 2026
8e28362
Merge branch 'add/migrate-snackbar-notice-package' of github.com:Word…
gigitux Jan 6, 2026
d4663d9
simplify logic
gigitux Jan 6, 2026
fc40842
fix E2E test
gigitux Jan 6, 2026
523bfc6
improve code
gigitux Jan 7, 2026
efccc32
Merge branch 'trunk' of github.com:WordPress/gutenberg into add/migra…
gigitux Jan 13, 2026
1a09c35
fix import
gigitux Jan 13, 2026
1c697bd
Refactor SnackbarNotices class names for consistency in edit-post and…
gigitux Jan 13, 2026
d8f9d27
fix build
gigitux Jan 13, 2026
fe1a1f7
Merge branch 'trunk' of github.com:WordPress/gutenberg into improve/s…
gigitux Jan 13, 2026
7ab8b01
Merge branch 'add/migrate-snackbar-notice-package' of github.com:Word…
gigitux Jan 13, 2026
c194476
Update packages/notices/src/components/snackbar-notices/index.tsx
gigitux Jan 13, 2026
bd6c422
Update packages/notices/src/components/inline-notices/index.tsx
gigitux Jan 13, 2026
78a00c4
Merge branch 'trunk' of github.com:WordPress/gutenberg into add/migra…
gigitux Jan 13, 2026
21b0ae5
Merge branch 'add/migrate-snackbar-notice-package' of github.com:Word…
gigitux Jan 13, 2026
5c6e7ef
Merge branch 'add/migrate-snackbar-notice-package' of github.com:Word…
gigitux Jan 13, 2026
6c474ac
Merge branch 'trunk' of github.com:WordPress/gutenberg into add/migra…
gigitux Feb 6, 2026
2300573
Merge branch 'add/migrate-snackbar-notice-package' of github.com:Word…
gigitux Feb 6, 2026
1c6bdbd
Improve Snackbar position
gigitux Feb 6, 2026
e2287f7
remove max-width
gigitux Feb 9, 2026
59555fc
Merge branch 'trunk' of github.com:WordPress/gutenberg into add/migra…
gigitux Feb 10, 2026
ed07a88
update CSS
gigitux Feb 10, 2026
b16fd7c
fix versions
gigitux Feb 10, 2026
0a23d57
fix css
gigitux Feb 10, 2026
cccf367
Merge branch 'add/migrate-snackbar-notice-package' of github.com:Word…
gigitux Feb 10, 2026
f21e429
Revert "remove max-width"
gigitux Feb 12, 2026
c43c38d
create mixin
gigitux Feb 12, 2026
d803d41
Merge branch 'trunk' of github.com:WordPress/gutenberg into add/migra…
gigitux Feb 17, 2026
098c5c1
improve classname
gigitux Feb 17, 2026
9315875
fix version deprecation
gigitux Feb 17, 2026
b196106
remove not necessary CSS
gigitux Feb 18, 2026
f80f869
update readme
gigitux Feb 18, 2026
f81b353
improve code
gigitux Feb 18, 2026
7f3782d
Merge branch 'add/migrate-snackbar-notice-package' of github.com:Word…
gigitux Feb 18, 2026
c5e85d0
Merge branch 'trunk' of github.com:WordPress/gutenberg into add/migra…
gigitux Feb 18, 2026
678d0c6
pass context
gigitux Feb 18, 2026
3db153a
fix CSS
gigitux Feb 18, 2026
632bbe7
Merge branch 'add/migrate-snackbar-notice-package' of github.com:Word…
gigitux Feb 18, 2026
7212a1d
Merge branch 'trunk' of github.com:WordPress/gutenberg into improve/s…
gigitux Feb 18, 2026
6f7acf6
fix style for media upload modal
gigitux Feb 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/base-styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,20 @@
* Styles that are reused verbatim in a few places
*/

@mixin snackbar-container() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After removing unnecessary selectors, we may only need to apply this mixin in one or two places. If that's the case, we can just hard-code the styles where needed without removing the mixin.

I also want to avoid exposing public mixins as much as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be misunderstanding, but the position of the SnackbarNotices component isn’t technically hardcoded. The consumer is responsible for defining the CSS container that determines where the snackbar appears. The mixin was introduced to avoid duplicating the same styling logic across multiple files.

position: fixed;
bottom: 24px;
left: 50%;
right: auto;
transform: translateX(-50%);
width: max-content;
max-width: calc(100vw - 32px);
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
}

// These are additional styles for all captions, when the theme opts in to block styles.
@mixin caption-style() {
margin-top: 0.5em;
Expand Down
6 changes: 1 addition & 5 deletions packages/boot/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,5 @@
}

.boot-layout .boot-notices__snackbar {
position: fixed;
right: 0;
bottom: 16px;
padding-left: 16px;
padding-right: 16px;
@include snackbar-container();
}
9 changes: 1 addition & 8 deletions packages/edit-post/src/components/layout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@
isolation: isolate;
}

// Adjust the position of the notices
.edit-post-layout__snackbar {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like there are no elements with this class anywhere, so if that's the case, we can remove this selector entirely. Perhaps this class was removed as part of the work to unify the editor packages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is present in this file:

<SnackbarNotices className="edit-post-layout__snackbar" />
</Editor>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

position: fixed;
right: 0;
bottom: 24px;
padding-left: 24px;
padding-right: 24px;
@include snackbar-container();
}

@include editor-left(".edit-post-layout .edit-post-layout__snackbar");
8 changes: 2 additions & 6 deletions packages/edit-site/src/components/layout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,6 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
}
}

.edit-site .edit-site-layout__snackbar {
position: fixed;
right: 0;
bottom: 16px;
padding-left: 16px;
padding-right: 16px;
.edit-site-layout__snackbar {
@include snackbar-container();
}
7 changes: 1 addition & 6 deletions packages/edit-widgets/src/components/notices/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
@use "@wordpress/base-styles/variables" as *;

.edit-widgets-notices__snackbar {
position: fixed;
right: 0;
bottom: 20px;
padding-left: 16px;
padding-right: 16px;
@include snackbar-container();
}
@include editor-left(".edit-widgets-notices__snackbar");

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use "@wordpress/base-styles/variables" as *;
@use "@wordpress/base-styles/mixins" as *;

.media-upload-modal {
.components-modal__header {
Expand All @@ -22,10 +23,6 @@
}

.media-upload-modal__snackbar {
position: absolute;
left: 0;
bottom: 16px;
padding-left: 16px;
padding-right: 16px;
@include snackbar-container();
}
}
Loading