mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
feat(core): drop doc onto split view (#9487)
fix AF-2068, AF-2069, AF-1175, AF-2061, AF-2079, AF-2034, AF-2080, AF-1960, AF-2081 1. replace `dnd-kit` with `@atlaskit/pragmatic-drag-and-drop` 2. allow creating split views by drag & drop the following a. WorkbenchLinks (route links), like journals, trash, all docs b. doc refs c. tags/collection 3. style adjustments to split view 4. remove split view's feature flag and make it GA for electron https://github.com/user-attachments/assets/6a3e4a25-faa2-4215-8eb0-983f44db6e8c
This commit is contained in:
@@ -78,27 +78,25 @@ export const mainContainerStyle = style({
|
||||
width: '100%',
|
||||
display: 'flex',
|
||||
flex: 1,
|
||||
overflow: 'clip',
|
||||
maxWidth: '100%',
|
||||
|
||||
selectors: {
|
||||
'&[data-client-border="true"]': {
|
||||
borderRadius: 6,
|
||||
margin: '8px',
|
||||
overflow: 'clip',
|
||||
padding: '8px',
|
||||
'@media': {
|
||||
print: {
|
||||
overflow: 'visible',
|
||||
margin: '0px',
|
||||
padding: '0px',
|
||||
borderRadius: '0px',
|
||||
},
|
||||
},
|
||||
},
|
||||
'&[data-client-border="true"][data-side-bar-open="true"]': {
|
||||
marginLeft: 0,
|
||||
paddingLeft: 0,
|
||||
},
|
||||
'&[data-client-border="true"][data-is-desktop="true"]': {
|
||||
marginTop: 0,
|
||||
paddingTop: 0,
|
||||
},
|
||||
'&[data-client-border="false"][data-is-desktop="true"][data-side-bar-open="true"]':
|
||||
{
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { useJournalRouteHelper } from '@affine/core/components/hooks/use-journal';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
// this route page acts as a redirector to today's journal
|
||||
export const Component = () => {
|
||||
const { openToday } = useJournalRouteHelper();
|
||||
useEffect(() => {
|
||||
openToday({ replaceHistory: true });
|
||||
}, [openToday]);
|
||||
return null;
|
||||
};
|
||||
@@ -33,6 +33,10 @@ export const workbenchRoutes = [
|
||||
path: '/:pageId/attachments/:attachmentId',
|
||||
lazy: () => import('./pages/workspace/attachment/index'),
|
||||
},
|
||||
{
|
||||
path: '/journals',
|
||||
lazy: () => import('./pages/journals'),
|
||||
},
|
||||
{
|
||||
path: '*',
|
||||
lazy: () => import('./pages/404'),
|
||||
|
||||
Reference in New Issue
Block a user