Skip to content
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

Selecting on a comment should scroll to the block #66873

Open
wants to merge 22 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
912ec5a
Scroll editor blocks based on comments
karthick-murugan Nov 8, 2024
154c273
Update blockClientId
karthick-murugan Nov 8, 2024
52341d1
Update Iframe
karthick-murugan Nov 11, 2024
aef8840
Feedback Changes
karthick-murugan Nov 26, 2024
0c34d4e
Merge branch 'trunk' into feature/block-comments-scroll
karthick-murugan Nov 27, 2024
dad8215
Site Editor: Unify layout with posts dataviews (#67162)
youknowriad Nov 27, 2024
cd730bb
Scroll editor blocks based on comments
karthick-murugan Nov 8, 2024
583632d
Feedback Changes
karthick-murugan Nov 26, 2024
499cfd8
Feedback Changes
karthick-murugan Nov 27, 2024
d71c1c6
Remove unnecessary changes
karthick-murugan Nov 28, 2024
07c85f6
Feedback Changes
karthick-murugan Nov 28, 2024
a7693d4
Merge branch 'trunk' of github.com:karthick-murugan/gutenberg into fe…
karthick-murugan Nov 28, 2024
8367a44
Linting issues fixed
karthick-murugan Nov 28, 2024
9d60b44
Feedback Changes updated
karthick-murugan Dec 4, 2024
e5d379b
Feedback updates
karthick-murugan Dec 5, 2024
939f2f5
Feedback updates
karthick-murugan Dec 5, 2024
68568d9
Feedback updates
karthick-murugan Dec 5, 2024
13194c1
Feedback and site editor updates
karthick-murugan Dec 5, 2024
e9b0e4b
Updating feedback changes
karthick-murugan Dec 5, 2024
cc4c27a
Merge branch 'trunk' into feature/block-comments-scroll
karthick-murugan Dec 5, 2024
de2c602
Reverting comment header
karthick-murugan Dec 5, 2024
07453a5
Merge branch 'feature/block-comments-scroll' of github.com:karthick-m…
karthick-murugan Dec 5, 2024
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
Prev Previous commit
Next Next commit
Remove unnecessary changes
  • Loading branch information
karthick-murugan committed Nov 28, 2024
commit d71c1c69af263ee84dfe479a837c97ab9561a53d
19 changes: 15 additions & 4 deletions packages/edit-site/src/components/app/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/**
* WordPress dependencies
*/
import { SlotFillProvider } from '@wordpress/components';
import {
UnsavedChangesWarning,
privateApis as editorPrivateApis,
} from '@wordpress/editor';
import { store as noticesStore } from '@wordpress/notices';
import { useDispatch } from '@wordpress/data';
import { __, sprintf } from '@wordpress/i18n';
Expand All @@ -18,6 +23,7 @@ import useSetCommandContext from '../../hooks/commands/use-set-command-context';
import { useRegisterSiteEditorRoutes } from '../site-editor-routes';

const { RouterProvider } = unlock( routerPrivateApis );
const { GlobalStylesProvider } = unlock( editorPrivateApis );

function AppLayout() {
useCommonCommands();
Expand All @@ -44,9 +50,14 @@ export default function App() {
}

return (
<RouterProvider>
<AppLayout />
<PluginArea onError={ onPluginAreaError } />
</RouterProvider>
<SlotFillProvider>
<GlobalStylesProvider>
<UnsavedChangesWarning />
<RouterProvider>
<AppLayout />
<PluginArea onError={ onPluginAreaError } />
</RouterProvider>
</GlobalStylesProvider>
</SlotFillProvider>
);
}
17 changes: 2 additions & 15 deletions packages/edit-site/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
__unstableMotion as motion,
__unstableAnimatePresence as AnimatePresence,
__unstableUseNavigateRegions as useNavigateRegions,
SlotFillProvider,
} from '@wordpress/components';
import {
useReducedMotion,
Expand All @@ -24,7 +23,6 @@ import { CommandMenu } from '@wordpress/commands';
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
import {
EditorSnackbars,
UnsavedChangesWarning,
privateApis as editorPrivateApis,
} from '@wordpress/editor';
import { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';
Expand All @@ -46,12 +44,12 @@ import SavePanel from '../save-panel';

const { useCommands } = unlock( coreCommandsPrivateApis );
const { useGlobalStyle } = unlock( blockEditorPrivateApis );
const { NavigableRegion, GlobalStylesProvider } = unlock( editorPrivateApis );
const { NavigableRegion } = unlock( editorPrivateApis );
const { useLocation } = unlock( routerPrivateApis );

const ANIMATION_DURATION = 0.3;

function Layout( { route } ) {
export default function Layout( { route } ) {
const { params } = useLocation();
const { canvas = 'view' } = params;
useCommands();
Expand Down Expand Up @@ -80,7 +78,6 @@ function Layout( { route } ) {

return (
<>
<UnsavedChangesWarning />
<CommandMenu />
{ canvas === 'view' && <SaveKeyboardShortcut /> }
<div
Expand Down Expand Up @@ -234,13 +231,3 @@ function Layout( { route } ) {
</>
);
}

export default function LayoutWithGlobalStylesProvider( props ) {
return (
<SlotFillProvider>
<GlobalStylesProvider>
<Layout { ...props } />
</GlobalStylesProvider>
</SlotFillProvider>
);
}
14 changes: 11 additions & 3 deletions packages/edit-site/src/components/posts-app/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/**
* WordPress dependencies
*/
import {
UnsavedChangesWarning,
privateApis as editorPrivateApis,
} from '@wordpress/editor';
import { privateApis as routerPrivateApis } from '@wordpress/router';

/**
Expand All @@ -12,6 +16,7 @@ import { unlock } from '../../lock-unlock';
import useActiveRoute from '../layout/router';

const { RouterProvider } = unlock( routerPrivateApis );
const { GlobalStylesProvider } = unlock( editorPrivateApis );

function PostsLayout() {
useRegisterPostsAppRoutes();
Expand All @@ -21,8 +26,11 @@ function PostsLayout() {

export default function PostsApp() {
return (
<RouterProvider>
<PostsLayout />
</RouterProvider>
<GlobalStylesProvider>
<UnsavedChangesWarning />
<RouterProvider>
<PostsLayout />
</RouterProvider>
</GlobalStylesProvider>
);
}
Loading