Skip to content

Commit

Permalink
Add top toolbar to distraction free mode (#56295)
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu authored Nov 21, 2023
1 parent 1e29bb5 commit 1587cb9
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function WritingMenu() {

const toggleDistractionFree = () => {
registry.batch( () => {
setPreference( 'core/edit-post', 'fixedToolbar', false );
setPreference( 'core/edit-post', 'fixedToolbar', true );
setIsInserterOpened( false );
setIsListViewOpened( false );
closeGeneralSidebar();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function EditPostPreferencesModal() {
const { set: setPreference } = useDispatch( preferencesStore );

const toggleDistractionFree = () => {
setPreference( 'core/edit-post', 'fixedToolbar', false );
setPreference( 'core/edit-post', 'fixedToolbar', true );
setIsInserterOpened( false );
setIsListViewOpened( false );
closeGeneralSidebar();
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ export const toggleDistractionFree =
registry.batch( () => {
registry
.dispatch( preferencesStore )
.set( 'core/edit-post', 'fixedToolbar', false );
.set( 'core/edit-post', 'fixedToolbar', true );
dispatch.setIsInserterOpened( false );
dispatch.setIsListViewOpened( false );
dispatch.closeGeneralSidebar();
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/src/store/test/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ describe( 'actions', () => {
registry
.select( preferencesStore )
.get( 'core/edit-post', 'fixedToolbar' )
).toBe( false );
).toBe( true );
expect( registry.select( editPostStore ).isListViewOpened() ).toBe(
false
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function MoreMenu( { showIconLabels } ) {

const toggleDistractionFree = () => {
registry.batch( () => {
setPreference( 'core/edit-site', 'fixedToolbar', false );
setPreference( 'core/edit-site', 'fixedToolbar', true );
setIsInserterOpened( false );
setIsListViewOpened( false );
closeGeneralSidebar();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function EditSitePreferencesModal() {
const { set: setPreference } = useDispatch( preferencesStore );
const toggleDistractionFree = () => {
registry.batch( () => {
setPreference( 'core/edit-site', 'fixedToolbar', false );
setPreference( 'core/edit-site', 'fixedToolbar', true );
setIsInserterOpened( false );
setIsListViewOpened( false );
closeGeneralSidebar();
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ export const toggleDistractionFree =
registry.batch( () => {
registry
.dispatch( preferencesStore )
.set( 'core/edit-site', 'fixedToolbar', false );
.set( 'core/edit-site', 'fixedToolbar', true );
dispatch.setIsInserterOpened( false );
dispatch.setIsListViewOpened( false );
dispatch.closeGeneralSidebar();
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/src/store/test/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ describe( 'actions', () => {
registry
.select( preferencesStore )
.get( 'core/edit-site', 'fixedToolbar' )
).toBe( false );
).toBe( true );
expect( registry.select( editSiteStore ).isListViewOpened() ).toBe(
false
);
Expand Down

0 comments on commit 1587cb9

Please sign in to comment.