@seafile/sdoc-editor 0.5.29 → 0.5.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/basic-sdk/assets/css/layout.css +11 -15
  2. package/dist/basic-sdk/assets/css/simple-viewer.css +0 -10
  3. package/dist/basic-sdk/comment/components/comment-all-participants/index.css +8 -8
  4. package/dist/basic-sdk/comment/components/comment-editor.js +18 -18
  5. package/dist/basic-sdk/comment/components/comment-item-wrapper.js +4 -2
  6. package/dist/basic-sdk/comment/components/comment-list.css +22 -8
  7. package/dist/basic-sdk/comment/components/comment-list.js +7 -2
  8. package/dist/basic-sdk/comment/components/editor-comment.js +12 -10
  9. package/dist/basic-sdk/comment/components/elements-comment-count/element-comment-count.js +4 -8
  10. package/dist/basic-sdk/comment/components/elements-comment-count/index.js +4 -2
  11. package/dist/basic-sdk/comment/components/global-comment/global-comment-editor.js +2 -18
  12. package/dist/basic-sdk/comment/components/global-comment/index.css +56 -30
  13. package/dist/basic-sdk/comment/components/global-comment/index.js +95 -30
  14. package/dist/basic-sdk/comment/index.js +11 -10
  15. package/dist/basic-sdk/comment/provider/comment-context-provider.js +2 -3
  16. package/dist/basic-sdk/comment/provider/index.js +7 -2
  17. package/dist/basic-sdk/comment/provider/notification-context-provider.js +2 -3
  18. package/dist/basic-sdk/editor/comment-article.js +0 -101
  19. package/dist/basic-sdk/editor/editable-article.js +4 -1
  20. package/dist/basic-sdk/editor/sdoc-editor.js +12 -5
  21. package/dist/basic-sdk/extension/constants/index.js +1 -1
  22. package/dist/basic-sdk/extension/plugins/image/plugin.js +1 -1
  23. package/dist/basic-sdk/extension/plugins/list/plugin/index.js +17 -10
  24. package/dist/basic-sdk/extension/render/custom-element.js +4 -1
  25. package/dist/basic-sdk/extension/render/helper.js +4 -1
  26. package/dist/basic-sdk/hooks/use-selection-element.js +4 -3
  27. package/dist/basic-sdk/layout/article-container.js +10 -1
  28. package/dist/basic-sdk/layout/editor-content.js +18 -11
  29. package/dist/basic-sdk/outline/index.js +4 -1
  30. package/dist/basic-sdk/outline/style.css +12 -6
  31. package/dist/basic-sdk/utils/diff.js +9 -3
  32. package/dist/basic-sdk/views/readonly-article.js +4 -1
  33. package/dist/basic-sdk/views/sdoc-viewer.js +5 -3
  34. package/dist/components/doc-operations/revision-operations/changes-count/index.js +20 -6
  35. package/dist/layout/layout.css +0 -5
  36. package/dist/pages/simple-editor.js +2 -2
  37. package/package.json +1 -1
@@ -28,32 +28,28 @@
28
28
  border-right: none;
29
29
  }
30
30
 
31
- .sdoc-editor-container .sdoc-editor-content {
31
+ .sdoc-content-wrapper {
32
32
  width: 100%;
33
- height: calc(100% - 44px);
33
+ height: calc(100vh - 44px);
34
34
  display: flex;
35
- background: #f5f5f5;
36
- position: relative;
37
35
  }
38
36
 
39
- .sdoc-editor-container .sdoc-absolute-wrapper {
37
+ .sdoc-editor-container .sdoc-editor-content {
38
+ display: flex;
40
39
  position: absolute;
41
- left: 0;
42
- right: 0;
43
- top: 0;
44
- bottom: 0;
45
- height: 100%;
40
+ min-width: 1100px;
46
41
  width: 100%;
47
42
  }
48
43
 
44
+
49
45
  .sdoc-editor-container .sdoc-scroll-container {
50
- position: absolute;
51
- left: 0;
52
- right: 0;
53
- top: 0;
54
- bottom: 0;
55
46
  z-index: 100;
56
47
  overflow: auto;
48
+ height: 100%;
49
+ width: 100%;
50
+ position: relative;
51
+ flex: 1;
52
+ background: #f5f5f5;
57
53
  }
58
54
 
59
55
  .sdoc-editor-container .sdoc-article-container {
@@ -1,13 +1,3 @@
1
- .sdoc-editor-container .sdoc-editor-content.readonly {
2
- height: 100%;
3
- }
4
-
5
- .sdoc-editor-container .sdoc-editor-content.no-outline .sdoc-absolute-wrapper {
6
- display: flex;
7
- position: relative;
8
- min-height: 0;
9
- }
10
-
11
1
  .sdoc-editor-container .sdoc-editor-content.no-outline .sdoc-article-container {
12
2
  margin-left: 0 !important;
13
3
  }
@@ -1,4 +1,4 @@
1
- .global-comments-popover .comments-panel-body__header .comments-participants-container {
1
+ .sdoc-comment-drawer .comments-panel-body__header .comments-participants-container {
2
2
  width: fit-content;
3
3
  max-width: 100%;
4
4
  height: 42px;
@@ -8,7 +8,7 @@
8
8
  position: relative;
9
9
  }
10
10
 
11
- .global-comments-popover .comments-panel-body__header .comments-participants-editor-target {
11
+ .sdoc-comment-drawer .comments-panel-body__header .comments-participants-editor-target {
12
12
  position: absolute;
13
13
  left: -1px;
14
14
  top: 0;
@@ -18,13 +18,13 @@
18
18
  background-color: transparent;
19
19
  }
20
20
 
21
- .global-comments-popover .comments-panel-body__header .comment-participant-avatar {
21
+ .sdoc-comment-drawer .comments-panel-body__header .comment-participant-avatar {
22
22
  border-radius: 50%;
23
23
  vertical-align: middle;
24
24
  margin-right: -0.5rem;
25
25
  }
26
26
 
27
- .global-comments-popover .comments-panel-body__header .comment-participant-avatar img {
27
+ .sdoc-comment-drawer .comments-panel-body__header .comment-participant-avatar img {
28
28
  width: 28px;
29
29
  height: 28px;
30
30
  border: 2px solid #fff;
@@ -41,7 +41,7 @@
41
41
  user-select: none;
42
42
  }
43
43
 
44
- .global-comments-popover .comments-panel-body__header .add-comments-participants {
44
+ .sdoc-comment-drawer .comments-panel-body__header .add-comments-participants {
45
45
  position: relative;
46
46
  bottom: -3px;
47
47
  cursor: pointer;
@@ -56,13 +56,13 @@
56
56
  justify-content: center;
57
57
  }
58
58
 
59
- .global-comments-popover .add-comments-participants .sdocfont {
59
+ .sdoc-comment-drawer .add-comments-participants .sdocfont {
60
60
  font-size: 16px;
61
61
  color: #ff8000;
62
62
  border-radius: 50%;
63
63
  }
64
64
 
65
- .global-comments-popover .comment-participants-more {
65
+ .sdoc-comment-drawer .comment-participants-more {
66
66
  position: absolute;
67
67
  top: 0;
68
68
  left: 0;
@@ -77,7 +77,7 @@
77
77
  border: 2px solid #fff;
78
78
  }
79
79
 
80
- .global-comments-popover .comment-participants-more .sdocfont {
80
+ .sdoc-comment-drawer .comment-participants-more .sdocfont {
81
81
  color: #fff;
82
82
  font-size: 12px;
83
83
  }
@@ -1,9 +1,7 @@
1
1
  import React, { useCallback, useEffect, useMemo, useRef } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
- import { Button } from 'reactstrap';
4
3
  import classNames from 'classnames';
5
4
  import { Editor, Transforms } from '@seafile/slate';
6
- import { useScrollContext } from '../../hooks/use-scroll-context';
7
5
  import context from '../../../context';
8
6
  import { useParticipantsContext } from '../hooks/use-participants';
9
7
  import SdocCommentEditor from '../../editor/sdoc-comment-editor';
@@ -28,13 +26,14 @@ const CommentEditor = _ref => {
28
26
  insertContent,
29
27
  updateContent,
30
28
  setIsEditing,
31
- hiddenComment
29
+ hiddenComment,
30
+ commentRef,
31
+ globalComment
32
32
  } = _ref;
33
33
  const commentWrapperRef = useRef();
34
34
  const {
35
35
  t
36
36
  } = useTranslation();
37
- const scrollRef = useScrollContext();
38
37
  const {
39
38
  addParticipants
40
39
  } = useParticipantsContext();
@@ -66,13 +65,11 @@ const CommentEditor = _ref => {
66
65
  // onMount: set scrollLeft
67
66
  useEffect(() => {
68
67
  if (!commentWrapperRef.current) return;
69
- const {
70
- right,
71
- width
72
- } = commentWrapperRef.current.getBoundingClientRect();
73
- if (right <= window.innerWidth) return;
74
- if (!scrollRef.current) return;
75
- scrollRef.current.scrollLeft = scrollRef.current.scrollLeft + width;
68
+ (commentRef === null || commentRef === void 0 ? void 0 : commentRef.current) && commentRef.current.scrollIntoView({
69
+ behavior: 'smooth',
70
+ block: 'nearest'
71
+ });
72
+
76
73
  // eslint-disable-next-line react-hooks/exhaustive-deps
77
74
  }, []);
78
75
  const updateValue = useCallback(value => {
@@ -99,15 +96,18 @@ const CommentEditor = _ref => {
99
96
  } = event;
100
97
  if (eventType === 'keydown' && keyCode !== KeyCodes.Esc) return;
101
98
  if (eventType === 'click') {
99
+ const isSdocContentWrapper = target.classList.contains('sdoc-content-wrapper');
102
100
  const listContainer = window.document.querySelector('#global-comment-list-container');
103
- const addCommentSideBtn = window.document.querySelector('.comment-add-wrapper');
104
- const addCommentPopover = window.document.querySelector('.sdoc-doc-comment-editor-container');
105
- const globalCommentPopover = window.document.querySelector('.comment-ui-container');
101
+ const commentEditorContainer = window.document.querySelector('.sdoc-doc-comment-editor-container');
102
+ const resizeContainer = window.document.querySelector('.sdoc-comment-resize-handler');
103
+ const scrollContainer = window.document.querySelector('.sdoc-scroll-container');
106
104
  const isClickOnListContainer = listContainer && listContainer.contains(target);
107
- const isClickOnAddCommentPopover = type === 'comment' && addCommentPopover && addCommentPopover.contains(target);
108
- const isClickOnAddCommentSideBtn = addCommentSideBtn && addCommentSideBtn.contains(target);
109
- const isClickOnGlobalCommentPopover = globalCommentPopover && globalCommentPopover.contains(target);
110
- const isPreventCancel = isClickOnListContainer || isClickOnAddCommentPopover || isClickOnAddCommentSideBtn || isClickOnGlobalCommentPopover;
105
+ const isClickOnCommentEditorContainer = commentEditorContainer && commentEditorContainer.contains(target);
106
+ const isClickResizeContainer = resizeContainer && resizeContainer.contains(target);
107
+ const isClickScrollContainer = scrollContainer && scrollContainer.contains(target);
108
+ const isPreventCancel = isClickOnListContainer || isClickOnCommentEditorContainer || isClickResizeContainer || isClickScrollContainer || isSdocContentWrapper;
109
+ // Global comment could not be canceled by clicking outside
110
+ if (globalComment && !isClickScrollContainer) return;
111
111
  if (isPreventCancel) return;
112
112
  }
113
113
  setIsEditing && setIsEditing(false);
@@ -277,12 +277,14 @@ const CommentItemWrapper = _ref => {
277
277
  key: reply.id,
278
278
  reply: reply
279
279
  });
280
- })), isActive && /*#__PURE__*/React.createElement(CommentEditor, {
280
+ })), isActive && /*#__PURE__*/React.createElement("div", {
281
+ className: "sdoc-reply-wrapper"
282
+ }, /*#__PURE__*/React.createElement(CommentEditor, {
281
283
  type: "reply",
282
284
  placeholder: tip,
283
285
  insertContent: insertContent,
284
286
  hiddenComment: hiddenComment
285
- }), isShowDeleteDialog && isActive && /*#__PURE__*/React.createElement(CommentDeletePopover, {
287
+ })), isShowDeleteDialog && isActive && /*#__PURE__*/React.createElement(CommentDeletePopover, {
286
288
  type: "comment",
287
289
  setIsShowDeleteDialog: setIsShowDeleteDialog,
288
290
  targetId: commentOpToolsId,
@@ -3,12 +3,10 @@
3
3
  }
4
4
 
5
5
  .sdoc-comment-list-container .comment-ui-container {
6
- min-width: 330px;
7
- max-width: 400px;
8
6
  background-color: #edf2fa;
9
- border-radius: 8px;
7
+ border-radius: 3px;
10
8
  box-shadow: 0 0 2px rgba(0, 0, 0, .04);
11
- padding: 16px;
9
+ padding: 16px 16px;
12
10
  margin-bottom: 10px;
13
11
  cursor: pointer;
14
12
  }
@@ -20,6 +18,10 @@
20
18
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 4px 8px 3px rgba(0, 0, 0, .15);
21
19
  }
22
20
 
21
+ .sdoc-comment-drawer .sdoc-comment-list-container .comment-ui-container {
22
+ padding: 16px 0;
23
+ }
24
+
23
25
  .sdoc-comment-list-container .comment-item-selected-text-container {
24
26
  width: 100%;
25
27
  height: 32px;
@@ -27,7 +29,7 @@
27
29
  padding: 6px 16px;
28
30
  align-items: center;
29
31
  overflow: hidden;
30
- border-radius: 8px 8px 0 0;
32
+ border-radius: 3px 3px 0 0;
31
33
  }
32
34
 
33
35
  .sdoc-comment-list-container .comment-item-selected-text-container .sdoc-comment-quote {
@@ -64,7 +66,7 @@
64
66
 
65
67
  .comment-delete-popover-container .delete-control {
66
68
  display: flex;
67
- justify-content: end;
69
+ justify-content: flex-end;
68
70
  width: 100%;
69
71
  }
70
72
 
@@ -80,7 +82,6 @@
80
82
  }
81
83
 
82
84
  .sdoc-comment-list-container .comment-item .comment-content {
83
- padding-bottom: 10px;
84
85
  margin-top: 10px;
85
86
  margin-left: 41px;
86
87
  word-break: keep-all;
@@ -229,7 +230,7 @@
229
230
  }
230
231
 
231
232
  .comment-editor-wrapper .sdoc-comment-editor-wrapper .article.sdoc-comment-editor {
232
- width: 365px;
233
+ width: 100%;
233
234
  padding: 8px;
234
235
  padding-bottom: 0;
235
236
  min-height: 130px;
@@ -241,6 +242,10 @@
241
242
  background-color: transparent;
242
243
  }
243
244
 
245
+ .comment-container-right .sdoc-editor-container {
246
+ width: 365px;
247
+ }
248
+
244
249
  .article.sdoc-comment-editor :first-child {
245
250
  margin-top: 0 !important;
246
251
  }
@@ -291,3 +296,12 @@
291
296
  display: flex;
292
297
  justify-content: flex-end;
293
298
  }
299
+
300
+ .sdoc-reply-wrapper {
301
+ padding: 0 10px;
302
+ }
303
+
304
+ .sdoc-doc-comment-editor-container.sdoc-comment-list-container .comment-ui-container {
305
+ padding-left: 10px;
306
+ padding-right: 10px;
307
+ }
@@ -23,7 +23,6 @@ const CommentList = _ref => {
23
23
  if (event.target.className !== 'article') return;
24
24
  hiddenComment();
25
25
  }, [hiddenComment]);
26
-
27
26
  // onMount: hidden comment
28
27
  useEffect(() => {
29
28
  const eventBus = EventBus.getInstance();
@@ -83,6 +82,10 @@ const CommentList = _ref => {
83
82
  }, []);
84
83
  useEffect(() => {
85
84
  document.addEventListener('click', resetActiveComment);
85
+ commentRef.current.scrollIntoView({
86
+ behavior: 'smooth',
87
+ block: 'nearest'
88
+ });
86
89
  return () => {
87
90
  document.removeEventListener('click', resetActiveComment);
88
91
  };
@@ -111,8 +114,10 @@ const CommentList = _ref => {
111
114
  className: "comment-ui-container active"
112
115
  }, /*#__PURE__*/React.createElement(CommentEditor, {
113
116
  type: "comment",
117
+ globalComment: true,
114
118
  insertContent: insertContent,
115
- hiddenComment: hiddenComment
119
+ hiddenComment: hiddenComment,
120
+ commentRef: commentRef
116
121
  })));
117
122
  };
118
123
  export default CommentList;
@@ -1,5 +1,4 @@
1
1
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
- import { useSlateStatic } from '@seafile/slate-react';
3
2
  import { Node } from '@seafile/slate';
4
3
  import useSelectionUpdate from '../../hooks/use-selection-update';
5
4
  import { useCursorPosition } from '../helper';
@@ -11,11 +10,13 @@ import { ELEMENT_TYPE } from '../../extension/constants';
11
10
  import { Z_INDEX } from '../../constants';
12
11
  const EditorComment = _ref => {
13
12
  let {
14
- deleteUnseenNotifications
13
+ deleteUnseenNotifications,
14
+ editor
15
15
  } = _ref;
16
16
  useSelectionUpdate();
17
- const editor = useSlateStatic();
18
- const selectionElement = useSelectionElement();
17
+ const selectionElement = useSelectionElement({
18
+ editor
19
+ });
19
20
  const [isShowComments, setIsShowComments] = useState(false);
20
21
  const onAddCommentToggle = useCallback(() => {
21
22
  setIsShowComments(true);
@@ -38,6 +39,10 @@ const EditorComment = _ref => {
38
39
  setComments([]);
39
40
  setIsShowComments(false);
40
41
  }, [element_comments_map, selectionElement, editor.selection]);
42
+ const hiddenComment = useCallback(() => {
43
+ setComments([]);
44
+ setIsShowComments(false);
45
+ }, []);
41
46
  const cursor = useCursorPosition();
42
47
  const style = useMemo(() => {
43
48
  var _Node$string;
@@ -59,11 +64,7 @@ const EditorComment = _ref => {
59
64
  top: cursor.y,
60
65
  zIndex: Z_INDEX.COMMENT_ADD
61
66
  };
62
- }, [cursor, isShowComments, selectionElement, element_comments_map]);
63
- const hiddenComment = useCallback(() => {
64
- setComments([]);
65
- setIsShowComments(false);
66
- }, []);
67
+ }, [selectionElement, element_comments_map, cursor.y, isShowComments]);
67
68
  return /*#__PURE__*/React.createElement("div", {
68
69
  className: "sdoc-comment-container"
69
70
  }, /*#__PURE__*/React.createElement("div", {
@@ -80,7 +81,8 @@ const EditorComment = _ref => {
80
81
  className: "sdocfont sdoc-add-comment mr-1"
81
82
  }))), /*#__PURE__*/React.createElement(ElementsCommentCount, {
82
83
  elementCommentsMap: element_comments_map,
83
- selectionElement: selectionElement
84
+ selectionElement: selectionElement,
85
+ editor: editor
84
86
  }), /*#__PURE__*/React.createElement("div", {
85
87
  className: "comment-list-wrapper",
86
88
  style: isShowComments ? {
@@ -1,7 +1,5 @@
1
1
  import React, { useCallback, useEffect, useState } from 'react';
2
- import { useSlateStatic } from '@seafile/slate-react';
3
2
  import { getNodeById } from '../../../extension/core';
4
- import { useScrollContext } from '../../../hooks/use-scroll-context';
5
3
  import { getElementCommentCountTop } from '../../helper';
6
4
  import { eventStopPropagation } from '../../../utils/mouse-event';
7
5
  import { focusToCommentElement } from '../../utils';
@@ -10,23 +8,21 @@ const ElementCommentCount = _ref => {
10
8
  let {
11
9
  elementId,
12
10
  isElementSelected,
13
- commentsCount
11
+ commentsCount,
12
+ editor
14
13
  } = _ref;
15
- const editor = useSlateStatic();
16
14
  const element = getNodeById(editor.children, elementId);
17
- const scrollRef = useScrollContext();
18
15
  const [top, setTop] = useState(-9999);
19
16
  const onClick = useCallback(event => {
20
17
  eventStopPropagation(event);
21
18
  focusToCommentElement(editor, element);
22
19
  }, [editor, element]);
23
20
  useEffect(() => {
24
- var _scrollRef$current;
25
21
  if (!element) return;
26
- const scrollTop = (scrollRef === null || scrollRef === void 0 ? void 0 : (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.scrollTop) || 0;
22
+ const scrollTop = 0;
27
23
  const newTop = getElementCommentCountTop(editor, element, scrollTop);
28
24
  setTop(newTop);
29
- }, [editor, elementId, element, scrollRef, isElementSelected]);
25
+ }, [editor, elementId, element, isElementSelected]);
30
26
  if (!element) return null;
31
27
  let style = {
32
28
  top
@@ -4,7 +4,8 @@ import './index.css';
4
4
  const ElementsCommentCount = _ref => {
5
5
  let {
6
6
  elementCommentsMap,
7
- selectionElement
7
+ selectionElement,
8
+ editor
8
9
  } = _ref;
9
10
  if (!elementCommentsMap) return null;
10
11
  return /*#__PURE__*/React.createElement("div", {
@@ -20,7 +21,8 @@ const ElementsCommentCount = _ref => {
20
21
  key: elementId,
21
22
  elementId: elementId,
22
23
  isElementSelected: isSelected,
23
- commentsCount: unresolvedCommentCount
24
+ commentsCount: unresolvedCommentCount,
25
+ editor: editor
24
26
  });
25
27
  }));
26
28
  };
@@ -1,28 +1,12 @@
1
- import React, { useEffect, useRef } from 'react';
1
+ import React from 'react';
2
2
  import CommentEditor from '../comment-editor';
3
3
  const GlobalCommentEditor = _ref => {
4
4
  let {
5
5
  insertDocComment,
6
6
  hiddenCommentEditor
7
7
  } = _ref;
8
- const ref = useRef(null);
9
- useEffect(() => {
10
- const hidden = event => {
11
- var _ref$current;
12
- if (!((_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.contains(event.target))) {
13
- hiddenCommentEditor();
14
- }
15
- };
16
- document.addEventListener('click', hidden);
17
- return () => {
18
- document.removeEventListener('click', hidden);
19
- };
20
-
21
- // eslint-disable-next-line react-hooks/exhaustive-deps
22
- }, []);
23
8
  return /*#__PURE__*/React.createElement("div", {
24
- className: "sdoc-doc-comment-editor-container sdoc-comment-list-container",
25
- ref: ref
9
+ className: "sdoc-doc-comment-editor-container sdoc-comment-list-container"
26
10
  }, /*#__PURE__*/React.createElement("div", {
27
11
  className: "comment-ui-container active"
28
12
  }, /*#__PURE__*/React.createElement(CommentEditor, {
@@ -1,23 +1,47 @@
1
- .global-comments-popover {
2
- position: absolute;
3
- right: 10px;
4
- top: 50px;
1
+ .sdoc-comment-drawer {
2
+ position: relative;
3
+ min-width: 360px;
4
+ max-width: 620px;
5
5
  z-index: 103;
6
- width: 432px;
7
- height: 540px;
8
6
  }
9
7
 
10
- .global-comments-popover .comments-panel-wrapper {
11
- height: 100%;
8
+ .sdoc-comment-drawer .comments-panel-wrapper {
9
+ /* 100vh - toolbar height - scroll height */
10
+ height: calc(100vh - 100px - 2px);
12
11
  display: flex;
12
+ position: relative;
13
13
  flex-direction: column;
14
14
  background: #fff;
15
- border: 1px solid #EAECEF;
16
- border-radius: 4px;
17
15
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
18
16
  }
19
17
 
20
- .global-comments-popover .comments-panel-header {
18
+ .sdoc-comment-drawer .sdoc-comment-resize-handler {
19
+ position: absolute;
20
+ left: 0;
21
+ height: 100%;
22
+ margin-right: -2px;
23
+ width: 6px;
24
+ cursor: ew-resize;
25
+ z-index: 103;
26
+ }
27
+
28
+ .sdoc-comment-drawer .sdoc-comment-resize-handler:hover {
29
+ border-left: 2px solid #d8d8d8;
30
+ }
31
+
32
+ .sdoc-comment-resize-handler .sdoc-comment-move-dragger {
33
+ display: none;
34
+ position: absolute;
35
+ top: 0px;
36
+ left: -3px;
37
+ width: 6px;
38
+ height: 30px;
39
+ border-radius: 3px;
40
+ background-color: #2674f8;
41
+ cursor: ew-resize;
42
+ }
43
+
44
+ .sdoc-comment-drawer .comments-panel-header {
21
45
  padding: 0 16px;
22
46
  height: 46px;
23
47
  display: flex;
@@ -26,25 +50,25 @@
26
50
  border-bottom: 1px solid #EAECEF;
27
51
  }
28
52
 
29
- .global-comments-popover .comments-panel-header .title {
53
+ .sdoc-comment-drawer .comments-panel-header .title {
30
54
  color: #212529;
31
55
  font-size: 16px;
32
56
  font-weight: 500;
33
57
  }
34
58
 
35
- .global-comments-popover .comments-panel-header .comments-panel-header-right {
59
+ .sdoc-comment-drawer .comments-panel-header .comments-panel-header-right {
36
60
  display: flex;
37
61
  }
38
62
 
39
- .global-comments-popover .comments-panel-header-right .sdoc-icon-btn:not(:last-child) {
63
+ .sdoc-comment-drawer .comments-panel-header-right .sdoc-icon-btn:not(:last-child) {
40
64
  margin-right: 4px;
41
65
  }
42
66
 
43
- .global-comments-popover .comments-panel-header .sdoc-icon-btn .sdocfont {
67
+ .sdoc-comment-drawer .comments-panel-header .sdoc-icon-btn .sdocfont.sdoc-sm-close {
44
68
  font-weight: 700;
45
69
  }
46
70
 
47
- .global-comments-popover .comments-panel-body {
71
+ .sdoc-comment-drawer .comments-panel-body {
48
72
  flex: 1;
49
73
  display: flex;
50
74
  flex-direction: column;
@@ -53,37 +77,39 @@
53
77
  background-color: #F5F5F5;
54
78
  }
55
79
 
56
- .global-comments-popover .comments-panel-body__header {
80
+ .sdoc-comment-drawer .comments-panel-body__header {
57
81
  height: 80px;
58
82
  display: flex;
59
83
  flex-direction: column;
60
84
  padding: 0 16px;
61
85
  }
62
86
 
63
- .global-comments-popover .comments-panel-body__header .comments-types-count {
87
+ .sdoc-comment-drawer .comments-panel-body__header .comments-types-count {
64
88
  height: 38px;
65
89
  display: flex;
66
90
  justify-content: space-between;
67
91
  align-items: center;
68
92
  padding: 16px 0;
93
+ margin-top: 10px;
94
+ border-top: 1px solid #e1e2e5;
69
95
  }
70
96
 
71
- .global-comments-popover .comments-panel-body__header .comment-type {
97
+ .sdoc-comment-drawer .comments-panel-body__header .comment-type {
72
98
  color: #212529;
73
99
  font-size: 12px;
74
100
  }
75
101
 
76
- .global-comments-popover .comments-panel-body__header .comment-type {
102
+ .sdoc-comment-drawer .comments-panel-body__header .comment-type {
77
103
  color: #212529;
78
104
  font-size: 12px;
79
105
  }
80
106
 
81
- .global-comments-popover .comments-panel-body__header .comment-count-tip {
107
+ .sdoc-comment-drawer .comments-panel-body__header .comment-count-tip {
82
108
  color: #999;
83
109
  font-size: 12px;
84
110
  }
85
111
 
86
- .global-comments-popover .comments-panel-body__content {
112
+ .sdoc-comment-drawer .comments-panel-body__content {
87
113
  flex: 1;
88
114
  display: flex;
89
115
  flex-direction: column;
@@ -92,19 +118,19 @@
92
118
  overflow: auto;
93
119
  }
94
120
 
95
- .global-comments-popover .comments-panel-body__content .sdoc-comment-list-container {
121
+ .sdoc-comment-drawer .comments-panel-body__content .sdoc-comment-list-container {
96
122
  position: relative;
97
123
  }
98
124
 
99
- .global-comments-popover .comments-panel-body__content .comment-ui-container.active {
125
+ .sdoc-comment-drawer .comments-panel-body__content .comment-ui-container.active {
100
126
  left: 0;
101
127
  }
102
128
 
103
- .global-comments-popover .comments-panel-body__content .comment-ui-container.sdoc-resolved {
129
+ .sdoc-comment-drawer .comments-panel-body__content .comment-ui-container.sdoc-resolved {
104
130
  background: #f5f5f5;
105
131
  }
106
132
 
107
- .global-comments-popover .comments-panel-body__content .comment-ui-container.active.sdoc-resolved {
133
+ .sdoc-comment-drawer .comments-panel-body__content .comment-ui-container.active.sdoc-resolved {
108
134
  background: #f5f5f5;
109
135
  }
110
136
 
@@ -114,7 +140,7 @@
114
140
  }
115
141
 
116
142
  /* doc comment add editor */
117
- .global-comments-popover .comments-panel-body .sdoc-doc-comment-editor-container {
143
+ .sdoc-comment-drawer .comments-panel-body .sdoc-doc-comment-editor-container {
118
144
  position: absolute;
119
145
  left: 16px;
120
146
  width: calc(100% - 32px);
@@ -122,18 +148,18 @@
122
148
  top: 78px;
123
149
  }
124
150
 
125
- .global-comments-popover .sdoc-doc-comment-editor-container .comment-ui-container.active {
151
+ .sdoc-comment-drawer .sdoc-doc-comment-editor-container .comment-ui-container.active {
126
152
  left: 0;
127
153
  margin-bottom: 0;
128
154
  }
129
155
 
130
156
  /* custom */
131
- .global-comments-popover .sdoc-comment-list-container .comment-ui-container {
157
+ .sdoc-comment-drawer .sdoc-comment-list-container .comment-ui-container {
132
158
  background-color: #FFF;
133
159
  border: 1px solid #c7c7c7;
134
160
  }
135
161
 
136
- .global-comments-popover .sdoc-comment-list-container .comment-item-selected-text-container {
162
+ .sdoc-comment-drawer .sdoc-comment-list-container .comment-item-selected-text-container {
137
163
  background-color: #F5F5F5;
138
164
  border-bottom: 1px solid #c7c7c7;
139
165
  }