Skip to content
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
274 commits
Select commit Hold shift + click to select a range
10c9ed0
Update comment functionality and reformating code
MD-sunilprajapati Jun 10, 2024
271895a
remove style import
MD-sunilprajapati Jun 10, 2024
f2b7114
Merge pull request #8 from MD-sunilprajapati/try/inline-block-commenting
poojabhimani12 Jun 10, 2024
5e0890c
revert the changes
MD-sunilprajapati Jun 10, 2024
031e8d5
resolved conflicts
poojabhimani12 Jun 10, 2024
6b0c3b3
Merge branch 'poojabhimani12:try/inline-block-commenting' into try/in…
MD-sunilprajapati Jun 10, 2024
d2d6215
Adjust spacing between icons
MD-sunilprajapati Jun 10, 2024
cbee86f
Merge pull request #9 from MD-sunilprajapati/try/inline-block-commenting
poojabhimani12 Jun 10, 2024
b36c2ab
resolved conflicts
poojabhimani12 Jun 10, 2024
b7b1ba4
Fix linting errors
MD-sunilprajapati Jun 11, 2024
6c0862d
Merge pull request #10 from MD-sunilprajapati/try/inline-block-commen…
poojabhimani12 Jun 12, 2024
77ee009
Add experimental condition
MD-sunilprajapati Jun 13, 2024
a8ea60e
Show sidebar on zero comments
MD-sunilprajapati Jun 13, 2024
ec302ff
Add package lock
MD-sunilprajapati Jun 13, 2024
f002607
Merge pull request #11 from MD-sunilprajapati/try/inline-block-commen…
poojabhimani12 Jun 13, 2024
fdc44a3
Update comment
MD-sunilprajapati Jun 14, 2024
bb2c0bd
Merge pull request #12 from MD-sunilprajapati/try/inline-block-commen…
poojabhimani12 Jun 14, 2024
e6ac0b4
Address feedbacks
MD-sunilprajapati Jun 18, 2024
9447911
Use useEntityProp
MD-sunilprajapati Jun 18, 2024
bf84cc4
Update sidebar content on new comment
MD-sunilprajapati Jun 18, 2024
57ed39a
Remove unneccessory changes
MD-sunilprajapati Jun 19, 2024
b9668fd
Relocate border styles for commented blocks
MD-sunilprajapati Jun 19, 2024
6628689
Merge pull request #13 from MD-sunilprajapati/try/inline-block-commen…
poojabhimani12 Jun 19, 2024
1d81922
set initial state instead of mount effect for block class
MD-sunilprajapati Jun 19, 2024
87fe4f9
Fix linting errors
MD-sunilprajapati Jun 19, 2024
139135d
Add dependencies
MD-sunilprajapati Jun 19, 2024
20f2bd3
Merge pull request #14 from MD-sunilprajapati/try/inline-block-commen…
poojabhimani12 Jun 19, 2024
2df0bdb
Merge branch 'WordPress:trunk' into try/inline-block-commenting
poojabhimani12 Jun 19, 2024
515a592
Update package lock
MD-sunilprajapati Jun 19, 2024
08fd837
Merge pull request #15 from MD-sunilprajapati/try/inline-block-commen…
poojabhimani12 Jun 20, 2024
251ae5f
Implement inline commenting
MD-sunilprajapati Jun 20, 2024
e747430
Update doc for collabboard component
MD-sunilprajapati Jun 20, 2024
b7a5bd7
Highlight inline text with comment
MD-sunilprajapati Jun 20, 2024
16d2186
Remove comments and console logs
MD-sunilprajapati Jul 24, 2024
877f090
Merge pull request #16 from MD-sunilprajapati/enabled-inline-commenting
poojabhimani12 Jul 25, 2024
1ce0191
made changes for collab.php file and removed block border color
rishishah-multidots Jul 29, 2024
1a677d8
Merge pull request #17 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Jul 29, 2024
d67d2b1
Resolved conflicts
poojabhimani12 Jul 29, 2024
e0cb8b5
Merge branch 'try/inline-block-commenting' of https://github.com/pooj…
poojabhimani12 Jul 29, 2024
9004004
Update editor-settings.php
poojabhimani12 Jul 29, 2024
d23a0a6
made changes for block comment feature
rishishah-multidots Aug 22, 2024
cf605d5
Merge branch 'try/inline-block-commenting' of github.com:rishishah-mu…
rishishah-multidots Aug 22, 2024
f115c3b
made changes for code_sniffer error on rest_api file
rishishah-multidots Aug 22, 2024
f748ad9
made changes for code_sniffer error on rest_api file
rishishah-multidots Aug 22, 2024
59e96c4
remove readme.md file from collab folder
rishishah-multidots Aug 22, 2024
18e5081
remove static email for comment author
rishishah-multidots Aug 22, 2024
c9f4964
Merge pull request #18 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Aug 22, 2024
1ed6d54
added edit/delete comment from sidebar feature
rishishah-multidots Aug 23, 2024
84733c5
resolve PHP coding standards errors
rishishah-multidots Aug 23, 2024
2d5d162
resolve PHP coding standards errors
rishishah-multidots Aug 23, 2024
e68cdcc
Merge pull request #19 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Aug 23, 2024
8042e22
Resolved Conflicts
poojabhimani12 Aug 28, 2024
ceb188c
Add idenrifier to collab sidebar
MD-sunilprajapati Aug 28, 2024
575361c
Relocate Add Comment button below in more action popover
MD-sunilprajapati Aug 29, 2024
8c45982
Update comment button action to focus new comment form in sidebar on …
MD-sunilprajapati Aug 29, 2024
a2345e8
Merge pull request #20 from MD-sunilprajapati/try/inline-block-commen…
poojabhimani12 Aug 29, 2024
2004c04
Update experimental field lable for commenting functionality
MD-sunilprajapati Aug 29, 2024
8ac8328
Revert format library changes
MD-sunilprajapati Aug 29, 2024
868c095
made changes as per Github
rishishah-multidots Aug 29, 2024
ab73559
Refactor collab sidebar
MD-sunilprajapati Aug 29, 2024
d5df8cc
Refactor collab sidebar
MD-sunilprajapati Aug 29, 2024
533c5d4
Remove unneccessory snapshot tests
MD-sunilprajapati Aug 29, 2024
c0a5dcd
Remove collab board component
MD-sunilprajapati Aug 29, 2024
56e475b
Fix linting errors
MD-sunilprajapati Aug 29, 2024
9de8c69
Merge pull request #21 from MD-sunilprajapati/collab-sidebar-update
poojabhimani12 Aug 29, 2024
4104869
made changes as per Github
rishishah-multidots Aug 29, 2024
b8b0292
made changes as per github feedback
rishishah-multidots Aug 29, 2024
6996e5f
Merge pull request #22 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Aug 29, 2024
0321430
comment board hide/show on Add comment and cancel button
rishishah-multidots Aug 29, 2024
3bf3c4c
Merge pull request #23 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Aug 29, 2024
c66fbcd
Revert format library changes
MD-sunilprajapati Aug 30, 2024
751d727
Sync with trunk and resolved conflicts
MD-sunilprajapati Aug 30, 2024
9a42d64
Merge pull request #24 from MD-sunilprajapati/address-feedbacks
poojabhimani12 Aug 30, 2024
68d5e1c
Merge branch 'WordPress:trunk' into try/inline-block-commenting
poojabhimani12 Aug 30, 2024
1f5a2c2
Focus comment board on comment icon click
MD-sunilprajapati Aug 30, 2024
6477102
Address feedback and create smaller component
MD-sunilprajapati Aug 30, 2024
66832a7
Create comment header component
MD-sunilprajapati Aug 30, 2024
5c70d90
Fix linting errors
MD-sunilprajapati Aug 30, 2024
cc28c6a
Remove logs
MD-sunilprajapati Aug 30, 2024
951d8b4
Fix linting errors
MD-sunilprajapati Aug 30, 2024
b0ad9d5
Merge pull request #25 from MD-sunilprajapati/refactor-collab-sidebar
poojabhimani12 Aug 30, 2024
a5e12e1
made changes as per PR feedback
rishishah-multidots Aug 30, 2024
cf59158
made changes as per PR feedback
rishishah-multidots Aug 30, 2024
6cfdb29
resolve style.scss conflict
rishishah-multidots Aug 30, 2024
465b438
Merge pull request #26 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Aug 30, 2024
c9d50d8
Refactor collab components
MD-sunilprajapati Sep 2, 2024
fd6f327
Implement comment reload on comment crud operation
MD-sunilprajapati Sep 2, 2024
15c85e0
remove string literals for data stores
MD-sunilprajapati Sep 2, 2024
c7be827
remove package json file changes
MD-sunilprajapati Sep 2, 2024
bd1a7ce
Add docs for components
MD-sunilprajapati Sep 2, 2024
19dfab8
Merge pull request #27 from MD-sunilprajapati/refactor-inline-commenting
poojabhimani12 Sep 2, 2024
48ee928
Merge branch 'WordPress:trunk' into try/inline-block-commenting
poojabhimani12 Sep 2, 2024
8fa3f85
remove revert function to show comments in sidebar and show comments …
rishishah-multidots Sep 2, 2024
5f0ae80
remove revert function to show comments in sidebar and show comments …
rishishah-multidots Sep 2, 2024
69d1878
Merge pull request #28 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Sep 2, 2024
d6e01f3
Remove string literels for gutenberg stores
MD-sunilprajapati Sep 2, 2024
668671b
Merge pull request #29 from MD-sunilprajapati/refactor-inline-comment…
poojabhimani12 Sep 2, 2024
ee6fe75
Sync with trunk and resolved conflicts
MD-sunilprajapati Sep 3, 2024
de2cd8f
Sync with trunk
MD-sunilprajapati Sep 3, 2024
8e6da19
Addressed feedback of collab sidebar component
MD-sunilprajapati Sep 3, 2024
90ba459
Merge pull request #30 from MD-sunilprajapati/collab-sidebar-feedbacks
poojabhimani12 Sep 3, 2024
e2fd75a
made changes for feedback
rishishah-multidots Sep 3, 2024
aad19d0
Merge pull request #31 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Sep 3, 2024
6f03c48
Refresh state on every new comment
MD-sunilprajapati Sep 3, 2024
2b057cc
Sync file with trunk
MD-sunilprajapati Sep 3, 2024
59caf1c
made changes for css property
rishishah-multidots Sep 3, 2024
efa41ac
Merge pull request #32 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Sep 3, 2024
4ee210d
code cleanup
MD-sunilprajapati Sep 3, 2024
38bea58
Merge pull request #33 from MD-sunilprajapati/collab-sidebar-cleanup
poojabhimani12 Sep 3, 2024
609cad6
Merge branch 'trunk' of gutenberg
MD-sunilprajapati Sep 4, 2024
8a54986
Update classes name and remove unwanted classes
minaldiwan Sep 4, 2024
2fd78b0
Merge pull request #35 from minaldiwan/try/inline-block-commenting
poojabhimani12 Sep 4, 2024
f236a42
made changes for translators and context
rishishah-multidots Sep 4, 2024
b3c879d
made changes for translators and context
rishishah-multidots Sep 4, 2024
bc308e9
Merge pull request #36 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Sep 4, 2024
11cf1f1
use entity record function instead api fetch
MD-sunilprajapati Sep 4, 2024
22c189a
Sync with origin and resolved coflicts
MD-sunilprajapati Sep 4, 2024
33cd398
small fix for translator string
rishishah-multidots Sep 4, 2024
211944c
Merge pull request #37 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Sep 4, 2024
a4abbec
Fix linting errors
MD-sunilprajapati Sep 4, 2024
5c99dcc
Merge branch 'try/inline-block-commenting' of gutenberg into collab-c…
MD-sunilprajapati Sep 4, 2024
50e8101
fix comment edit issue
MD-sunilprajapati Sep 5, 2024
ce7f7bc
Sync with origin and resolved coflicts
MD-sunilprajapati Sep 5, 2024
b0c5960
Fix linting errors
MD-sunilprajapati Sep 5, 2024
f768b4a
Merge pull request #34 from MD-sunilprajapati/collab-comment-cleanup
poojabhimani12 Sep 5, 2024
92870c4
pipeline error fixes
rishishah-multidots Sep 5, 2024
37fa922
pipeline error fixes and resolve conflicts
rishishah-multidots Sep 5, 2024
4d6841a
Merge pull request #38 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Sep 5, 2024
71f7a39
Fix linting errors
MD-sunilprajapati Sep 5, 2024
6f73a0b
Merge pull request #39 from MD-sunilprajapati/code-cleanup
poojabhimani12 Sep 5, 2024
edab788
Fix style linting issue
MD-sunilprajapati Sep 5, 2024
6e528a1
Fix useMemo dependacy
MD-sunilprajapati Sep 5, 2024
b129367
Merge pull request #40 from MD-sunilprajapati/fix-linting-errors
poojabhimani12 Sep 5, 2024
8d17f22
Remove styling for input and textarea box as per core team feedback
minaldiwan Sep 5, 2024
fd4c045
Merge pull request #41 from minaldiwan/try/inline-block-commenting
poojabhimani12 Sep 5, 2024
4d3eeb1
added error message for add comment on draft mode or duplicate comment
rishishah-multidots Sep 5, 2024
f06340a
Merge branch 'try/inline-block-commenting' of github.com:rishishah-mu…
rishishah-multidots Sep 5, 2024
6b8027a
resolve eslint error and update blockEditorStore feature
rishishah-multidots Sep 5, 2024
06c8526
revert package files as per trunk
rishishah-multidots Sep 5, 2024
e1d4396
revert package files as per main branch
rishishah-multidots Sep 5, 2024
c78f981
Merge pull request #42 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Sep 5, 2024
da72b79
Addressed feedback
MD-sunilprajapati Sep 6, 2024
d7bca6e
cleanup code
MD-sunilprajapati Sep 6, 2024
68d203e
Update context for edit button
MD-sunilprajapati Sep 6, 2024
b296d2d
Merge pull request #43 from MD-sunilprajapati/address-feedback
poojabhimani12 Sep 6, 2024
bddceeb
feedback changes
rishishah-multidots Sep 6, 2024
c5094a0
Merge branch 'try/inline-block-commenting' of github.com:rishishah-mu…
rishishah-multidots Sep 6, 2024
a23241a
feedback changes for comment rest API
rishishah-multidots Sep 6, 2024
9548565
Merge pull request #44 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Sep 6, 2024
06e840f
Merge branch 'WordPress:trunk' into try/inline-block-commenting
poojabhimani12 Sep 6, 2024
3883a11
comment rest api function in condition
rishishah-multidots Sep 6, 2024
334daf2
Merge pull request #45 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Sep 6, 2024
b028876
Merge branch 'WordPress:trunk' into try/inline-block-commenting
poojabhimani12 Sep 9, 2024
cd63f6a
Fix reply comment issue
MD-sunilprajapati Sep 10, 2024
9b12661
Merge pull request #50 from MD-sunilprajapati/fix-reply-comment-issue
poojabhimani12 Sep 10, 2024
f287eff
Remove comment icon
MD-sunilprajapati Sep 10, 2024
16ebd4c
Merge pull request #51 from MD-sunilprajapati/remove-icon
poojabhimani12 Sep 10, 2024
7aa5508
update comment icon code for menu and toolbar group
rishishah-multidots Sep 13, 2024
e55109f
resolve eslint errors
rishishah-multidots Sep 13, 2024
f66d825
revert package-lock file
rishishah-multidots Sep 13, 2024
7ff9a79
Merge pull request #59 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Sep 13, 2024
d01c693
resolve trunk conflicts
rishishah-multidots Sep 16, 2024
2caf2d1
Merge pull request #60 from rishishah-multidots/sync-with-trunk
poojabhimani12 Sep 16, 2024
6bda66d
sync rest-api file with api PR
rishishah-multidots Sep 24, 2024
64b1b31
sync rest-api file with api PR
rishishah-multidots Sep 24, 2024
31ea3b5
Merge pull request #61 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Sep 24, 2024
bdf982f
remove autop package and update code according to it
rishishah-multidots Oct 3, 2024
c5a53a2
remove console statement
rishishah-multidots Oct 3, 2024
c0aee07
remove linting error
rishishah-multidots Oct 3, 2024
1a251ba
remove tag replace code from add/edit/fetch comment
rishishah-multidots Oct 3, 2024
452181d
remove tag replace code from add/edit/fetch comment
rishishah-multidots Oct 3, 2024
898a924
revert rahHRML tag for render comment in sidebar
rishishah-multidots Oct 3, 2024
11d6693
Merge pull request #64 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 3, 2024
0326444
resolve conflict
rishishah-multidots Oct 3, 2024
bf20345
Merge pull request #65 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 3, 2024
c419ce4
Merge branch 'trunk' of github.com:MD-sunilprajapati/gutenberg into s…
MD-sunilprajapati Oct 4, 2024
667163e
Remove unneccessory changes
MD-sunilprajapati Oct 4, 2024
25364d8
Merge pull request #67 from MD-sunilprajapati/sync-with-trunk
poojabhimani12 Oct 4, 2024
5a53245
Add backport changelog
MD-sunilprajapati Oct 4, 2024
f4dd385
Merge pull request #68 from MD-sunilprajapati/backport-log
poojabhimani12 Oct 4, 2024
83a5955
Merge branch 'trunk' of github.com:rishishah-multidots/gutenberg into…
rishishah-multidots Oct 15, 2024
ec1a8b3
Merge pull request #69 from rishishah-multidots/sync-with-trunk
poojabhimani12 Oct 15, 2024
2a4a427
update feedback points regarding classes and typography
minaldiwan Oct 15, 2024
ffc7f51
Merge pull request #70 from minaldiwan/try/inline-block-commenting
poojabhimani12 Oct 15, 2024
0d36a58
feedback changes
rishishah-multidots Oct 15, 2024
ed6e2e6
Merge branch 'try/inline-block-commenting' of github.com:rishishah-mu…
rishishah-multidots Oct 15, 2024
9a6556f
linting error fixes
rishishah-multidots Oct 15, 2024
ebc28ca
Merge pull request #71 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 15, 2024
02bd950
made changes for private API and comment controller
rishishah-multidots Oct 16, 2024
f5be6ac
Merge branch 'try/inline-block-commenting' of github.com:rishishah-mu…
rishishah-multidots Oct 16, 2024
973f559
remove comment code and added comment controller file
rishishah-multidots Oct 16, 2024
e3c49b7
Merge pull request #72 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 16, 2024
ab1395c
fix conding standerds warnings and error
rishishah-multidots Oct 16, 2024
f9f24d9
fix coding standard warnings and error
rishishah-multidots Oct 16, 2024
63f915f
fix coding standard warnings and error
rishishah-multidots Oct 16, 2024
fc43c1e
Merge pull request #73 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 16, 2024
68c5272
Implement confirmDialog box for delete and resolve comment box
minaldiwan Oct 17, 2024
3d14991
Merge pull request #74 from minaldiwan/try/inline-block-commenting
poojabhimani12 Oct 17, 2024
6b32fcf
feedback changes
rishishah-multidots Oct 17, 2024
9db107b
Merge branch 'try/inline-block-commenting' of github.com:rishishah-mu…
rishishah-multidots Oct 17, 2024
c92de93
made changes to hide block_comment from admin screen
rishishah-multidots Oct 17, 2024
97a6d6e
fix coding standard warnings and error
rishishah-multidots Oct 17, 2024
0136fae
fix coding standard warnings and error
rishishah-multidots Oct 17, 2024
13f53d8
fix coding standard warnings and error
rishishah-multidots Oct 17, 2024
4d0ca6e
fix coding standard warnings and error
rishishah-multidots Oct 17, 2024
c5b76e8
updated doc file
rishishah-multidots Oct 17, 2024
02aabd9
Merge pull request #75 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 17, 2024
65e1eb4
Merge branch 'trunk' of github.com:rishishah-multidots/gutenberg into…
rishishah-multidots Oct 17, 2024
e3bc354
Merge pull request #76 from rishishah-multidots/sync-with-trunk
poojabhimani12 Oct 17, 2024
c8ff644
fix delete comment on reply feedback
rishishah-multidots Oct 18, 2024
8cd46c3
Merge pull request #77 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 18, 2024
45f9553
fix private API import from same API test cases fail errors
rishishah-multidots Oct 21, 2024
27ab929
Merge branch 'try/inline-block-commenting' of github.com:rishishah-mu…
rishishah-multidots Oct 21, 2024
b9017a4
Merge pull request #78 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 21, 2024
e3cb45b
fix e2e error while testing
rishishah-multidots Oct 21, 2024
c4d4b1d
made conditional changes for default attributes
rishishah-multidots Oct 21, 2024
345c227
Merge pull request #79 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 21, 2024
7a6c085
made openGeneralSidebar to private
rishishah-multidots Oct 21, 2024
aa2d47b
Merge pull request #80 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 21, 2024
7ce91e9
made changes as per the feedback
rishishah-multidots Oct 22, 2024
4cd5835
made changes as per the feedback
rishishah-multidots Oct 22, 2024
00076ff
made changes as per the feedback
rishishah-multidots Oct 22, 2024
7bf2c78
Merge pull request #81 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 22, 2024
514853c
made changes as per the feedback
rishishah-multidots Oct 22, 2024
4b59a86
made changes as per the feedback
rishishah-multidots Oct 22, 2024
1cfd88e
Merge pull request #82 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 22, 2024
45f6ac9
made changes as per the feedback
rishishah-multidots Oct 22, 2024
42a4eb2
Merge pull request #83 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 22, 2024
e42e647
remove components fields css
minaldiwan Oct 23, 2024
8744c83
made changes as per the feedback
rishishah-multidots Oct 23, 2024
127228b
Merge branch 'poojabhimani12:try/inline-block-commenting' into try/in…
rishishah-multidots Oct 23, 2024
5781530
Merge pull request #84 from minaldiwan/try/inline-block-commenting
poojabhimani12 Oct 23, 2024
ca54345
Merge pull request #85 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 23, 2024
2e212c1
made changes as per the feedback
rishishah-multidots Oct 23, 2024
4b8986b
Merge pull request #86 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 23, 2024
b42cd97
made changes as per the feedback
rishishah-multidots Oct 23, 2024
30ddf61
Merge pull request #87 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 23, 2024
e446297
made changes as per the feedback
rishishah-multidots Oct 23, 2024
1955469
made changes as per the feedback
rishishah-multidots Oct 23, 2024
22893f8
Merge pull request #88 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 23, 2024
b89ce85
made changes as per the feedback
rishishah-multidots Oct 23, 2024
3f9d745
Merge pull request #89 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 23, 2024
90b038b
define empty array outside the component
rishishah-multidots Oct 23, 2024
b7c0c46
Merge pull request #90 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 23, 2024
48c3351
made changes to compatible with FSE
rishishah-multidots Oct 23, 2024
7c00570
Merge pull request #91 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 23, 2024
047e07f
made changes to compatible with FSE
rishishah-multidots Oct 23, 2024
a342e27
Merge pull request #92 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 23, 2024
ae50d7a
fix lint error
rishishah-multidots Oct 23, 2024
2ca51c3
Merge pull request #93 from rishishah-multidots/try/inline-block-comm…
poojabhimani12 Oct 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions lib/collab.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should move within the experimental folder, otherwise it will be backported to core.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved within Experimental folder

/**
* Functions to support collaboration.
*
* @package gutenberg
*/

if ( ! function_exists( 'register_post_meta_for_collab_comment' ) ) {
/**
* Registers the collab meta field required for comments to work.
*
* @since // TODO: Add version number.
*/
function register_post_meta_for_collab_comment() {
$post_types = get_post_types( array( 'show_in_rest' => true ) );

foreach ( $post_types as $post_type ) {
// Only register the meta field if the post type supports the editor, custom fields, and revisions.
if (
post_type_supports( $post_type, 'editor' ) &&
post_type_supports( $post_type, 'custom-fields' ) &&
post_type_supports( $post_type, 'revisions' )
) {
register_post_meta(
$post_type,
'collab',
array(
'show_in_rest' => true,
'single' => true,
'type' => 'string',
'revisions_enabled' => true,
)
);
}
}
}
}

/*
* Most post types are registered at priority 10, so use priority 20 here in
* order to catch them.
*/
add_action( 'init', 'register_post_meta_for_collab_comment', 20 );
3 changes: 3 additions & 0 deletions lib/experimental/editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ function gutenberg_enable_experiments() {
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-zoomed-out-patterns-tab', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnableZoomedOutPatternsTab = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-block-comment', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnableBlockComment = true', 'before' );
}
}

add_action( 'admin_init', 'gutenberg_enable_experiments' );
Expand Down
12 changes: 12 additions & 0 deletions lib/experiments-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,18 @@ function gutenberg_initialize_experiments_settings() {
)
);

add_settings_field(
'gutenberg-block-comment',
__( 'Enable block Comment', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Enable Block Comment', 'gutenberg' ),
'id' => 'gutenberg-block-comment',
)
);

register_setting(
'gutenberg-experiments',
'gutenberg-experiments'
Expand Down
1 change: 1 addition & 0 deletions lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

require_once __DIR__ . '/init.php';
require_once __DIR__ . '/upgrade.php';
require_once __DIR__ . '/collab.php';

/**
* Checks whether the Gutenberg experiment is enabled.
Expand Down
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ _Returns_

- `string`: Processed string

### CollabSidebar

Renders the Collab sidebar.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should remain a private API


### ColorPalette

> **Deprecated** since 5.3, use `wp.blockEditor.ColorPalette` instead.
Expand Down
184 changes: 184 additions & 0 deletions packages/editor/src/components/collab-sidebar/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import {
comment as commentIcon,
commentAuthorAvatar as userIcon,
Icon,
check as resolvedIcon,
} from '@wordpress/icons';
import { useSelect } from '@wordpress/data';
import {
__experimentalHStack as HStack,
__experimentalVStack as VStack,
__experimentalText as Text,
} from '@wordpress/components';
import { dateI18n, format, getSettings } from '@wordpress/date';

/**
* Internal dependencies
*/
import PluginSidebar from '../plugin-sidebar';
import { store as editorStore } from '../../store';

const isBlockCommentExperimentEnabled =
window?.__experimentalEnableBlockComment;

/**
* Renders the Collab sidebar.
*/
export default function CollabSidebar() {
const { threads } = useSelect( ( select ) => {
const post = select( editorStore ).getCurrentPost();

return {
threads: post?.meta?.collab ? JSON.parse( post.meta.collab ) : [],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this create problem if there's a large enough number of comments on a post? Could it be lazy loaded in some way to work around this problem? Thinking in terms of google docs, you have to scroll both on the page and on the comments dropdown to see all the comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have implemented a feature where the sidebar displays if any comment is open. However, we have now changed the flow so that the sidebar will be visible even if there are no collaborative activities.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have conducted testing and believe that a large number of comments will not have a significant impact. Once the flow is finalized, we can definitely implement lazy loading.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't return a new array instance on every select call. Otherwise this will excessively re-render when there is no meta and the store changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it

};
}, [] );

// Check if the experimental flag is enabled and thread count is greater than zero.
if (
! isBlockCommentExperimentEnabled ||
Object.keys( threads ).length === 0
) {
return null; // or maybe return some message indicating no threads are available.
}

// Get the date time format from WordPress settings.
const dateTimeFormat = getSettings().formats.datetime;

return (
<PluginSidebar
name="collab-activities"
title={ __( 'Collab Activities' ) }
icon={ commentIcon }
>
<div className="editor-collab-sidebar__activities">
{ Object.values( threads )
.reverse()
.map( ( thread, index ) => (
<VStack
key={ index }
className="editor-collab-sidebar__thread"
spacing="3"
>
<HStack
alignment="left"
spacing="3"
justify="flex-start"
>
<Icon
icon={ userIcon }
className="editor-collab-sidebar__userIcon"
size={ 35 }
/>
<VStack spacing="1">
<span className="editor-collab-sidebar__userName">
{ thread.createdBy }
</span>
<time
dateTime={ format(
'c',
thread.createdAt
) }
>
{ dateI18n(
dateTimeFormat,
thread.createdAt
) }
</time>
</VStack>
</HStack>
{ thread.comments.map( ( comment ) => (
<VStack
key={ comment.commentId }
className="editor-collab-sidebar__comment"
>
<HStack
alignment="center"
spacing="3"
justify="flex-start"
>
<Icon
icon={ userIcon }
className="editor-collab-sidebar__userIcon"
size={ 35 }
/>
<VStack spacing="1">
<span className="editor-collab-sidebar__userName">
{ comment.createdBy }
</span>
<time
dateTime={ format(
'c',
comment.createdAt
) }
>
{ dateI18n(
dateTimeFormat,
comment.createdAt
) }
</time>
</VStack>
</HStack>
<HStack
alignment="center"
spacing="1"
justify="flex-start"
>
{ comment.comment }
</HStack>
</VStack>
) ) }
{ thread.isResolved && (
<VStack className="editor-collab-sidebar__resolved">
<HStack
alignment="center"
spacing="3"
justify="flex-start"
>
<Icon
icon={ userIcon }
className="editor-collab-sidebar__userIcon"
size={ 35 }
/>
<VStack spacing="1">
<span className="editor-collab-sidebar__userName">
{ thread.resolvedBy }
</span>
<time
dateTime={ format(
'c',
thread.resolvedAt
) }
>
{ dateI18n(
dateTimeFormat,
thread.resolvedAt
) }
</time>
</VStack>
</HStack>
<HStack
alignment="center"
spacing="1"
justify="flex-start"
>
<Icon
icon={ resolvedIcon }
size={ 20 }
className="editor-collab-sidebar__resolvedIcon"
/>
<Text className="editor-collab-sidebar__resolvedText">
{ __( 'Marked as resolved' ) }
</Text>
</HStack>
</VStack>
) }
</VStack>
) ) }
</div>
</PluginSidebar>
);
}
46 changes: 46 additions & 0 deletions packages/editor/src/components/collab-sidebar/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.editor-collab-sidebar {
&__activities {
background-color: #f3f5f6;
}

&__thread {
padding: 20px;
&:not(:last-child) {
border-bottom: 1px solid $gray-300;
}
}

&__comment,
&__resolved {
border: 1px solid $gray-300;
border-radius: 5px;
padding: 10px 15px;
background-color: #fff;
}

&__userName {
font-size: 14px;
text-transform: capitalize;
}

&__userIcon {
border: 1px solid #c5c5c5;
}

&__resolvedIcon {
fill: #008000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not use .components-* classnames in your styles, as they are not public APIs and are not meant to be used externally to the components.

Also, please do not override "internal" component styles, as it defeats the purpose of using a shared component library.

border-radius: 50%;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above re. border radii

width: 18px;
height: 18px;
border: 1px solid #008000;
margin-right: 2px;
margin-top: 5px;
}

&__resolvedText {
font-style: italic;
font-weight: 500 !important;
color: #808080 !important;
margin-top: 5px !important;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do no use !important if possible.

}
}
2 changes: 2 additions & 0 deletions packages/editor/src/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { store as blockEditorStore } from '@wordpress/block-editor';
/**
* Internal dependencies
*/
import CollabSidebar from '../collab-sidebar';
import BackButton from './back-button';
import CollapsableBlockToolbar from '../collapsible-block-toolbar';
import DocumentBar from '../document-bar';
Expand Down Expand Up @@ -149,6 +150,7 @@ function Header( {
}
/>
) }
<CollabSidebar />
{ customSaveButton }
{ ( isWideViewport || ! showIconLabels ) && (
<PinnedItems.Slot scope="core" />
Expand Down
1 change: 1 addition & 0 deletions packages/editor/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export { default as UnsavedChangesWarning } from './unsaved-changes-warning';
export { default as WordCount } from './word-count';
export { default as TimeToRead } from './time-to-read';
export { default as CharacterCount } from './character-count';
export { default as CollabSidebar } from './collab-sidebar';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's export this as a private API.


// State Related Components.
export { default as EditorProvider } from './provider';
Expand Down
1 change: 1 addition & 0 deletions packages/editor/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

@import "./components/autocompleters/style.scss";
@import "./components/block-manager/style.scss";
@import "./components/collab-sidebar/style.scss";
@import "./components/collapsible-block-toolbar/style.scss";
@import "./components/create-template-part-modal/style.scss";
@import "./components/block-settings-menu/style.scss";
Expand Down
1 change: 1 addition & 0 deletions packages/format-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@wordpress/block-editor": "file:../block-editor",
"@wordpress/components": "file:../components",
"@wordpress/compose": "file:../compose",
"@wordpress/core-data": "^7.0.0",
"@wordpress/data": "file:../data",
"@wordpress/element": "file:../element",
"@wordpress/html-entities": "file:../html-entities",
Expand Down
Loading