From 7b3673ae82d7a94fc9213f9dbb83e4f25871d59a Mon Sep 17 00:00:00 2001 From: forehalo Date: Fri, 21 Jun 2024 07:54:14 +0000 Subject: [PATCH] chore: assign todos (#7297) --- packages/backend/server/src/app.ts | 2 +- packages/backend/server/src/core/auth/controller.ts | 2 +- packages/backend/server/src/core/quota/storage.ts | 1 - packages/backend/server/src/core/user/resolver.ts | 2 +- .../migrations/1698652531198-user-features-init.ts | 2 +- .../server/src/fundamentals/mailer/mail.service.ts | 1 - .../server/src/plugins/copilot/workflow/index.ts | 2 +- .../server/src/plugins/copilot/workflow/node.ts | 2 +- .../server/src/plugins/storage/providers/s3.ts | 2 +- packages/common/infra/src/app-config-storage.ts | 2 +- packages/common/infra/src/atom/settings.ts | 2 +- .../infra/src/blocksuite/migration/workspace.ts | 1 - .../src/components/member-components/invite-modal.tsx | 1 - packages/frontend/component/src/index.ts | 2 +- .../src/lit-react/lit-portal/lite-portal.tsx | 2 +- .../component/src/ui/date-picker/index.css.ts | 2 +- .../component/src/ui/date-picker/week-date-picker.tsx | 2 +- packages/frontend/component/src/ui/layout/wrapper.tsx | 11 ----------- packages/frontend/component/src/ui/menu/styles.css.ts | 2 +- .../frontend/component/src/ui/modal/confirm-modal.tsx | 2 +- .../src/blocksuite/presets/ai/actions/doc-handler.ts | 2 +- .../blocksuite/presets/ai/actions/edgeless-handler.ts | 4 ++-- .../core/src/blocksuite/presets/ai/actions/types.ts | 2 +- .../core/src/blocksuite/presets/ai/provider.ts | 4 ++-- .../frontend/core/src/commands/affine-updates.tsx | 2 +- .../frontend/core/src/commands/registry/command.ts | 6 +++--- .../core/src/components/admin-panel/utils.tsx | 2 +- .../error-basic/error-detail.tsx | 6 +++--- .../error-fallbacks/any-error-fallback.tsx | 2 +- .../components/affine/affine-error-boundary/index.tsx | 2 +- .../src/components/affine/ai-onboarding/slider.tsx | 2 +- .../core/src/components/affine/auth/oauth.tsx | 2 +- .../core/src/components/affine/auth/send-email.tsx | 6 +++--- .../components/affine/auth/sign-in-with-password.tsx | 2 +- .../core/src/components/affine/auth/sign-in.tsx | 2 +- .../core/src/components/affine/awareness/index.tsx | 4 ++-- .../affine/create-workspace-modal/index.tsx | 4 ++-- .../affine/onboarding/articles/blocks.css.ts | 2 +- .../components/affine/onboarding/articles/index.tsx | 2 +- .../affine/onboarding/steps/edgeless-switch.tsx | 2 +- .../src/components/affine/page-history-modal/data.ts | 2 +- .../affine/page-history-modal/history-modal.tsx | 2 +- .../affine/page-properties/page-properties-manager.ts | 2 +- .../page-properties/property-row-value-renderer.tsx | 2 +- .../src/components/affine/page-properties/table.tsx | 2 +- .../setting-modal/account-setting/ai-usage-panel.tsx | 2 +- .../affine/setting-modal/account-setting/index.tsx | 2 +- .../account-setting/storage-progress.tsx | 3 +-- .../setting-modal/general-setting/billing/index.tsx | 2 -- .../general-setting/experimental-features/index.tsx | 2 +- .../general-setting/plans/ai/actions/subscribe.tsx | 2 +- .../general-setting/plans/ai/benefits.tsx | 2 +- .../general-setting/plans/cloud-plans.tsx | 2 -- .../setting-modal/general-setting/plans/layout.tsx | 4 ++-- .../setting-modal/general-setting/plans/skeleton.tsx | 2 +- .../setting-modal/general-setting/plans/style.css.ts | 2 +- .../affine/setting-modal/setting-sidebar/index.tsx | 2 +- .../delete-leave-workspace/index.tsx | 2 +- .../new-workspace-setting-detail/labels.tsx | 2 +- .../new-workspace-setting-detail/members.tsx | 2 +- .../affine/share-page-modal/share-menu/index.css.ts | 2 +- .../affine/share-page-modal/share-menu/share-page.tsx | 4 ++-- .../app-sidebar/app-download-button/index.tsx | 2 +- .../blocksuite/block-suite-editor/ai/event-source.ts | 2 +- .../blocksuite/block-suite-editor/ai/prompt.ts | 2 +- .../block-suite-editor/journal-doc-title.tsx | 2 +- .../blocksuite/block-suite-editor/no-page-error.ts | 2 +- .../blocksuite/block-suite-header/menu/index.tsx | 2 +- .../block-suite-header/present/use-present.ts | 2 +- .../cloud/share-header-right-item/index.tsx | 2 +- .../cloud/share-header-right-item/user-avatar.tsx | 2 +- .../page-list/collections/collection-list-item.css.ts | 2 +- .../page-list/collections/collection-list-item.tsx | 2 +- .../components/page-list/docs/page-list-item.css.ts | 2 +- .../src/components/page-list/docs/page-list-item.tsx | 2 +- .../src/components/page-list/group-definitions.tsx | 4 ++-- .../frontend/core/src/components/page-list/list.tsx | 2 +- .../core/src/components/page-list/page-group.tsx | 2 +- .../components/page-list/tags/tag-list-item.css.ts | 2 +- .../src/components/page-list/tags/tag-list-item.tsx | 2 +- .../frontend/core/src/components/page-list/types.ts | 8 ++++---- .../components/page-list/use-filtered-page-metas.tsx | 2 +- .../src/components/page-list/virtualized-list.tsx | 2 +- .../workspace-slider-bar/workspace-card/index.tsx | 2 +- .../core/src/components/root-app-sidebar/index.css.ts | 2 +- .../src/components/workspace-upgrade/upgrade-icon.tsx | 2 +- .../core/src/components/workspace-upgrade/upgrade.tsx | 4 ++-- .../core/src/components/workspace/index.css.ts | 6 +++--- .../src/hooks/affine/use-all-page-list-config.tsx | 2 +- .../core/src/hooks/affine/use-mutate-cloud.ts | 2 +- .../use-register-blocksuite-editor-commands.tsx | 4 ++-- .../frontend/core/src/hooks/use-affine-adapter.ts | 2 +- packages/frontend/core/src/hooks/use-app-updater.ts | 2 +- .../frontend/core/src/hooks/use-navigate-helper.ts | 2 +- packages/frontend/core/src/hooks/use-query.ts | 2 +- .../core/src/modules/cmdk/entities/quick-search.ts | 2 +- .../core/src/modules/cmdk/views/data-hooks.tsx | 4 ++-- .../frontend/core/src/modules/cmdk/views/main.tsx | 2 +- .../src/modules/find-in-page/entities/find-in-page.ts | 2 +- .../multi-tab-sidebar/multi-tabs/tabs/journal.css.ts | 2 +- .../multi-tab-sidebar/multi-tabs/tabs/journal.tsx | 2 +- .../core/src/modules/peek-view/view/doc-peek-view.tsx | 2 +- .../src/modules/peek-view/view/peek-view-controls.tsx | 2 +- .../core/src/modules/properties/services/adapter.ts | 2 +- .../core/src/modules/workbench/entities/workbench.ts | 2 +- .../workbench/view/split-view/resize-handle.tsx | 2 +- .../modules/workbench/view/split-view/split-view.tsx | 2 +- packages/frontend/core/src/pages/auth.tsx | 6 +++--- packages/frontend/core/src/pages/index.tsx | 2 +- packages/frontend/core/src/pages/magic-link.tsx | 2 +- packages/frontend/core/src/pages/subscribe.tsx | 2 +- .../pages/workspace/detail-page/detail-page.css.ts | 2 +- .../src/pages/workspace/detail-page/detail-page.tsx | 2 +- .../frontend/core/src/providers/modal-provider.tsx | 2 +- packages/frontend/electron/forge.config.mjs | 2 +- packages/frontend/electron/renderer/index.tsx | 2 +- packages/frontend/electron/src/main/handlers.ts | 2 +- packages/frontend/electron/src/main/main-window.ts | 2 +- packages/frontend/electron/src/main/onboarding.ts | 2 +- tests/affine-cloud/e2e/migration.spec.ts | 2 +- tests/affine-local/e2e/image-preview.spec.ts | 2 +- 121 files changed, 137 insertions(+), 157 deletions(-) diff --git a/packages/backend/server/src/app.ts b/packages/backend/server/src/app.ts index 369b5745c988b..dae092c3693c0 100644 --- a/packages/backend/server/src/app.ts +++ b/packages/backend/server/src/app.ts @@ -27,7 +27,7 @@ export async function createApp() { app.use( graphqlUploadExpress({ - // TODO: dynamic limit by quota + // TODO(@darksky): dynamic limit by quota maybe? maxFileSize: 100 * 1024 * 1024, maxFiles: 5, }) diff --git a/packages/backend/server/src/core/auth/controller.ts b/packages/backend/server/src/core/auth/controller.ts index cc2e1bc87d159..96f3c7f54337c 100644 --- a/packages/backend/server/src/core/auth/controller.ts +++ b/packages/backend/server/src/core/auth/controller.ts @@ -202,7 +202,7 @@ export class AuthController { @Public() @Get('/challenge') async challenge() { - // TODO: impl in following PR + // TODO(@darksky): impl in following PR return { challenge: randomUUID(), resource: randomUUID(), diff --git a/packages/backend/server/src/core/quota/storage.ts b/packages/backend/server/src/core/quota/storage.ts index 7724446ef6163..7a42f754ef9bb 100644 --- a/packages/backend/server/src/core/quota/storage.ts +++ b/packages/backend/server/src/core/quota/storage.ts @@ -41,7 +41,6 @@ export class QuotaManagementService { }; } - // TODO: lazy calc, need to be optimized with cache async getUserUsage(userId: string) { const workspaces = await this.permissions.getOwnedWorkspaces(userId); diff --git a/packages/backend/server/src/core/user/resolver.ts b/packages/backend/server/src/core/user/resolver.ts index f5b3760cc869b..9aa8a136e84d8 100644 --- a/packages/backend/server/src/core/user/resolver.ts +++ b/packages/backend/server/src/core/user/resolver.ts @@ -55,7 +55,7 @@ export class UserResolver { ): Promise { validators.assertValidEmail(email); - // TODO: need to limit a user can only get another user witch is in the same workspace + // TODO(@forehalo): need to limit a user can only get another user witch is in the same workspace const user = await this.users.findUserWithHashedPasswordByEmail(email); // return empty response when user not exists diff --git a/packages/backend/server/src/data/migrations/1698652531198-user-features-init.ts b/packages/backend/server/src/data/migrations/1698652531198-user-features-init.ts index 5b86d4cd169cd..1e3b1de98e0be 100644 --- a/packages/backend/server/src/data/migrations/1698652531198-user-features-init.ts +++ b/packages/backend/server/src/data/migrations/1698652531198-user-features-init.ts @@ -20,6 +20,6 @@ export class UserFeaturesInit1698652531198 { // revert the migration static async down(_db: PrismaClient) { - // TODO: revert the migration + // noop } } diff --git a/packages/backend/server/src/fundamentals/mailer/mail.service.ts b/packages/backend/server/src/fundamentals/mailer/mail.service.ts index 63b1306adda85..dff7d078975a4 100644 --- a/packages/backend/server/src/fundamentals/mailer/mail.service.ts +++ b/packages/backend/server/src/fundamentals/mailer/mail.service.ts @@ -44,7 +44,6 @@ export class MailService { }; } ) { - // TODO: use callback url when need support desktop app const buttonUrl = this.url.link(`/invite/${inviteId}`); const workspaceAvatar = invitationInfo.workspace.avatar; diff --git a/packages/backend/server/src/plugins/copilot/workflow/index.ts b/packages/backend/server/src/plugins/copilot/workflow/index.ts index 675e643b3131b..a3c491073cb05 100644 --- a/packages/backend/server/src/plugins/copilot/workflow/index.ts +++ b/packages/backend/server/src/plugins/copilot/workflow/index.ts @@ -47,7 +47,7 @@ export class CopilotWorkflowService { return workflow; } - // todo: get workflow from database + // TODO(@darksky): get workflow from database private async getWorkflow(graphName: string): Promise { const graph = WorkflowGraphs.find(g => g.name === graphName); if (!graph) { diff --git a/packages/backend/server/src/plugins/copilot/workflow/node.ts b/packages/backend/server/src/plugins/copilot/workflow/node.ts index 6af694d425ef7..4d7c5f76191db 100644 --- a/packages/backend/server/src/plugins/copilot/workflow/node.ts +++ b/packages/backend/server/src/plugins/copilot/workflow/node.ts @@ -74,7 +74,7 @@ export class WorkflowNode { private async evaluateCondition( _condition?: string ): Promise { - // todo: evaluate condition to impl decision block + // TODO(@darksky): evaluate condition to impl decision block return this.edges[0]?.id; } diff --git a/packages/backend/server/src/plugins/storage/providers/s3.ts b/packages/backend/server/src/plugins/storage/providers/s3.ts index 73cbccbcd375f..3a242704dbf28 100644 --- a/packages/backend/server/src/plugins/storage/providers/s3.ts +++ b/packages/backend/server/src/plugins/storage/providers/s3.ts @@ -62,7 +62,7 @@ export class S3StorageProvider implements StorageProvider { // metadata ContentType: metadata.contentType, ContentLength: metadata.contentLength, - // TODO: Cloudflare doesn't support CRC32, use md5 instead later. + // TODO(@forehalo): Cloudflare doesn't support CRC32, use md5 instead later. // ChecksumCRC32: metadata.checksumCRC32, }) ); diff --git a/packages/common/infra/src/app-config-storage.ts b/packages/common/infra/src/app-config-storage.ts index 539416d56e36e..36b5698e5937e 100644 --- a/packages/common/infra/src/app-config-storage.ts +++ b/packages/common/infra/src/app-config-storage.ts @@ -68,7 +68,7 @@ class Storage { } } else { const fullConfig = this.get(); - // TODO: handle key not found, set default value + // TODO(@catsjuice): handle key not found, set default value // if (!(key in fullConfig)) {} return fullConfig[key]; } diff --git a/packages/common/infra/src/atom/settings.ts b/packages/common/infra/src/atom/settings.ts index 789295d420758..ca151886270ff 100644 --- a/packages/common/infra/src/atom/settings.ts +++ b/packages/common/infra/src/atom/settings.ts @@ -90,7 +90,7 @@ export function setupEditorFlags(docCollection: DocCollection) { }); // override this flag in app settings - // TODO: need a better way to manage block suite flags + // TODO(@eyhn): need a better way to manage block suite flags docCollection.awarenessStore.setFlag('enable_synced_doc_block', true); } catch (err) { logger.error('syncEditorFlags', err); diff --git a/packages/common/infra/src/blocksuite/migration/workspace.ts b/packages/common/infra/src/blocksuite/migration/workspace.ts index f39819c8b58b8..79b6f4700e8d0 100644 --- a/packages/common/infra/src/blocksuite/migration/workspace.ts +++ b/packages/common/infra/src/blocksuite/migration/workspace.ts @@ -53,7 +53,6 @@ export function checkWorkspaceCompatibility( return MigrationPoint.BlockVersion; } - // TODO: Catch compatibility error from blocksuite to show upgrade page. // Temporarily follow the check logic of blocksuite. if ((docCollection.meta.docs?.length ?? 0) <= 1) { try { diff --git a/packages/frontend/component/src/components/member-components/invite-modal.tsx b/packages/frontend/component/src/components/member-components/invite-modal.tsx index 7dd291bfa78bd..9d3a4600936bf 100644 --- a/packages/frontend/component/src/components/member-components/invite-modal.tsx +++ b/packages/frontend/component/src/components/member-components/invite-modal.tsx @@ -65,7 +65,6 @@ export const InviteModal = ({ }} onConfirm={handleConfirm} > - {/*TODO: check email & add placeholder*/} = new Set(); export function createLitPortalAnchor(callback: (event: PortalEvent) => void) { const id = nanoid(); - // todo: clean up listeners? + // todo(@Peng): clean up listeners? listeners.add(event => { if (event.target.portalId !== id) { return; diff --git a/packages/frontend/component/src/ui/date-picker/index.css.ts b/packages/frontend/component/src/ui/date-picker/index.css.ts index d48c2b9eb1a4a..99d84d6c84291 100644 --- a/packages/frontend/component/src/ui/date-picker/index.css.ts +++ b/packages/frontend/component/src/ui/date-picker/index.css.ts @@ -48,7 +48,7 @@ export const inputStyle = style({ }); export const popperStyle = style({ boxShadow: cssVar('shadow2'), - // TODO: for menu offset, need to be optimized + // TODO(@catsjuice): for menu offset, need to be optimized marginTop: '16px', background: cssVar('backgroundOverlayPanelColor'), borderRadius: '12px', diff --git a/packages/frontend/component/src/ui/date-picker/week-date-picker.tsx b/packages/frontend/component/src/ui/date-picker/week-date-picker.tsx index f4d57fb7a0efb..bbf82b50775aa 100644 --- a/packages/frontend/component/src/ui/date-picker/week-date-picker.tsx +++ b/packages/frontend/component/src/ui/date-picker/week-date-picker.tsx @@ -29,7 +29,7 @@ export interface WeekDatePickerProps handleRef?: ForwardedRef; } -// TODO: i18n +// TODO(catsjuice): i18n const weekDays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; // const weekDays = ['日', '一', '二', '三', '四', '五', '六']; const format = 'YYYY-MM-DD'; diff --git a/packages/frontend/component/src/ui/layout/wrapper.tsx b/packages/frontend/component/src/ui/layout/wrapper.tsx index 1b73b44b2d3c3..4d25e79748e6b 100644 --- a/packages/frontend/component/src/ui/layout/wrapper.tsx +++ b/packages/frontend/component/src/ui/layout/wrapper.tsx @@ -113,15 +113,4 @@ export const FlexWrapper = styled(Wrapper, { }; }); -// TODO: Complete me -export const GridWrapper = styled(Wrapper, { - shouldForwardProp: prop => { - return ![''].includes(prop as string); - }, -})(() => { - return { - display: 'grid', - }; -}); - export default Wrapper; diff --git a/packages/frontend/component/src/ui/menu/styles.css.ts b/packages/frontend/component/src/ui/menu/styles.css.ts index e950895875724..9ab0cff526174 100644 --- a/packages/frontend/component/src/ui/menu/styles.css.ts +++ b/packages/frontend/component/src/ui/menu/styles.css.ts @@ -132,7 +132,7 @@ export const menuTrigger = style({ color: cssVar('textDisableColor'), pointerEvents: 'none', }, - // TODO: wait for design + // TODO(@catsjuice): wait for design '&.error': { // borderColor: 'var(--affine-error-color)', }, diff --git a/packages/frontend/component/src/ui/modal/confirm-modal.tsx b/packages/frontend/component/src/ui/modal/confirm-modal.tsx index f6ae5ae873857..3ffe0b2598454 100644 --- a/packages/frontend/component/src/ui/modal/confirm-modal.tsx +++ b/packages/frontend/component/src/ui/modal/confirm-modal.tsx @@ -142,7 +142,7 @@ export const ConfirmModalProvider = ({ children }: PropsWithChildren) => { value={{ openConfirmModal, closeConfirmModal, modalProps }} > {children} - {/* TODO: multi-instance support(unnecessary for now) */} + {/* TODO(@catsjuice): multi-instance support(unnecessary for now) */} ); diff --git a/packages/frontend/core/src/blocksuite/presets/ai/actions/doc-handler.ts b/packages/frontend/core/src/blocksuite/presets/ai/actions/doc-handler.ts index fae4636f77f95..869123d5a03e8 100644 --- a/packages/frontend/core/src/blocksuite/presets/ai/actions/doc-handler.ts +++ b/packages/frontend/core/src/blocksuite/presets/ai/actions/doc-handler.ts @@ -108,7 +108,7 @@ export function actionToStream( docId: host.doc.id, workspaceId: host.doc.collection.id, } as Parameters[0]; - // @ts-expect-error todo: maybe fix this + // @ts-expect-error TODO(@Peng): maybe fix this stream = action(options); if (!stream) return; yield* stream; diff --git a/packages/frontend/core/src/blocksuite/presets/ai/actions/edgeless-handler.ts b/packages/frontend/core/src/blocksuite/presets/ai/actions/edgeless-handler.ts index 83a62390015db..59d1cdc597ca6 100644 --- a/packages/frontend/core/src/blocksuite/presets/ai/actions/edgeless-handler.ts +++ b/packages/frontend/core/src/blocksuite/presets/ai/actions/edgeless-handler.ts @@ -223,7 +223,7 @@ function actionToStream( Object.assign(options, data); } - // @ts-expect-error todo: maybe fix this + // @ts-expect-error TODO(@Peng): maybe fix this stream = action(options); if (!stream) return; yield* stream; @@ -253,7 +253,7 @@ function actionToStream( workspaceId: host.doc.collection.id, } as Parameters[0]; - // @ts-expect-error todo: maybe fix this + // @ts-expect-error TODO(@Peng): maybe fix this stream = action(options); if (!stream) return; yield* stream; diff --git a/packages/frontend/core/src/blocksuite/presets/ai/actions/types.ts b/packages/frontend/core/src/blocksuite/presets/ai/actions/types.ts index 041b9319531c3..500e2608332f9 100644 --- a/packages/frontend/core/src/blocksuite/presets/ai/actions/types.ts +++ b/packages/frontend/core/src/blocksuite/presets/ai/actions/types.ts @@ -215,7 +215,7 @@ declare global { ): AIActionTextResponse; } - // todo: should be refactored to get rid of implement details (like messages, action, role, etc.) + // TODO(@Peng): should be refactored to get rid of implement details (like messages, action, role, etc.) interface AIHistory { sessionId: string; tokens: number; diff --git a/packages/frontend/core/src/blocksuite/presets/ai/provider.ts b/packages/frontend/core/src/blocksuite/presets/ai/provider.ts index 0529e6eb1cf60..a120332d91bc4 100644 --- a/packages/frontend/core/src/blocksuite/presets/ai/provider.ts +++ b/packages/frontend/core/src/blocksuite/presets/ai/provider.ts @@ -32,7 +32,7 @@ export type ActionEventType = * To use it, downstream (affine) has to provide AI actions implementation, * user info etc * - * todo: breakdown into different parts? + * TODO: breakdown into different parts? */ export class AIProvider { static get slots() { @@ -124,7 +124,7 @@ export class AIProvider { console.warn(`AI action ${id} is already provided`); } - // @ts-expect-error todo: maybe fix this + // @ts-expect-error TODO: maybe fix this this.actions[id] = ( ...args: Parameters ) => { diff --git a/packages/frontend/core/src/commands/affine-updates.tsx b/packages/frontend/core/src/commands/affine-updates.tsx index 394ef329137b1..2f632db6f37ae 100644 --- a/packages/frontend/core/src/commands/affine-updates.tsx +++ b/packages/frontend/core/src/commands/affine-updates.tsx @@ -24,7 +24,7 @@ export function registerAffineUpdatesCommands({ preconditionStrategy: () => !!store.get(updateReadyAtom), run() { apis?.updater.quitAndInstall().catch(err => { - // TODO: add error toast here + // TODO(@JimmFly): add error toast here console.error(err); }); }, diff --git a/packages/frontend/core/src/commands/registry/command.ts b/packages/frontend/core/src/commands/registry/command.ts index 9455ccb0781b3..bda81c391527d 100644 --- a/packages/frontend/core/src/commands/registry/command.ts +++ b/packages/frontend/core/src/commands/registry/command.ts @@ -1,6 +1,6 @@ import type { ReactNode } from 'react'; -// TODO: need better way for composing different precondition strategies +// TODO(@Peng): need better way for composing different precondition strategies export enum PreconditionStrategy { Always, InPaperOrEdgeless, @@ -52,11 +52,11 @@ export interface AffineCommandOptions { title: string; subTitle?: string; }); - icon: ReactNode; // todo: need a mapping from string -> React element/SVG + icon: ReactNode; // TODO(@JimmFly): need a mapping from string -> React element/SVG category?: CommandCategory; // we use https://github.com/jamiebuilds/tinykeys so that we can use the same keybinding definition // for both mac and windows - // todo: render keybinding in command palette + // TODO(@Peng): render keybinding in command palette keyBinding?: KeybindingOptions | string; run: () => void | Promise; } diff --git a/packages/frontend/core/src/components/admin-panel/utils.tsx b/packages/frontend/core/src/components/admin-panel/utils.tsx index 67d831184588b..4a30d115f7b6c 100644 --- a/packages/frontend/core/src/components/admin-panel/utils.tsx +++ b/packages/frontend/core/src/components/admin-panel/utils.tsx @@ -19,7 +19,7 @@ export const renderInput = ( ); - //TODO: add more types + // TODO(@JimmFly): add more types default: return null; } diff --git a/packages/frontend/core/src/components/affine/affine-error-boundary/error-basic/error-detail.tsx b/packages/frontend/core/src/components/affine/affine-error-boundary/error-basic/error-detail.tsx index c03972f092991..b90c8634d12e8 100644 --- a/packages/frontend/core/src/components/affine/affine-error-boundary/error-basic/error-detail.tsx +++ b/packages/frontend/core/src/components/affine/affine-error-boundary/error-basic/error-detail.tsx @@ -30,21 +30,21 @@ const imageMap = new Map([ [ ErrorStatus.NotFound, { - light: imageUrlFor404, // TODO: Ask designer for dark/light mode image. + light: imageUrlFor404, // TODO(@catsjuice): Ask designer for dark/light mode image. dark: imageUrlFor404, }, ], [ ErrorStatus.Unexpected, { - light: imageUrlForLight500, // TODO: Split assets lib and use image hook to handle light and dark. + light: imageUrlForLight500, // TODO(@catsjuice): Split assets lib and use image hook to handle light and dark. dark: imageUrlForDark500, }, ], ]); /** - * TODO: Unify with NotFoundPage. + * TODO(@eyhn): Unify with NotFoundPage. */ export const ErrorDetail: FC = props => { const { diff --git a/packages/frontend/core/src/components/affine/affine-error-boundary/error-fallbacks/any-error-fallback.tsx b/packages/frontend/core/src/components/affine/affine-error-boundary/error-fallbacks/any-error-fallback.tsx index 4ae326f421d27..3463e6829c0bf 100644 --- a/packages/frontend/core/src/components/affine/affine-error-boundary/error-fallbacks/any-error-fallback.tsx +++ b/packages/frontend/core/src/components/affine/affine-error-boundary/error-fallbacks/any-error-fallback.tsx @@ -6,7 +6,7 @@ import { ErrorDetail } from '../error-basic/error-detail'; import type { FallbackProps } from '../error-basic/fallback-creator'; /** - * TODO: Support reload and retry two reset actions in page error and area error. + * TODO(@eyhn): Support reload and retry two reset actions in page error and area error. */ export const AnyErrorFallback: FC = props => { const { error } = props; diff --git a/packages/frontend/core/src/components/affine/affine-error-boundary/index.tsx b/packages/frontend/core/src/components/affine/affine-error-boundary/index.tsx index f350c3d0295a7..78979e56c468f 100644 --- a/packages/frontend/core/src/components/affine/affine-error-boundary/index.tsx +++ b/packages/frontend/core/src/components/affine/affine-error-boundary/index.tsx @@ -11,7 +11,7 @@ export interface AffineErrorBoundaryProps extends PropsWithChildren { } /** - * TODO: Unify with SWRErrorBoundary + * TODO(@eyhn): Unify with SWRErrorBoundary */ export const AffineErrorBoundary: FC = props => { const fallbackRender: FallbackRender = useCallback( diff --git a/packages/frontend/core/src/components/affine/ai-onboarding/slider.tsx b/packages/frontend/core/src/components/affine/ai-onboarding/slider.tsx index 15fe40b10b885..b5499b7dfd265 100644 --- a/packages/frontend/core/src/components/affine/ai-onboarding/slider.tsx +++ b/packages/frontend/core/src/components/affine/ai-onboarding/slider.tsx @@ -18,7 +18,7 @@ export interface SliderProps extends HTMLAttributes { } /** - * TODO: extract to @affine/ui + * TODO(@catsjuice): extract to @affine/ui * @returns */ export const Slider = ({ diff --git a/packages/frontend/core/src/components/affine/auth/oauth.tsx b/packages/frontend/core/src/components/affine/auth/oauth.tsx index a133920c2edee..596b9954c674f 100644 --- a/packages/frontend/core/src/components/affine/auth/oauth.tsx +++ b/packages/frontend/core/src/components/affine/auth/oauth.tsx @@ -25,7 +25,7 @@ const OAuthProviderMap: Record< }, [OAuthProviderType.OIDC]: { - // TODO: Add OIDC icon + // TODO(@catsjuice): Add OIDC icon icon: , }, }; diff --git a/packages/frontend/core/src/components/affine/auth/send-email.tsx b/packages/frontend/core/src/components/affine/auth/send-email.tsx index 66a9ff3f9e9b4..01cfb3d41eef8 100644 --- a/packages/frontend/core/src/components/affine/auth/send-email.tsx +++ b/packages/frontend/core/src/components/affine/auth/send-email.tsx @@ -114,7 +114,7 @@ const useSendEmail = (emailType: AuthPanelProps['emailType']) => { callbackUrl = 'verify-email'; break; } - // TODO: add error handler + // TODO(@eyhn): add error handler return trigger({ email, callbackUrl: `/auth/${callbackUrl}?isClient=${ @@ -152,7 +152,7 @@ export const SendEmail = ({ const { loading, sendEmail } = useSendEmail(emailType); const onSendEmail = useAsyncCallback(async () => { - // TODO: add error handler + // TODO(@eyhn): add error handler await sendEmail(email); notify.success({ title: hint }); @@ -164,7 +164,7 @@ export const SendEmail = ({ }, [setAuthState]); if (!passwordLimits) { - // TODO: loading & error UI + // TODO(@eyhn): loading & error UI return null; } diff --git a/packages/frontend/core/src/components/affine/auth/sign-in-with-password.tsx b/packages/frontend/core/src/components/affine/auth/sign-in-with-password.tsx index 085fb26fbd75d..a0877c6d6de9e 100644 --- a/packages/frontend/core/src/components/affine/auth/sign-in-with-password.tsx +++ b/packages/frontend/core/src/components/affine/auth/sign-in-with-password.tsx @@ -62,7 +62,7 @@ export const SignInWithPassword: FC = ({ notify.error({ title: 'Failed to send email, please try again.', }); - // TODO: handle error better + // TODO(@eyhn): handle error better } setSendingEmail(false); }, [sendingEmail, verifyToken, authService, email, challenge, setAuthState]); diff --git a/packages/frontend/core/src/components/affine/auth/sign-in.tsx b/packages/frontend/core/src/components/affine/auth/sign-in.tsx index 967a8d859e888..ee448d764031c 100644 --- a/packages/frontend/core/src/components/affine/auth/sign-in.tsx +++ b/packages/frontend/core/src/components/affine/auth/sign-in.tsx @@ -98,7 +98,7 @@ export const SignIn: FC = ({ } catch (err) { console.error(err); - // TODO: better error handling + // TODO(@eyhn): better error handling notify.error({ title: 'Failed to send email. Please try again.', }); diff --git a/packages/frontend/core/src/components/affine/awareness/index.tsx b/packages/frontend/core/src/components/affine/awareness/index.tsx index 5c7be65dc46dc..653a852182c5d 100644 --- a/packages/frontend/core/src/components/affine/awareness/index.tsx +++ b/packages/frontend/core/src/components/affine/awareness/index.tsx @@ -14,7 +14,7 @@ const SyncAwarenessInnerLoggedIn = () => { 'user', { name: account.label, - // todo: add avatar? + // TODO(@eyhn): add avatar? } ); @@ -42,7 +42,7 @@ const SyncAwarenessInner = () => { return null; }; -// todo: we could do something more interesting here, e.g., show where the current user is +// TODO(@eyhn): we could do something more interesting here, e.g., show where the current user is export const SyncAwareness = () => { return ( diff --git a/packages/frontend/core/src/components/affine/create-workspace-modal/index.tsx b/packages/frontend/core/src/components/affine/create-workspace-modal/index.tsx index 7da01a40d2b77..7d64291517be6 100644 --- a/packages/frontend/core/src/components/affine/create-workspace-modal/index.tsx +++ b/packages/frontend/core/src/components/affine/create-workspace-modal/index.tsx @@ -101,7 +101,7 @@ const NameWorkspaceContent = ({ }, [handleCreateWorkspace, workspaceName] ); - // TODO: Support uploading avatars. + // Currently, when we create a new workspace and upload an avatar at the same time, // an error occurs after the creation is successful: get blob 404 not found return ( @@ -186,7 +186,7 @@ export const CreateWorkspaceModal = ({ const workspacesService = useService(WorkspacesService); const [loading, setLoading] = useState(false); - // todo: maybe refactor using xstate? + // TODO(@Peng): maybe refactor using xstate? useLayoutEffect(() => { let canceled = false; // if mode changed, reset step diff --git a/packages/frontend/core/src/components/affine/onboarding/articles/blocks.css.ts b/packages/frontend/core/src/components/affine/onboarding/articles/blocks.css.ts index ca2114aae22a0..7498fbbe3ce2c 100644 --- a/packages/frontend/core/src/components/affine/onboarding/articles/blocks.css.ts +++ b/packages/frontend/core/src/components/affine/onboarding/articles/blocks.css.ts @@ -21,7 +21,7 @@ globalStyle(`${block} p`, { lineHeight: '23px', }); globalStyle(`${block} b`, { - // TODO: 500's effect not matching the design, use 600 for now + // TODO(@catsjuice): 500's effect not matching the design, use 600 for now fontWeight: '600', }); globalStyle(`${block} ol`, { diff --git a/packages/frontend/core/src/components/affine/onboarding/articles/index.tsx b/packages/frontend/core/src/components/affine/onboarding/articles/index.tsx index 7fae430bd36b3..9b84647e7e085 100644 --- a/packages/frontend/core/src/components/affine/onboarding/articles/index.tsx +++ b/packages/frontend/core/src/components/affine/onboarding/articles/index.tsx @@ -1,6 +1,6 @@ import { article, articleWrapper, text, title } from '../curve-paper/paper.css'; import type { ArticleId, ArticleOption, EdgelessSwitchState } from '../types'; -// TODO: lazy load +// TODO(@catsjuice): lazy load import { article0 } from './article-0'; import { article1 } from './article-1'; import { article2 } from './article-2'; diff --git a/packages/frontend/core/src/components/affine/onboarding/steps/edgeless-switch.tsx b/packages/frontend/core/src/components/affine/onboarding/steps/edgeless-switch.tsx index 1684960dad6f1..1d8acd36b1ea3 100644 --- a/packages/frontend/core/src/components/affine/onboarding/steps/edgeless-switch.tsx +++ b/packages/frontend/core/src/components/affine/onboarding/steps/edgeless-switch.tsx @@ -113,7 +113,7 @@ export const EdgelessSwitch = ({ turnOffScalingRef.current?.(); }; - // TODO: mobile support + // TODO(@catsjuice): mobile support const onMouseDown = (e: MouseEvent) => { const target = e.target as HTMLElement; if (target.closest('[data-no-drag]')) return; diff --git a/packages/frontend/core/src/components/affine/page-history-modal/data.ts b/packages/frontend/core/src/components/affine/page-history-modal/data.ts index b971cf780e3f6..2df0f71c4181b 100644 --- a/packages/frontend/core/src/components/affine/page-history-modal/data.ts +++ b/packages/frontend/core/src/components/affine/page-history-modal/data.ts @@ -94,7 +94,7 @@ const snapshotFetcher = async ( // attach the Page shown in the modal to a temporary workspace // so that we do not need to worry about providers etc -// todo: fix references to the page (the referenced page will shown as deleted) +// TODO(@Peng): fix references to the page (the referenced page will shown as deleted) // if we simply clone the current workspace, it maybe time consuming right? const docCollectionMap = new Map(); diff --git a/packages/frontend/core/src/components/affine/page-history-modal/history-modal.tsx b/packages/frontend/core/src/components/affine/page-history-modal/history-modal.tsx index d4b0a28b1bf7c..e8fad15adbfa1 100644 --- a/packages/frontend/core/src/components/affine/page-history-modal/history-modal.tsx +++ b/packages/frontend/core/src/components/affine/page-history-modal/history-modal.tsx @@ -247,7 +247,7 @@ const PlanPrompt = () => { : t[ 'com.affine.history.confirm-restore-modal.plan-prompt.title' ]() - : '' /* TODO: loading UI */ + : '' /* TODO(@catsjuice): loading UI */ } - {/* todo: add click handler to backlinks */} + {/* TODO(@Peng): add click handler to backlinks */}
{backlinks.length > 0 ? ( diff --git a/packages/frontend/core/src/components/affine/setting-modal/account-setting/ai-usage-panel.tsx b/packages/frontend/core/src/components/affine/setting-modal/account-setting/ai-usage-panel.tsx index 74a2e4b46cbb4..325aa4217a5cc 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/account-setting/ai-usage-panel.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/account-setting/ai-usage-panel.tsx @@ -63,7 +63,7 @@ export const AIUsagePanel = () => { desc={''} spreadCol={false} > - {/* TODO: i18n */} + {/* TODO(@catsjuice): i18n */} Load error ); diff --git a/packages/frontend/core/src/components/affine/setting-modal/account-setting/index.tsx b/packages/frontend/core/src/components/affine/setting-modal/account-setting/index.tsx index 34b2364ac210d..eabc66e450530 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/account-setting/index.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/account-setting/index.tsx @@ -44,7 +44,7 @@ export const UserAvatar = () => { await session.uploadAvatar(file); notify.success({ title: 'Update user avatar success' }); } catch (e) { - // TODO: i18n + // TODO(@catsjuice): i18n notify.error({ title: 'Update user avatar failed', message: String(e), diff --git a/packages/frontend/core/src/components/affine/setting-modal/account-setting/storage-progress.tsx b/packages/frontend/core/src/components/affine/setting-modal/account-setting/storage-progress.tsx index ea5be4b0f72fb..c365dd6b8f6e9 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/account-setting/storage-progress.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/account-setting/storage-progress.tsx @@ -63,10 +63,9 @@ export const StorageProgress = ({ onUpgrade }: StorageProgressProgress) => { if (loading) { if (loadError) { - // TODO: i18n + // TODO(@catsjuice): i18n return Load error; } - // TODO: loading UI return ; } diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/billing/index.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/billing/index.tsx index 5612e04d59b93..eaa34637a8eef 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/billing/index.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/billing/index.tsx @@ -349,7 +349,6 @@ const PlanAction = ({ }; const PaymentMethodUpdater = () => { - // TODO: open stripe customer portal const { isMutating, trigger } = useMutation({ mutation: createCustomerPortalMutation, }); @@ -475,7 +474,6 @@ const InvoiceLine = ({ $, cny => ¥ desc={`${ invoice.status === InvoiceStatus.Paid ? t['com.affine.payment.billing-setting.paid']() diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/experimental-features/index.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/experimental-features/index.tsx index 361cf1c36503e..3f5b7f83d29b0 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/experimental-features/index.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/experimental-features/index.tsx @@ -181,7 +181,7 @@ const ExperimentalFeaturesMain = () => { ); }; -// todo: save to workspace meta instead? +// TODO(@Peng): save to workspace meta instead? const experimentalFeaturesDisclaimerAtom = atomWithStorage( 'affine:experimental-features-disclaimer', false diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/ai/actions/subscribe.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/ai/actions/subscribe.tsx index 9e6dd547c8d26..fc0cbab5597ec 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/ai/actions/subscribe.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/ai/actions/subscribe.tsx @@ -63,7 +63,7 @@ export const AISubscribe = ({ ...btnProps }: AISubscribeProps) => { }, [idempotencyKey, subscriptionService]); if (!price || !price.yearlyAmount) { - // TODO: loading UI + // TODO(@catsjuice): loading UI return null; } diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/ai/benefits.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/ai/benefits.tsx index 23ea3a3948de9..a866afa9bd269 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/ai/benefits.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/ai/benefits.tsx @@ -41,7 +41,7 @@ const benefitsGetter = (t: ReturnType) => [ export const AIBenefits = () => { const t = useI18n(); const benefits = useMemo(() => benefitsGetter(t), [t]); - // TODO: responsive + // TODO(@catsjuice): responsive return (
{benefits.map(({ name, icon, items }) => { diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/cloud-plans.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/cloud-plans.tsx index b07e7a93001db..345183c66cc08 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/cloud-plans.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/cloud-plans.tsx @@ -1,5 +1,3 @@ -// TODO: we don't handle i18n for now -// it's better to manage all equity at server side import { SubscriptionPlan, SubscriptionRecurring } from '@affine/graphql'; import type { useI18n } from '@affine/i18n'; import { AfFiNeIcon } from '@blocksuite/icons/rc'; diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/layout.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/layout.tsx index 5d4999737fe0a..ef4bedb830ea4 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/layout.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/layout.tsx @@ -105,7 +105,7 @@ export const PlanLayout = ({ cloud, ai, aiTip }: PlanLayoutProps) => { } }, [aiTip, settingModalScrollContainer]); - // TODO: Need a better solution to handle this situation + // TODO(@catsjuice): Need a better solution to handle this situation useLayoutEffect(() => { if (!scrollAnchor) return; setTimeout(() => { @@ -135,7 +135,7 @@ export const PlanLayout = ({ cloud, ai, aiTip }: PlanLayoutProps) => { return (
- {/* TODO: SettingHeader component shouldn't have margin itself */} + {/* TODO(@catsjuice): SettingHeader component shouldn't have margin itself */} ( - // TODO: height should be `32px` by design + // TODO(@catsjuice): height should be `32px` by design // but the RadioGroup component is not matching with the design currently // set to `24px` for now to avoid blinking diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/style.css.ts b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/style.css.ts index bf0b03daca299..73676f0e1ebd1 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/style.css.ts +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/style.css.ts @@ -84,7 +84,7 @@ export const planCardBorderMock = style({ bottom: 0, borderRadius: 'inherit', border: `2px solid transparent`, - // TODO: brandColor with opacity, dark mode compatibility needed + // TODO(@catsjuice): brandColor with opacity, dark mode compatibility needed background: `linear-gradient(180deg, ${cssVar('brandColor')}, #1E96EB33) border-box`, ['WebkitMask']: `linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0)`, [`WebkitMaskComposite`]: `destination-out`, diff --git a/packages/frontend/core/src/components/affine/setting-modal/setting-sidebar/index.tsx b/packages/frontend/core/src/components/affine/setting-modal/setting-sidebar/index.tsx index 2ec46178bfbfe..6cfcdf40994eb 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/setting-sidebar/index.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/setting-sidebar/index.tsx @@ -38,7 +38,7 @@ export type UserInfoProps = { export const UserInfo = ({ onAccountSettingClick, active }: UserInfoProps) => { const account = useLiveData(useService(AuthService).session.account$); if (!account) { - // TODO: loading ui + // TODO(@eyhn): loading ui return; } return ( diff --git a/packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/delete-leave-workspace/index.tsx b/packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/delete-leave-workspace/index.tsx index e491c8f2e8c92..4ca9785218bcc 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/delete-leave-workspace/index.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/delete-leave-workspace/index.tsx @@ -70,7 +70,7 @@ export const DeleteLeaveWorkspace = () => { const backWorkspace = workspaceList.find( ws => ws.id !== currentWorkspaceId ); - // TODO: if there is no workspace, jump to a new page(wait for design) + // TODO(@eyhn): if there is no workspace, jump to a new page(wait for design) if (backWorkspace) { jumpToSubPath( backWorkspace?.id || '', diff --git a/packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/labels.tsx b/packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/labels.tsx index 8a0a29ddddfc8..5cb6fdc3e807e 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/labels.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/labels.tsx @@ -81,7 +81,7 @@ export const LabelsPanel = () => { condition: workspace.flavour === 'affine-cloud', label: 'syncCloud', }, - //TODO: add these labels + //TODO(@JimmFly): add these labels // { status==="synced", label: 'availableOffline' } // { workspace.flavour === 'affine-Docker', label: 'syncDocker' } // { workspace.flavour === 'self-hosted', label: 'selfHosted' } diff --git a/packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/members.tsx b/packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/members.tsx index 9024e8f131b9e..8633bed6d80ff 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/members.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/workspace-setting/new-workspace-setting-detail/members.tsx @@ -197,7 +197,7 @@ export const CloudWorkspaceMembersPanel = () => { }, [handleUpgradeConfirm, hasPaymentFeature, t, workspaceQuota]); if (workspaceQuota === null) { - // TODO: loading ui + // TODO(@eyhn): loading ui return null; } diff --git a/packages/frontend/core/src/components/affine/share-page-modal/share-menu/index.css.ts b/packages/frontend/core/src/components/affine/share-page-modal/share-menu/index.css.ts index f20c82970686e..459676cf5cdf9 100644 --- a/packages/frontend/core/src/components/affine/share-page-modal/share-menu/index.css.ts +++ b/packages/frontend/core/src/components/affine/share-page-modal/share-menu/index.css.ts @@ -29,7 +29,7 @@ export const descriptionStyle = style({ }); export const buttonStyle = style({ marginTop: '18px', - // todo: new color scheme should be used + // todo(@JimmFly): new color scheme should be used }); export const actionsStyle = style({ display: 'flex', diff --git a/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-page.tsx b/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-page.tsx index daec1d676c20e..f3f01598350d4 100644 --- a/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-page.tsx +++ b/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-page.tsx @@ -211,7 +211,7 @@ export const AffineSharePage = (props: ShareMenuProps) => { ); if (isLoading) { - // TODO: loading and error UI + // TODO(@eyhn): loading and error UI return ( <> @@ -341,7 +341,7 @@ export const SharePage = (props: ShareMenuProps) => { props.workspaceMetadata.flavour === WorkspaceFlavour.AFFINE_CLOUD ) { return ( - // TODO: refactor this part + // TODO(@eyhn): refactor this part diff --git a/packages/frontend/core/src/components/app-sidebar/app-download-button/index.tsx b/packages/frontend/core/src/components/app-sidebar/app-download-button/index.tsx index 6dea93b44e48b..d595ecfbd8f40 100644 --- a/packages/frontend/core/src/components/app-sidebar/app-download-button/index.tsx +++ b/packages/frontend/core/src/components/app-sidebar/app-download-button/index.tsx @@ -19,7 +19,7 @@ export function AppDownloadButton({ setShow(false); }, []); - // TODO: unify this type of literal value. + // TODO(@JimmFly): unify this type of literal value. const handleClick = useCallback(() => { mixpanel.track('Button', { resolve: 'GoToDownloadAppPage', diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/event-source.ts b/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/event-source.ts index 18cf89db40e37..34dadcfafbd5d 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/event-source.ts +++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/event-source.ts @@ -16,7 +16,7 @@ type toTextStreamOptions = { signal?: AbortSignal; }; -// todo: may need to extend the error type +// todo(@Peng): may need to extend the error type const safeParseError = (data: string): { status: number } => { try { return JSON.parse(data); diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/prompt.ts b/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/prompt.ts index 493767f4e6548..7b7a4a2a6f933 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/prompt.ts +++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/prompt.ts @@ -1,5 +1,5 @@ // manually synced with packages/backend/server/src/data/migrations/utils/prompts.ts -// todo: automate this +// TODO(@Peng): automate this export const promptKeys = [ 'debug:chat:gpt4', 'debug:action:gpt4', diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/journal-doc-title.tsx b/packages/frontend/core/src/components/blocksuite/block-suite-editor/journal-doc-title.tsx index 834ac58138fb6..001e2358ca62b 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/journal-doc-title.tsx +++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/journal-doc-title.tsx @@ -9,7 +9,7 @@ export const BlocksuiteEditorJournalDocTitle = ({ page }: { page: Doc }) => { useJournalInfoHelper(page.collection, page.id); const t = useI18n(); - // TODO: i18n + // TODO(catsjuice): i18n const day = journalDate?.format('dddd') ?? null; return ( diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/no-page-error.ts b/packages/frontend/core/src/components/blocksuite/block-suite-editor/no-page-error.ts index b70603ec3f440..326c4211254fa 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/no-page-error.ts +++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/no-page-error.ts @@ -2,7 +2,7 @@ import type { Doc } from '@blocksuite/store'; import type { Map as YMap } from 'yjs'; /** - * TODO: Define error to unexpected state together in the future. + * TODO(@eyhn): Define error to unexpected state together in the future. */ export class NoPageRootError extends Error { constructor(public page: Doc) { diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-header/menu/index.tsx b/packages/frontend/core/src/components/blocksuite/block-suite-header/menu/index.tsx index 29b9ed2a0d624..4c5aa28cda89a 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-header/menu/index.tsx +++ b/packages/frontend/core/src/components/blocksuite/block-suite-header/menu/index.tsx @@ -223,7 +223,7 @@ export const PageHeaderMenuButton = ({ ? t['com.affine.favoritePageOperation.remove']() : t['com.affine.favoritePageOperation.add']()} - {/* {TODO: add tag function support} */} + {/* {TODO(@Peng): add tag function support} */} {/* } data-testid="editor-option-menu-add-tag" diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-header/present/use-present.ts b/packages/frontend/core/src/components/blocksuite/block-suite-header/present/use-present.ts index a7b498f552e89..a6614212e443e 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-header/present/use-present.ts +++ b/packages/frontend/core/src/components/blocksuite/block-suite-header/present/use-present.ts @@ -12,7 +12,7 @@ export const usePresent = () => { const editorHost = editor?.host; if (!editorHost) return; - // TODO: use surfaceService subAtom + // TODO(@catsjuice): use surfaceService subAtom const enterOrLeavePresentationMode = () => { const edgelessRootService = editorHost.spec.getService( 'affine:page' diff --git a/packages/frontend/core/src/components/cloud/share-header-right-item/index.tsx b/packages/frontend/core/src/components/cloud/share-header-right-item/index.tsx index f67cf0660ff1c..6d3324105cd5f 100644 --- a/packages/frontend/core/src/components/cloud/share-header-right-item/index.tsx +++ b/packages/frontend/core/src/components/cloud/share-header-right-item/index.tsx @@ -18,7 +18,7 @@ const ShareHeaderRightItem = ({ ...props }: ShareHeaderRightItemProps) => { const { publishMode } = props; const [isMember, setIsMember] = useState(false); - // TODO: Add TOC + // TODO(@JimmFly): Add TOC return (
{loginStatus === 'authenticated' ? ( diff --git a/packages/frontend/core/src/components/cloud/share-header-right-item/user-avatar.tsx b/packages/frontend/core/src/components/cloud/share-header-right-item/user-avatar.tsx index 30be16633dc78..d6399694cfd9b 100644 --- a/packages/frontend/core/src/components/cloud/share-header-right-item/user-avatar.tsx +++ b/packages/frontend/core/src/components/cloud/share-header-right-item/user-avatar.tsx @@ -24,7 +24,7 @@ const UserInfo = () => { const plan = useLiveData(subscription.pro$)?.plan; if (!user) { - // TODO: loading UI + // TODO(@eyhn): loading UI return null; } return ( diff --git a/packages/frontend/core/src/components/page-list/collections/collection-list-item.css.ts b/packages/frontend/core/src/components/page-list/collections/collection-list-item.css.ts index 8d1a821466b3d..51bfc2ae5d603 100644 --- a/packages/frontend/core/src/components/page-list/collections/collection-list-item.css.ts +++ b/packages/frontend/core/src/components/page-list/collections/collection-list-item.css.ts @@ -66,7 +66,7 @@ globalStyle(`[data-draggable=true][data-dragging=true] ${dndCell}:before`, { opacity: 1, }); -// todo: remove global style +// TODO(@JimmFly): remove global style globalStyle(`${root} > :first-child`, { paddingLeft: '16px', }); diff --git a/packages/frontend/core/src/components/page-list/collections/collection-list-item.tsx b/packages/frontend/core/src/components/page-list/collections/collection-list-item.tsx index 164ae39008cdc..871b22d3716da 100644 --- a/packages/frontend/core/src/components/page-list/collections/collection-list-item.tsx +++ b/packages/frontend/core/src/components/page-list/collections/collection-list-item.tsx @@ -109,7 +109,7 @@ export const CollectionListItem = (props: CollectionListItemProps) => { props.title, ]); - // TODO: use getDropItemId + // TODO(@JimmFly): use getDropItemId const { setNodeRef, attributes, listeners, isDragging } = useDraggable({ id: getDNDId('collection-list', 'collection', props.collectionId), data: { diff --git a/packages/frontend/core/src/components/page-list/docs/page-list-item.css.ts b/packages/frontend/core/src/components/page-list/docs/page-list-item.css.ts index 1560cbfd245c4..b097b481b19bf 100644 --- a/packages/frontend/core/src/components/page-list/docs/page-list-item.css.ts +++ b/packages/frontend/core/src/components/page-list/docs/page-list-item.css.ts @@ -66,7 +66,7 @@ globalStyle(`[data-draggable=true][data-dragging=true] ${dndCell}:before`, { opacity: 1, }); -// todo: remove global style +// TODO(@JimmFly): remove global style globalStyle(`${root} > :first-child`, { paddingLeft: '16px', }); diff --git a/packages/frontend/core/src/components/page-list/docs/page-list-item.tsx b/packages/frontend/core/src/components/page-list/docs/page-list-item.tsx index 3f962d0cfe603..4460ccf4542d8 100644 --- a/packages/frontend/core/src/components/page-list/docs/page-list-item.tsx +++ b/packages/frontend/core/src/components/page-list/docs/page-list-item.tsx @@ -167,7 +167,7 @@ export const PageListItem = (props: PageListItemProps) => { props.title, ]); - // TODO: use getDropItemId + // TODO(@JimmFly): use getDropItemId const { setNodeRef, attributes, listeners, isDragging } = useDraggable({ id: getDNDId('doc-list', 'doc', props.pageId), data: { diff --git a/packages/frontend/core/src/components/page-list/group-definitions.tsx b/packages/frontend/core/src/components/page-list/group-definitions.tsx index 5bd9d3b82204b..520cb12af8cad 100644 --- a/packages/frontend/core/src/components/page-list/group-definitions.tsx +++ b/packages/frontend/core/src/components/page-list/group-definitions.tsx @@ -35,7 +35,7 @@ const GroupLabel = ({
); -// todo: optimize date matchers +// TODO(@JimmFly): optimize date matchers export const useDateGroupDefinitions = ( key: DateKey ): ItemGroupDefinition[] => { @@ -223,7 +223,7 @@ export const usePageItemGroupDefinitions = () => { none: undefined, // add more here later - // todo: some page group definitions maybe dynamic + // todo(@JimmFly): some page group definitions maybe dynamic }; return itemGroupDefinitions[workspaceProperties.groupBy]; }, [ diff --git a/packages/frontend/core/src/components/page-list/list.tsx b/packages/frontend/core/src/components/page-list/list.tsx index 763167880482d..84bac8f6d680e 100644 --- a/packages/frontend/core/src/components/page-list/list.tsx +++ b/packages/frontend/core/src/components/page-list/list.tsx @@ -43,7 +43,7 @@ export const List = forwardRef>( ); // when pressing ESC or double clicking outside of the page list, close the selection mode -// todo: use jotai-effect instead but it seems it does not work with jotai-scope? +// TODO(@Peng): use jotai-effect instead but it seems it does not work with jotai-scope? const useItemSelectionStateEffect = () => { const [selectionState, setSelectionActive] = useAtom(selectionStateAtom); useEffect(() => { diff --git a/packages/frontend/core/src/components/page-list/page-group.tsx b/packages/frontend/core/src/components/page-list/page-group.tsx index d525d8ff336b8..60901ad493ee7 100644 --- a/packages/frontend/core/src/components/page-list/page-group.tsx +++ b/packages/frontend/core/src/components/page-list/page-group.tsx @@ -194,7 +194,7 @@ export const ItemGroup = ({ ); }; -// todo: optimize how to render page meta list item +// TODO(@Peng): optimize how to render page meta list item const requiredPropNames = [ 'docCollection', 'rowAsLink', diff --git a/packages/frontend/core/src/components/page-list/tags/tag-list-item.css.ts b/packages/frontend/core/src/components/page-list/tags/tag-list-item.css.ts index 0d14a04fc8d06..db5beb0fe9335 100644 --- a/packages/frontend/core/src/components/page-list/tags/tag-list-item.css.ts +++ b/packages/frontend/core/src/components/page-list/tags/tag-list-item.css.ts @@ -65,7 +65,7 @@ globalStyle(`[data-draggable=true][data-dragging=true] ${dndCell}:before`, { opacity: 1, }); -// todo: remove global style +// TODO(@JimmFly): remove global style globalStyle(`${root} > :first-child`, { paddingLeft: '16px', }); diff --git a/packages/frontend/core/src/components/page-list/tags/tag-list-item.tsx b/packages/frontend/core/src/components/page-list/tags/tag-list-item.tsx index 3bb6289c2af60..6ebbd22c6d4ae 100644 --- a/packages/frontend/core/src/components/page-list/tags/tag-list-item.tsx +++ b/packages/frontend/core/src/components/page-list/tags/tag-list-item.tsx @@ -98,7 +98,7 @@ export const TagListItem = (props: TagListItemProps) => { ); }, [props.color, props.onSelectedChange, props.selectable, props.selected]); - // TODO: use getDropItemId + // TODO(@JimmFly): use getDropItemId const { setNodeRef, attributes, listeners, isDragging } = useDraggable({ id: getDNDId('tag-list', 'tag', props.tagId), data: { diff --git a/packages/frontend/core/src/components/page-list/types.ts b/packages/frontend/core/src/components/page-list/types.ts index 8f036a5cc8bbc..46e079c571218 100644 --- a/packages/frontend/core/src/components/page-list/types.ts +++ b/packages/frontend/core/src/components/page-list/types.ts @@ -19,7 +19,7 @@ export type TagMeta = { createDate?: Date | number; updatedDate?: Date | number; }; -// TODO: consider reducing the number of props here +// TODO(@JimmFly): consider reducing the number of props here // using type instead of interface to make it Record compatible export type PageListItemProps = { pageId: string; @@ -73,10 +73,10 @@ export type TagListItemProps = { export interface ItemListHeaderProps {} -// todo: a temporary solution. may need to be refactored later -export type ItemGroupByType = 'createDate' | 'updatedDate'; // todo: can add more later +// TODO(@JimmFly): a temporary solution. may need to be refactored later +export type ItemGroupByType = 'createDate' | 'updatedDate'; // TODO(@JimmFly): can add more later -// todo: a temporary solution. may need to be refactored later +// TODO(@JimmFly): a temporary solution. may need to be refactored later export interface SortBy { key: 'createDate' | 'updatedDate'; order: 'asc' | 'desc'; diff --git a/packages/frontend/core/src/components/page-list/use-filtered-page-metas.tsx b/packages/frontend/core/src/components/page-list/use-filtered-page-metas.tsx index 1988c143b908e..d1665950bfb71 100644 --- a/packages/frontend/core/src/components/page-list/use-filtered-page-metas.tsx +++ b/packages/frontend/core/src/components/page-list/use-filtered-page-metas.tsx @@ -32,7 +32,7 @@ export const useFilteredPageMetas = ( ); useEffect(() => { - // TODO: loading & error UI + // TODO(@eyhn): loading & error UI shareDocsService.shareDocs?.revalidate(); }, [shareDocsService]); diff --git a/packages/frontend/core/src/components/page-list/virtualized-list.tsx b/packages/frontend/core/src/components/page-list/virtualized-list.tsx index 3823f6e3833e2..f8733427ba0a5 100644 --- a/packages/frontend/core/src/components/page-list/virtualized-list.tsx +++ b/packages/frontend/core/src/components/page-list/virtualized-list.tsx @@ -206,7 +206,7 @@ const ListInner = ({ totalCount={virtuosoItems.length} itemContent={itemContentRenderer} className={clsx(props.className, styles.root)} - // todo: set a reasonable overscan value to avoid blank space? + // TODO(@Peng): set a reasonable overscan value to avoid blank space? // overscan={100} /> ); diff --git a/packages/frontend/core/src/components/pure/workspace-slider-bar/workspace-card/index.tsx b/packages/frontend/core/src/components/pure/workspace-slider-bar/workspace-card/index.tsx index 14c6f2ec6a956..c7d77caffc107 100644 --- a/packages/frontend/core/src/components/pure/workspace-slider-bar/workspace-card/index.tsx +++ b/packages/frontend/core/src/components/pure/workspace-slider-bar/workspace-card/index.tsx @@ -135,7 +135,7 @@ const useSyncEngineSyncProgress = () => { }, [currentWorkspace, isOwner, jumpToPricePlan, t]); const content = useMemo(() => { - // TODO: add i18n + // TODO(@eyhn): add i18n if (currentWorkspace.flavour === WorkspaceFlavour.LOCAL) { if (!environment.isDesktop) { return 'This is a local demo workspace.'; diff --git a/packages/frontend/core/src/components/root-app-sidebar/index.css.ts b/packages/frontend/core/src/components/root-app-sidebar/index.css.ts index 65e50147008e4..2c2281e0f726a 100644 --- a/packages/frontend/core/src/components/root-app-sidebar/index.css.ts +++ b/packages/frontend/core/src/components/root-app-sidebar/index.css.ts @@ -22,7 +22,7 @@ export const userInfoWrapper = style({ padding: '4px 0', }); -// TODO: +// TODO(@catsjuice): globalStyle(`button.${userInfoWrapper} > span`, { lineHeight: 0, }); diff --git a/packages/frontend/core/src/components/workspace-upgrade/upgrade-icon.tsx b/packages/frontend/core/src/components/workspace-upgrade/upgrade-icon.tsx index 5470b12c6c945..e604d098e8f5f 100644 --- a/packages/frontend/core/src/components/workspace-upgrade/upgrade-icon.tsx +++ b/packages/frontend/core/src/components/workspace-upgrade/upgrade-icon.tsx @@ -1,7 +1,7 @@ import type React from 'react'; /** - * TODO: Define a place to manage all icons and svg images. + * TODO(@eyhn): move to icons package */ export const ArrowCircleIcon = (props: React.SVGProps) => { return ( diff --git a/packages/frontend/core/src/components/workspace-upgrade/upgrade.tsx b/packages/frontend/core/src/components/workspace-upgrade/upgrade.tsx index 73dc15d13f388..684ec2660c4df 100644 --- a/packages/frontend/core/src/components/workspace-upgrade/upgrade.tsx +++ b/packages/frontend/core/src/components/workspace-upgrade/upgrade.tsx @@ -1,5 +1,5 @@ import { Button } from '@affine/component/ui/button'; -import { AffineShapeIcon } from '@affine/core/components/page-list'; // TODO: import from page-list temporarily, need to defined common svg icon/images management. +import { AffineShapeIcon } from '@affine/core/components/page-list'; // TODO(@eyhn): import from page-list temporarily, need to defined common svg icon/images management. import { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks'; import { useNavigateHelper } from '@affine/core/hooks/use-navigate-helper'; import { WorkspaceSubPath } from '@affine/core/shared'; @@ -12,7 +12,7 @@ import * as styles from './upgrade.css'; import { ArrowCircleIcon, HeartBreakIcon } from './upgrade-icon'; /** - * TODO: Help info is not implemented yet. + * TODO(@eyhn): Help info is not implemented yet. */ export const WorkspaceUpgrade = function WorkspaceUpgrade() { const [error, setError] = useState(null); diff --git a/packages/frontend/core/src/components/workspace/index.css.ts b/packages/frontend/core/src/components/workspace/index.css.ts index 62dea249860ea..05c2e9ce3a88e 100644 --- a/packages/frontend/core/src/components/workspace/index.css.ts +++ b/packages/frontend/core/src/components/workspace/index.css.ts @@ -22,7 +22,7 @@ export const appStyle = style({ opacity: `var(--affine-noise-opacity, 0)`, backgroundRepeat: 'repeat', backgroundSize: '50px', - // todo: figure out how to use vanilla-extract webpack plugin to inject img url + // TODO(@Peng): figure out how to use vanilla-extract webpack plugin to inject img url backgroundImage: `var(--noise-background)`, }, }, @@ -57,8 +57,8 @@ export const mainContainerStyle = style({ borderRadius: 6, margin: '8px', overflow: 'hidden', - // todo: is this performance intensive? - // TODO: not match with design's shadow, theme missing + // TODO(@Peng): is this performance intensive? + // TODO(@catsjuice): not match with design's shadow, theme missing filter: 'drop-shadow(0px 0px 4px rgba(66,65,73,.14))', '@media': { print: { diff --git a/packages/frontend/core/src/hooks/affine/use-all-page-list-config.tsx b/packages/frontend/core/src/hooks/affine/use-all-page-list-config.tsx index 3b64bf6458292..6455f61376513 100644 --- a/packages/frontend/core/src/hooks/affine/use-all-page-list-config.tsx +++ b/packages/frontend/core/src/hooks/affine/use-all-page-list-config.tsx @@ -18,7 +18,7 @@ export const useAllPageListConfig = () => { const shareDocs = useLiveData(shareDocService.shareDocs?.list$); useEffect(() => { - // TODO: loading & error UI + // TODO(@eyhn): loading & error UI shareDocService.shareDocs?.revalidate(); }, [shareDocService]); diff --git a/packages/frontend/core/src/hooks/affine/use-mutate-cloud.ts b/packages/frontend/core/src/hooks/affine/use-mutate-cloud.ts index 9eba16a725f68..7089e9df2e6cc 100644 --- a/packages/frontend/core/src/hooks/affine/use-mutate-cloud.ts +++ b/packages/frontend/core/src/hooks/affine/use-mutate-cloud.ts @@ -4,7 +4,7 @@ import { useSWRConfig } from 'swr'; export function useMutateCloud() { const { mutate } = useSWRConfig(); return useCallback(async () => { - // todo: should not mutate all graphql cache + // TODO(@eyhn): should not mutate all graphql cache return mutate(key => { if (Array.isArray(key)) { return key[0] === 'cloud'; diff --git a/packages/frontend/core/src/hooks/affine/use-register-blocksuite-editor-commands.tsx b/packages/frontend/core/src/hooks/affine/use-register-blocksuite-editor-commands.tsx index 9c8e3791550a9..aacc9bc8a3df9 100644 --- a/packages/frontend/core/src/hooks/affine/use-register-blocksuite-editor-commands.tsx +++ b/packages/frontend/core/src/hooks/affine/use-register-blocksuite-editor-commands.tsx @@ -69,7 +69,7 @@ export function useRegisterBlocksuiteEditorCommands() { const preconditionStrategy = () => PreconditionStrategy.InPaperOrEdgeless && !trash; - // TODO: add back when edgeless presentation is ready + // TODO(@Peng): add back when edgeless presentation is ready // this is pretty hack and easy to break. need a better way to communicate with blocksuite editor // unsubs.push( @@ -134,7 +134,7 @@ export function useRegisterBlocksuiteEditorCommands() { }) ); - // todo: should not show duplicate for journal + // TODO(@Peng): should not show duplicate for journal unsubs.push( registerAffineCommand({ id: `editor:${mode}-duplicate`, diff --git a/packages/frontend/core/src/hooks/use-affine-adapter.ts b/packages/frontend/core/src/hooks/use-affine-adapter.ts index 726dc8e34b29e..6b9d73c31d8cf 100644 --- a/packages/frontend/core/src/hooks/use-affine-adapter.ts +++ b/packages/frontend/core/src/hooks/use-affine-adapter.ts @@ -12,7 +12,7 @@ const useReactiveAdapter = (adapter: WorkspacePropertiesAdapter) => { // hack: delay proxy creation to avoid unnecessary re-render + render in another component issue const [proxy, setProxy] = useDebouncedState(adapter, 0); useEffect(() => { - // todo: track which properties are used and then filter by property path change + // TODO(@Peng): track which properties are used and then filter by property path change // using Y.YEvent.path function observe() { setProxy(getProxy(adapter)); diff --git a/packages/frontend/core/src/hooks/use-app-updater.ts b/packages/frontend/core/src/hooks/use-app-updater.ts index d99fe5b5595a7..011464115b90a 100644 --- a/packages/frontend/core/src/hooks/use-app-updater.ts +++ b/packages/frontend/core/src/hooks/use-app-updater.ts @@ -127,7 +127,7 @@ export const useAppUpdater = () => { if (updateReady) { setAppQuitting(true); apis?.updater.quitAndInstall().catch(err => { - // TODO: add error toast here + // TODO(@Peng): add error toast here console.error(err); }); } diff --git a/packages/frontend/core/src/hooks/use-navigate-helper.ts b/packages/frontend/core/src/hooks/use-navigate-helper.ts index 5228298b38711..d5c2156ca7f17 100644 --- a/packages/frontend/core/src/hooks/use-navigate-helper.ts +++ b/packages/frontend/core/src/hooks/use-navigate-helper.ts @@ -18,7 +18,7 @@ function defaultNavigate(to: To, option?: { replace?: boolean }) { }, 100); } -// todo: add a name -> path helper in the results +// TODO(@eyhn): add a name -> path helper in the results export function useNavigateHelper() { const navigate = useContext(NavigateContext) ?? defaultNavigate; diff --git a/packages/frontend/core/src/hooks/use-query.ts b/packages/frontend/core/src/hooks/use-query.ts index 2906f5a28edd5..ac39aa82f19a5 100644 --- a/packages/frontend/core/src/hooks/use-query.ts +++ b/packages/frontend/core/src/hooks/use-query.ts @@ -111,7 +111,7 @@ export function useQueryInfinite( const loadingMore = size > 0 && data && !data[size - 1]; - // todo: find a generic way to know whether or not there are more items to load + // TODO(@Peng): find a generic way to know whether or not there are more items to load const loadMore = useCallback(() => { if (loadingMore) { return; diff --git a/packages/frontend/core/src/modules/cmdk/entities/quick-search.ts b/packages/frontend/core/src/modules/cmdk/entities/quick-search.ts index de18569777424..17f92c3e9a105 100644 --- a/packages/frontend/core/src/modules/cmdk/entities/quick-search.ts +++ b/packages/frontend/core/src/modules/cmdk/entities/quick-search.ts @@ -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, diff --git a/packages/frontend/core/src/modules/cmdk/views/data-hooks.tsx b/packages/frontend/core/src/modules/cmdk/views/data-hooks.tsx index 9dfbad076ab54..2d94028cb69d1 100644 --- a/packages/frontend/core/src/modules/cmdk/views/data-hooks.tsx +++ b/packages/frontend/core/src/modules/cmdk/views/data-hooks.tsx @@ -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; diff --git a/packages/frontend/core/src/modules/cmdk/views/main.tsx b/packages/frontend/core/src/modules/cmdk/views/main.tsx index 9596bd06b8ee4..83153620cce75 100644 --- a/packages/frontend/core/src/modules/cmdk/views/main.tsx +++ b/packages/frontend/core/src/modules/cmdk/views/main.tsx @@ -200,7 +200,7 @@ export const CMDKContainer = ({ onValueChange={setValue} loop > - {/* todo: add page context here */} + {/* TODO(@Peng): add page context here */} {inputLabel ? (
{inputLabel} diff --git a/packages/frontend/core/src/modules/find-in-page/entities/find-in-page.ts b/packages/frontend/core/src/modules/find-in-page/entities/find-in-page.ts index 5ef1a32216285..8cdc21c6834a4 100644 --- a/packages/frontend/core/src/modules/find-in-page/entities/find-in-page.ts +++ b/packages/frontend/core/src/modules/find-in-page/entities/find-in-page.ts @@ -71,7 +71,7 @@ export class FindInPage extends Entity { constructor() { super(); - // todo: hide on navigation + // TODO(@Peng): hide on navigation } findInPage(searchText: string) { diff --git a/packages/frontend/core/src/modules/multi-tab-sidebar/multi-tabs/tabs/journal.css.ts b/packages/frontend/core/src/modules/multi-tab-sidebar/multi-tabs/tabs/journal.css.ts index 0e8d3783e162d..fabddbafd5a68 100644 --- a/packages/frontend/core/src/modules/multi-tab-sidebar/multi-tabs/tabs/journal.css.ts +++ b/packages/frontend/core/src/modules/multi-tab-sidebar/multi-tabs/tabs/journal.css.ts @@ -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'), }, }, diff --git a/packages/frontend/core/src/modules/multi-tab-sidebar/multi-tabs/tabs/journal.tsx b/packages/frontend/core/src/modules/multi-tab-sidebar/multi-tabs/tabs/journal.tsx index 38e62e5501735..0f18f97d7ce9e 100644 --- a/packages/frontend/core/src/modules/multi-tab-sidebar/multi-tabs/tabs/journal.tsx +++ b/packages/frontend/core/src/modules/multi-tab-sidebar/multi-tabs/tabs/journal.tsx @@ -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; diff --git a/packages/frontend/core/src/modules/peek-view/view/doc-peek-view.tsx b/packages/frontend/core/src/modules/peek-view/view/doc-peek-view.tsx index f5270bd6f20a4..ba789edd9f2a1 100644 --- a/packages/frontend/core/src/modules/peek-view/view/doc-peek-view.tsx +++ b/packages/frontend/core/src/modules/peek-view/view/doc-peek-view.tsx @@ -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); diff --git a/packages/frontend/core/src/modules/peek-view/view/peek-view-controls.tsx b/packages/frontend/core/src/modules/peek-view/view/peek-view-controls.tsx index 1e470c102dba2..377fad7508f5e 100644 --- a/packages/frontend/core/src/modules/peek-view/view/peek-view-controls.tsx +++ b/packages/frontend/core/src/modules/peek-view/view/peek-view-controls.tsx @@ -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); diff --git a/packages/frontend/core/src/modules/properties/services/adapter.ts b/packages/frontend/core/src/modules/properties/services/adapter.ts index aa91b59afd01f..b241b666d6464 100644 --- a/packages/frontend/core/src/modules/properties/services/adapter.ts +++ b/packages/frontend/core/src/modules/properties/services/adapter.ts @@ -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: { diff --git a/packages/frontend/core/src/modules/workbench/entities/workbench.ts b/packages/frontend/core/src/modules/workbench/entities/workbench.ts index e51a2a3176664..eb7071d22512d 100644 --- a/packages/frontend/core/src/modules/workbench/entities/workbench.ts +++ b/packages/frontend/core/src/modules/workbench/entities/workbench.ts @@ -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); diff --git a/packages/frontend/core/src/modules/workbench/view/split-view/resize-handle.tsx b/packages/frontend/core/src/modules/workbench/view/split-view/resize-handle.tsx index d3498542ab817..72032a34465c3 100644 --- a/packages/frontend/core/src/modules/workbench/view/split-view/resize-handle.tsx +++ b/packages/frontend/core/src/modules/workbench/view/split-view/resize-handle.tsx @@ -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(); diff --git a/packages/frontend/core/src/modules/workbench/view/split-view/split-view.tsx b/packages/frontend/core/src/modules/workbench/view/split-view/split-view.tsx index ad8f12e0ff107..4239907f70ffa 100644 --- a/packages/frontend/core/src/modules/workbench/view/split-view/split-view.tsx +++ b/packages/frontend/core/src/modules/workbench/view/split-view/split-view.tsx @@ -35,7 +35,7 @@ export interface SplitViewProps extends HTMLAttributes { } type SlotsMap = Record>; -// TODO: vertical orientation support +// TODO(@catsjuice): vertical orientation support export const SplitView = ({ orientation = 'horizontal', className, diff --git a/packages/frontend/core/src/pages/auth.tsx b/packages/frontend/core/src/pages/auth.tsx index 296337faf1a16..dd54eb5795ed2 100644 --- a/packages/frontend/core/src/pages/auth.tsx +++ b/packages/frontend/core/src/pages/auth.tsx @@ -100,7 +100,7 @@ export const AuthPage = (): ReactElement | null => { }, [jumpToIndex]); if (!passwordLimits || !account) { - // TODO: loading UI + // TODO(@eyhn): loading UI return null; } @@ -184,7 +184,7 @@ export const loader: LoaderFunction = async args => { email: email, }, }).catch(console.error); - // TODO: Add error handling + // TODO(@eyhn): Add error handling if (!res?.changeEmail) { return redirect('/expired'); } @@ -224,6 +224,6 @@ export const Component = () => { return ; } - // TODO: loading UI + // TODO(@eyhn): loading UI return null; }; diff --git a/packages/frontend/core/src/pages/index.tsx b/packages/frontend/core/src/pages/index.tsx index 51c063944b62f..49e5d8e58ea60 100644 --- a/packages/frontend/core/src/pages/index.tsx +++ b/packages/frontend/core/src/pages/index.tsx @@ -144,7 +144,7 @@ export const Component = () => { return ; } - // TODO: We need a no workspace page + // TODO(@eyhn): We need a no workspace page return ( <>
{ }; export const Component = () => { - // TODO: loading ui + // TODO(@eyhn): loading ui return null; }; diff --git a/packages/frontend/core/src/pages/subscribe.tsx b/packages/frontend/core/src/pages/subscribe.tsx index 56640f3a5ff13..3884304ebba8c 100644 --- a/packages/frontend/core/src/pages/subscribe.tsx +++ b/packages/frontend/core/src/pages/subscribe.tsx @@ -31,7 +31,7 @@ export const Component = () => { switchMap(() => { return fromPromise(async signal => { retryKey; - // TODO: i18n + // TODO(@eyhn): i18n setMessage('Checking account status...'); setError(''); await authService.session.waitForRevalidation(signal); diff --git a/packages/frontend/core/src/pages/workspace/detail-page/detail-page.css.ts b/packages/frontend/core/src/pages/workspace/detail-page/detail-page.css.ts index 57be2882e9260..e8890271c7182 100644 --- a/packages/frontend/core/src/pages/workspace/detail-page/detail-page.css.ts +++ b/packages/frontend/core/src/pages/workspace/detail-page/detail-page.css.ts @@ -22,7 +22,7 @@ export const affineDocViewport = style({ flexDirection: 'column', userSelect: 'none', containerName: 'viewport', - // todo: find out what this does in bs + // TODO(@JimmFly): find out what this does in bs containerType: 'inline-size', background: cssVar('backgroundPrimaryColor'), '@media': { diff --git a/packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx b/packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx index 234300805bdc5..f6eda5a4c3214 100644 --- a/packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx +++ b/packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx @@ -96,7 +96,7 @@ const DetailPageImpl = memo(function DetailPageImpl() { const { appSettings } = useAppSettingHelper(); const isActiveView = useIsActiveView(); - // TODO: remove jotai here + // TODO(@eyhn): remove jotai here const [_, setActiveBlockSuiteEditor] = useActiveBlocksuiteEditor(); useEffect(() => { diff --git a/packages/frontend/core/src/providers/modal-provider.tsx b/packages/frontend/core/src/providers/modal-provider.tsx index c9e22fb3469b8..97f8d7db56f0e 100644 --- a/packages/frontend/core/src/providers/modal-provider.tsx +++ b/packages/frontend/core/src/providers/modal-provider.tsx @@ -258,7 +258,7 @@ export const SignOutConfirmModal = () => { await authService.signOut(); } catch (err) { console.error(err); - // TODO: i18n + // TODO(@eyhn): i18n notify.error({ title: 'Failed to sign out', }); diff --git a/packages/frontend/electron/forge.config.mjs b/packages/frontend/electron/forge.config.mjs index 3f03a274b04be..54947970e0792 100644 --- a/packages/frontend/electron/forge.config.mjs +++ b/packages/frontend/electron/forge.config.mjs @@ -147,7 +147,7 @@ export default { return; } - // TODO: right now we do not need the following + // TODO(@Peng): right now we do not need the following // it is for octobase-node, but we dont use it for now. if (platform === 'darwin' && arch === 'arm64') { // In GitHub Actions runner, MacOS is always x64 diff --git a/packages/frontend/electron/renderer/index.tsx b/packages/frontend/electron/renderer/index.tsx index 82b00b3dcfb71..0e883e463c80a 100644 --- a/packages/frontend/electron/renderer/index.tsx +++ b/packages/frontend/electron/renderer/index.tsx @@ -26,7 +26,7 @@ function main() { performanceMainLogger.info('start'); // load persistent config for electron - // TODO: should be sync, but it's not necessary for now + // TODO(@Peng): should be sync, but it's not necessary for now appConfigProxy .getSync() .catch(() => console.error('failed to load app config')); diff --git a/packages/frontend/electron/src/main/handlers.ts b/packages/frontend/electron/src/main/handlers.ts index e03debbb9c948..141f2a189c73b 100644 --- a/packages/frontend/electron/src/main/handlers.ts +++ b/packages/frontend/electron/src/main/handlers.ts @@ -29,7 +29,7 @@ export const allHandlers = { }; export const registerHandlers = () => { - // TODO: listen to namespace instead of individual event types + // TODO(@Peng): listen to namespace instead of individual event types ipcMain.setMaxListeners(100); for (const [namespace, namespaceHandlers] of Object.entries(allHandlers)) { for (const [key, handler] of Object.entries(namespaceHandlers)) { diff --git a/packages/frontend/electron/src/main/main-window.ts b/packages/frontend/electron/src/main/main-window.ts index 56863f425b4c1..415099ba2141b 100644 --- a/packages/frontend/electron/src/main/main-window.ts +++ b/packages/frontend/electron/src/main/main-window.ts @@ -111,7 +111,7 @@ async function createWindow(additionalArguments: string[]) { }); browserWindow.on('close', e => { - // TODO: gracefully close the app, for example, ask user to save unsaved changes + // TODO(@Peng): gracefully close the app, for example, ask user to save unsaved changes e.preventDefault(); if (!isMacOS()) { closeAllWindows(); diff --git a/packages/frontend/electron/src/main/onboarding.ts b/packages/frontend/electron/src/main/onboarding.ts index 2c87d9ac98041..4dfa9fcd812e8 100644 --- a/packages/frontend/electron/src/main/onboarding.ts +++ b/packages/frontend/electron/src/main/onboarding.ts @@ -79,7 +79,7 @@ async function createOnboardingWindow(additionalArguments: string[]) { // forcing zoom factor to 1 to avoid onboarding display issues browserWindow.webContents.setZoomFactor(1); fullscreenAndCenter(browserWindow); - // TODO: add a timeout to avoid flickering, window is ready, but dom is not ready + // TODO(@catsjuice): add a timeout to avoid flickering, window is ready, but dom is not ready setTimeout(() => { browserWindow.show(); }, 300); diff --git a/tests/affine-cloud/e2e/migration.spec.ts b/tests/affine-cloud/e2e/migration.spec.ts index 2a4da7ddb2835..15faac7ddaa3d 100644 --- a/tests/affine-cloud/e2e/migration.spec.ts +++ b/tests/affine-cloud/e2e/migration.spec.ts @@ -49,7 +49,7 @@ test.afterEach(async () => { await deleteUser(user.email); }); -// TODO: @joooye34 mock migration from server data after page level upgrade implemented. +// TODO(@eyhn) mock migration from server data after page level upgrade implemented. test.skip('migration', async ({ page, browser }) => { let workspaceId: string; { diff --git a/tests/affine-local/e2e/image-preview.spec.ts b/tests/affine-local/e2e/image-preview.spec.ts index 467f6aff20ded..3f67e2de842c7 100644 --- a/tests/affine-local/e2e/image-preview.spec.ts +++ b/tests/affine-local/e2e/image-preview.spec.ts @@ -33,7 +33,7 @@ async function importImage(page: Page, url: string) { }, [url] ); - // TODO: wait for image to be loaded more reliably + // TODO(@catsjuice): wait for image to be loaded more reliably await page.waitForTimeout(1000); }