mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
chore: assign todos (#7297)
This commit is contained in:
@@ -20,7 +20,7 @@ export type SearchCallbackResult =
|
||||
action: 'insert';
|
||||
};
|
||||
|
||||
// todo: move command registry to entity as well
|
||||
// TODO(@Peng): move command registry to entity as well
|
||||
export class QuickSearch extends Entity {
|
||||
constructor(
|
||||
private readonly docsService: DocsService,
|
||||
|
||||
@@ -320,7 +320,7 @@ export const usePageCommands = () => {
|
||||
]);
|
||||
};
|
||||
|
||||
// todo: refactor to reduce duplication with usePageCommands
|
||||
// TODO(@Peng): refactor to reduce duplication with usePageCommands
|
||||
export const useSearchCallbackCommands = () => {
|
||||
const quickSearch = useService(QuickSearchService).quickSearch;
|
||||
const workspace = useService(WorkspaceService).workspace;
|
||||
@@ -415,7 +415,7 @@ export const collectionToCommand = (
|
||||
};
|
||||
|
||||
export const useCollectionsCommands = () => {
|
||||
// todo: considering collections for searching pages
|
||||
// TODO(@eyhn): considering collections for searching pages
|
||||
const collectionService = useService(CollectionService);
|
||||
const collections = useLiveData(collectionService.collections$);
|
||||
const quickSearch = useService(QuickSearchService).quickSearch;
|
||||
|
||||
@@ -200,7 +200,7 @@ export const CMDKContainer = ({
|
||||
onValueChange={setValue}
|
||||
loop
|
||||
>
|
||||
{/* todo: add page context here */}
|
||||
{/* TODO(@Peng): add page context here */}
|
||||
{inputLabel ? (
|
||||
<div className={styles.pageTitleWrapper}>
|
||||
<span className={styles.pageTitle}>{inputLabel}</span>
|
||||
|
||||
@@ -71,7 +71,7 @@ export class FindInPage extends Entity {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
// todo: hide on navigation
|
||||
// TODO(@Peng): hide on navigation
|
||||
}
|
||||
|
||||
findInPage(searchText: string) {
|
||||
|
||||
@@ -152,7 +152,7 @@ export const pageItemLabel = style({
|
||||
textAlign: 'left',
|
||||
selectors: {
|
||||
'[aria-selected="true"] &': {
|
||||
// TODO: wait for design
|
||||
// TODO(@catsjuice): wait for design
|
||||
color: cssVar('primaryColor'),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -110,7 +110,7 @@ const EditorJournalPanel = () => {
|
||||
|
||||
const customDayRenderer = useCallback(
|
||||
(cell: DateCell) => {
|
||||
// TODO: add a dot to indicate journal
|
||||
// TODO(@catsjuice): add a dot to indicate journal
|
||||
// has performance issue for now, better to calculate it in advance
|
||||
// const hasJournal = !!getJournalsByDate(cell.date.format('YYYY-MM-DD'))?.length;
|
||||
const hasJournal = false;
|
||||
|
||||
@@ -118,7 +118,7 @@ export function DocPeekPreview({
|
||||
peekView.open({ docId, blockId }).catch(console.error);
|
||||
})
|
||||
);
|
||||
// todo: no tag peek view yet
|
||||
// TODO(@Peng): no tag peek view yet
|
||||
disposableGroup.add(
|
||||
rootService.slots.tagClicked.on(({ tagId }) => {
|
||||
jumpToTag(workspace.id, tagId);
|
||||
|
||||
@@ -116,7 +116,7 @@ export const DocPeekViewControls = ({
|
||||
name: t['com.affine.peek-view-controls.open-doc'](),
|
||||
nameKey: 'open',
|
||||
onClick: () => {
|
||||
// todo: for frame blocks, we should mimic "view in edgeless" button behavior
|
||||
// TODO(@Peng): for frame blocks, we should mimic "view in edgeless" button behavior
|
||||
blockId
|
||||
? jumpToPageBlock(workspace.id, docId, blockId)
|
||||
: workbench.openPage(docId);
|
||||
|
||||
@@ -67,7 +67,7 @@ export class WorkspacePropertiesAdapter extends Service {
|
||||
return;
|
||||
}
|
||||
this.ensuredRoot = true;
|
||||
// todo: deal with schema change issue
|
||||
// TODO(@Peng): deal with schema change issue
|
||||
// fixme: may not to be called every time
|
||||
defaultsDeep(this.proxy, {
|
||||
schema: {
|
||||
|
||||
@@ -155,7 +155,7 @@ export class Workbench extends Entity {
|
||||
const newNextSize = Number(
|
||||
(nextView.size$.value - percentOfTotal).toFixed(4)
|
||||
);
|
||||
// TODO: better strategy to limit size
|
||||
// TODO(@catsjuice): better strategy to limit size
|
||||
if (newSize / totalViewSize < 0.2 || newNextSize / totalViewSize < 0.2)
|
||||
return;
|
||||
view.setSize(newSize);
|
||||
|
||||
@@ -15,7 +15,7 @@ export const ResizeHandle = ({
|
||||
onResizeStart,
|
||||
onResizeEnd,
|
||||
}: ResizeHandleProps) => {
|
||||
// TODO: touch support
|
||||
// TODO(@catsjuice): touch support
|
||||
const onMouseDown = useCallback(
|
||||
(e: React.MouseEvent) => {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -35,7 +35,7 @@ export interface SplitViewProps extends HTMLAttributes<HTMLDivElement> {
|
||||
}
|
||||
|
||||
type SlotsMap = Record<View['id'], RefObject<HTMLDivElement | null>>;
|
||||
// TODO: vertical orientation support
|
||||
// TODO(@catsjuice): vertical orientation support
|
||||
export const SplitView = ({
|
||||
orientation = 'horizontal',
|
||||
className,
|
||||
|
||||
Reference in New Issue
Block a user