From 2402b4c6f1f047cb5ffa19610f091ba1de7b7371 Mon Sep 17 00:00:00 2001 From: "Kilu.He" <108015703+qinluhe@users.noreply.github.com> Date: Thu, 1 Aug 2024 12:59:04 +0800 Subject: [PATCH] feat: support global comment on publish (#5834) * feat: support duplicate UI on web * fix: replace google svg * fix: modified some copy * fix: adjust modal position * fix: upgrade wasm package * fix: text overflow * fix: global comments * fix: replace appflowy icon * fix: demond load outline * fix: lazy load * fix: close duplicate entry * fix: ci error * fix: modified comment styles * fix: adjust space * fix: easy find reply comment * fix: calendar scroll bugs * fix: image render * fix: replace loading * fix: issues of test session * fix: fixed adding comment * fix: database view name --- frontend/appflowy_web_app/index.html | 6 +- frontend/appflowy_web_app/package.json | 3 +- frontend/appflowy_web_app/pnpm-lock.yaml | 16 +- frontend/appflowy_web_app/public/appflowy.svg | 19 +- .../src/application/comment.type.ts | 22 ++ .../application/services/js-services/index.ts | 69 ++++ .../services/js-services/wasm/client_api.ts | 121 +++++- .../src/application/services/services.type.ts | 13 + .../services/tauri-services/index.ts | 52 ++- .../src/application/session/sign_in.ts | 1 - .../appflowy_web_app/src/application/types.ts | 40 ++ .../src/assets/add_reaction.svg | 4 + .../src/assets/check_circle.svg | 7 + .../src/assets/clock_alarm.svg | 7 + .../appflowy_web_app/src/assets/close.svg | 6 + .../appflowy_web_app/src/assets/collapse.svg | 4 + .../src/assets/corner_left_top.svg | 3 + .../src/assets/double_arrow.svg | 8 + .../appflowy_web_app/src/assets/error.svg | 4 + .../src/assets/error_outline.svg | 7 + .../appflowy_web_app/src/assets/expand.svg | 4 + .../src/assets/images/empty.png | Bin 0 -> 50773 bytes frontend/appflowy_web_app/src/assets/lock.svg | 5 + .../src/assets/login/google.svg | 19 +- .../appflowy_web_app/src/assets/reply.svg | 3 + .../appflowy_web_app/src/assets/selected.svg | 3 + .../appflowy_web_app/src/assets/shuffle.svg | 12 + .../appflowy_web_app/src/assets/trash.svg | 14 + .../src/assets/warning_amber.svg | 7 + .../_shared/emoji-picker/EmojiPicker.hooks.ts | 175 +++++++++ .../_shared/emoji-picker/EmojiPicker.tsx | 37 ++ .../emoji-picker/EmojiPickerCategories.tsx | 354 ++++++++++++++++++ .../emoji-picker/EmojiPickerHeader.tsx | 156 ++++++++ .../components/_shared/emoji-picker/const.ts | 3 + .../components/_shared/emoji-picker/index.ts | 3 + .../_shared/image-render/ImageRender.tsx | 50 +++ .../components/_shared/katex-math/index.ts | 3 + .../components/_shared/modal/NormalModal.tsx | 82 ++++ .../src/components/_shared/modal/index.ts | 1 + .../_shared/notify/InfoSnackbar.tsx | 122 ++++++ .../src/components/_shared/notify/index.ts | 18 +- .../components/_shared/popover/Popover.tsx | 2 + .../src/components/app/AppConfig.tsx | 49 ++- .../src/components/app/AppTheme.tsx | 29 ++ .../src/components/app/withAppWrapper.tsx | 4 + .../components/database/calendar/Calendar.tsx | 5 +- .../database/calendar/calendar.scss | 21 +- .../components/board/column/Column.tsx | 1 - .../components/calendar/toolbar/Toolbar.tsx | 2 +- .../components/cell/date/DateTimeCell.tsx | 2 +- .../database/components/field/CardField.tsx | 4 +- .../components/grid/grid-table/GridTable.tsx | 2 +- .../components/header/DatabaseHeader.tsx | 2 +- .../database/components/tabs/DatabaseTabs.tsx | 29 +- .../src/components/document/Document.tsx | 4 +- .../components/document/DocumentSkeleton.tsx | 17 + .../components/blocks/code/Code.hooks.ts | 50 ++- .../editor/components/blocks/code/utils.ts | 7 +- .../components/blocks/image/ImageRender.tsx | 25 +- .../blocks/math-equation/MathEquation.tsx | 2 +- .../components/blocks/math-equation/index.ts | 4 +- .../components/leaf/formula/Formula.tsx | 2 +- .../editor/components/leaf/formula/index.ts | 6 +- .../components/leaf/mention/MentionDate.tsx | 2 +- .../components/global-comment/CommentList.tsx | 39 ++ .../global-comment/GlobalComment.hooks.tsx | 246 ++++++++++++ .../global-comment/GlobalComment.tsx | 36 ++ .../global-comment/GlobalCommentProvider.tsx | 60 +++ .../global-comment/ReplyComment.tsx | 47 +++ .../global-comment/actions/CommentActions.tsx | 17 + .../global-comment/actions/MoreActions.tsx | 147 ++++++++ .../global-comment/actions/ReactAction.tsx | 62 +++ .../global-comment/actions/ReplyAction.tsx | 28 ++ .../global-comment/add-comment/AddComment.tsx | 175 +++++++++ .../add-comment/AddCommentWrapper.tsx | 68 ++++ .../global-comment/add-comment/index.ts | 1 + .../global-comment/comment/Comment.tsx | 106 ++++++ .../global-comment/comment/CommentWrap.tsx | 82 ++++ .../global-comment/comment/index.ts | 1 + .../src/components/global-comment/index.ts | 1 + .../global-comment/reactions/Reaction.tsx | 101 +++++ .../global-comment/reactions/Reactions.tsx | 31 ++ .../global-comment/reactions/index.ts | 1 + .../src/components/global-comment/utils.ts | 11 + .../src/components/login/Login.tsx | 18 +- .../src/components/login/LoginModal.tsx | 21 ++ .../src/components/login/LoginProvider.tsx | 4 +- .../src/components/login/MagicLink.tsx | 10 +- .../src/components/login/index.ts | 2 + .../src/components/publish/DatabaseView.tsx | 2 +- .../src/components/publish/PublishView.tsx | 13 +- .../components/publish/header/MoreActions.tsx | 110 +++--- .../publish/header/PublishViewHeader.tsx | 8 +- .../publish/header/duplicate/Duplicate.tsx | 31 ++ .../header/duplicate/DuplicateModal.tsx | 129 +++++++ .../header/duplicate/SelectWorkspace.tsx | 143 +++++++ .../publish/header/duplicate/SpaceList.tsx | 95 +++++ .../publish/header/duplicate/index.ts | 1 + .../publish/header/duplicate/useDuplicate.ts | 131 +++++++ .../publish/outline/OutlineDrawer.tsx | 2 +- .../publish/outline/OutlinePopover.tsx | 2 +- .../src/components/publish/outline/index.ts | 1 + .../src/components/publish/useViewMeta.ts | 9 +- .../src/components/view-meta/ViewCover.tsx | 7 +- .../appflowy_web_app/src/pages/LoginPage.tsx | 15 +- frontend/appflowy_web_app/src/styles/app.scss | 48 +++ .../appflowy_web_app/src/styles/mixin.scss | 11 + .../src/styles/variables/dark.variables.css | 6 + .../src/styles/variables/light.variables.css | 6 + frontend/appflowy_web_app/src/utils/color.ts | 31 ++ frontend/appflowy_web_app/src/utils/emoji.ts | 14 + frontend/appflowy_web_app/src/utils/font.ts | 22 +- .../appflowy_web_app/src/utils/position.ts | 20 + frontend/appflowy_web_app/src/vite-env.d.ts | 3 +- frontend/appflowy_web_app/vite.config.ts | 9 +- frontend/resources/translations/en.json | 87 ++++- 116 files changed, 3789 insertions(+), 236 deletions(-) create mode 100644 frontend/appflowy_web_app/src/application/comment.type.ts create mode 100644 frontend/appflowy_web_app/src/application/types.ts create mode 100644 frontend/appflowy_web_app/src/assets/add_reaction.svg create mode 100644 frontend/appflowy_web_app/src/assets/check_circle.svg create mode 100644 frontend/appflowy_web_app/src/assets/clock_alarm.svg create mode 100644 frontend/appflowy_web_app/src/assets/close.svg create mode 100644 frontend/appflowy_web_app/src/assets/collapse.svg create mode 100644 frontend/appflowy_web_app/src/assets/corner_left_top.svg create mode 100644 frontend/appflowy_web_app/src/assets/double_arrow.svg create mode 100644 frontend/appflowy_web_app/src/assets/error.svg create mode 100644 frontend/appflowy_web_app/src/assets/error_outline.svg create mode 100644 frontend/appflowy_web_app/src/assets/expand.svg create mode 100644 frontend/appflowy_web_app/src/assets/images/empty.png create mode 100644 frontend/appflowy_web_app/src/assets/lock.svg create mode 100644 frontend/appflowy_web_app/src/assets/reply.svg create mode 100644 frontend/appflowy_web_app/src/assets/selected.svg create mode 100644 frontend/appflowy_web_app/src/assets/shuffle.svg create mode 100644 frontend/appflowy_web_app/src/assets/trash.svg create mode 100644 frontend/appflowy_web_app/src/assets/warning_amber.svg create mode 100644 frontend/appflowy_web_app/src/components/_shared/emoji-picker/EmojiPicker.hooks.ts create mode 100644 frontend/appflowy_web_app/src/components/_shared/emoji-picker/EmojiPicker.tsx create mode 100644 frontend/appflowy_web_app/src/components/_shared/emoji-picker/EmojiPickerCategories.tsx create mode 100644 frontend/appflowy_web_app/src/components/_shared/emoji-picker/EmojiPickerHeader.tsx create mode 100644 frontend/appflowy_web_app/src/components/_shared/emoji-picker/const.ts create mode 100644 frontend/appflowy_web_app/src/components/_shared/emoji-picker/index.ts create mode 100644 frontend/appflowy_web_app/src/components/_shared/image-render/ImageRender.tsx create mode 100644 frontend/appflowy_web_app/src/components/_shared/katex-math/index.ts create mode 100644 frontend/appflowy_web_app/src/components/_shared/modal/NormalModal.tsx create mode 100644 frontend/appflowy_web_app/src/components/_shared/modal/index.ts create mode 100644 frontend/appflowy_web_app/src/components/_shared/notify/InfoSnackbar.tsx create mode 100644 frontend/appflowy_web_app/src/components/document/DocumentSkeleton.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/CommentList.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/GlobalComment.hooks.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/GlobalComment.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/GlobalCommentProvider.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/ReplyComment.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/actions/CommentActions.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/actions/MoreActions.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/actions/ReactAction.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/actions/ReplyAction.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/add-comment/AddComment.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/add-comment/AddCommentWrapper.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/add-comment/index.ts create mode 100644 frontend/appflowy_web_app/src/components/global-comment/comment/Comment.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/comment/CommentWrap.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/comment/index.ts create mode 100644 frontend/appflowy_web_app/src/components/global-comment/index.ts create mode 100644 frontend/appflowy_web_app/src/components/global-comment/reactions/Reaction.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/reactions/Reactions.tsx create mode 100644 frontend/appflowy_web_app/src/components/global-comment/reactions/index.ts create mode 100644 frontend/appflowy_web_app/src/components/global-comment/utils.ts create mode 100644 frontend/appflowy_web_app/src/components/login/LoginModal.tsx create mode 100644 frontend/appflowy_web_app/src/components/publish/header/duplicate/Duplicate.tsx create mode 100644 frontend/appflowy_web_app/src/components/publish/header/duplicate/DuplicateModal.tsx create mode 100644 frontend/appflowy_web_app/src/components/publish/header/duplicate/SelectWorkspace.tsx create mode 100644 frontend/appflowy_web_app/src/components/publish/header/duplicate/SpaceList.tsx create mode 100644 frontend/appflowy_web_app/src/components/publish/header/duplicate/index.ts create mode 100644 frontend/appflowy_web_app/src/components/publish/header/duplicate/useDuplicate.ts create mode 100644 frontend/appflowy_web_app/src/utils/emoji.ts create mode 100644 frontend/appflowy_web_app/src/utils/position.ts diff --git a/frontend/appflowy_web_app/index.html b/frontend/appflowy_web_app/index.html index 49615f8cb0..4c8514b049 100644 --- a/frontend/appflowy_web_app/index.html +++ b/frontend/appflowy_web_app/index.html @@ -31,7 +31,6 @@
- - - - + +