Skip to content

Commit f0c19f6

Browse files
committed
Revert "Merge pull request #38 from velt-js/master-sample-app-loading-guard"
This reverts commit da7a4ea, reversing changes made to 09295c5.
1 parent da7a4ea commit f0c19f6

File tree

17 files changed

+171
-271
lines changed

17 files changed

+171
-271
lines changed

apps/react/comments/dashboard/custom/dashboard-demo/components/velt/VeltCollaboration.tsx

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use client";
2-
import { useVeltClient, useVeltInitState, VeltComments } from "@veltdev/react";
2+
import { useVeltClient, VeltComments } from "@veltdev/react";
33
import VeltInitializeDocument from "./VeltInitializeDocument";
44
import { VeltCustomization } from "./ui-customization/VeltCustomization";
55
import { useEffect } from "react";
@@ -9,8 +9,6 @@ export function VeltCollaboration() {
99
const { isUserLoggedIn } = useAppUser();
1010
// [Velt] Get Velt client instance
1111
const { client } = useVeltClient();
12-
// [Velt] Check if Velt is fully initialized (user authenticated + document set)
13-
const veltInitialized = useVeltInitState();
1412

1513
// [Velt] Sign out user when user logs out, getting user login state from host app
1614
useEffect(() => {
@@ -22,17 +20,15 @@ export function VeltCollaboration() {
2220
return (
2321
<>
2422
<VeltInitializeDocument />
25-
{veltInitialized && (
26-
<VeltComments
27-
popoverTriangleComponent={false}
28-
popoverMode={true}
29-
shadowDom={false}
30-
textMode={false}
31-
commentPinHighlighter={false}
32-
dialogOnHover={false}
33-
priority={true}
34-
/>
35-
)}
23+
<VeltComments
24+
popoverTriangleComponent={false}
25+
popoverMode={true}
26+
shadowDom={false}
27+
textMode={false}
28+
commentPinHighlighter={false}
29+
dialogOnHover={false}
30+
priority={true}
31+
/>
3632

3733
<VeltCustomization />
3834
</>

apps/react/comments/dashboard/inline-comments/dashboard-inline-comments-demo/components/velt/VeltCollaboration.tsx

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use client";
2-
import { useVeltClient, useVeltInitState, VeltComments, VeltCommentsSidebar } from "@veltdev/react";
2+
import { useVeltClient, VeltComments, VeltCommentsSidebar } from "@veltdev/react";
33
import VeltInitializeDocument from "./VeltInitializeDocument";
44
import { VeltCustomization } from "./ui-customization/VeltCustomization";
55
import { useEffect } from "react";
@@ -9,8 +9,6 @@ export function VeltCollaboration() {
99
const { isUserLoggedIn } = useAppUser();
1010
// [Velt] Get Velt client instance
1111
const { client } = useVeltClient();
12-
// [Velt] Check if Velt is fully initialized (user authenticated + document set)
13-
const veltInitialized = useVeltInitState();
1412

1513
// [Velt] Sign out user when user logs out, getting user login state from host app
1614
useEffect(() => {
@@ -26,20 +24,16 @@ export function VeltCollaboration() {
2624
return (
2725
<>
2826
<VeltInitializeDocument />
29-
{veltInitialized && (
30-
<>
31-
<VeltComments
32-
popoverTriangleComponent={false}
33-
popoverMode={true}
34-
shadowDom={false}
35-
textMode={false}
36-
commentPinHighlighter={false}
37-
dialogOnHover={false}
38-
groupMatchedComments={true}
39-
/>
40-
<VeltCommentsSidebar shadowDom={false} groupConfig={groupConfig} pageMode={true} sortData="asc" />
41-
</>
42-
)}
27+
<VeltComments
28+
popoverTriangleComponent={false}
29+
popoverMode={true}
30+
shadowDom={false}
31+
textMode={false}
32+
commentPinHighlighter={false}
33+
dialogOnHover={false}
34+
groupMatchedComments={true}
35+
/>
36+
<VeltCommentsSidebar shadowDom={false} groupConfig={groupConfig} pageMode={true} sortData="asc" />
4337

4438
<VeltCustomization />
4539
</>

apps/react/comments/dashboard/self-hosting/dashboard-mongo-db-demo/components/velt/VeltCollaboration.tsx

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22
import { useAppUser } from "@/app/userAuth/AppUserContext";
3-
import { useVeltClient, useVeltInitState, VeltComments, VeltCommentsSidebar } from "@veltdev/react";
3+
import { useVeltClient, VeltComments, VeltCommentsSidebar } from "@veltdev/react";
44
import { useEffect } from "react";
55
import VeltInitializeDocument from "./VeltInitializeDocument";
66
import { VeltCustomization } from "./ui-customization/VeltCustomization";
@@ -10,8 +10,6 @@ export function VeltCollaboration() {
1010
const { isUserLoggedIn } = useAppUser();
1111
// [Velt] Get Velt client instance
1212
const { client } = useVeltClient();
13-
// [Velt] Check if Velt is fully initialized (user authenticated + document set)
14-
const veltInitialized = useVeltInitState();
1513

1614
const selectedJob = useSelectedJob();
1715

@@ -29,29 +27,25 @@ export function VeltCollaboration() {
2927
return (
3028
<>
3129
<VeltInitializeDocument />
32-
{veltInitialized && (
33-
<>
34-
<VeltComments
35-
popoverTriangleComponent={false}
36-
popoverMode={true}
37-
shadowDom={false}
38-
textMode={false}
39-
commentPinHighlighter={false}
40-
dialogOnHover={false}
41-
groupMatchedComments={true}
42-
// readOnly={true} // Uncomment this to make the comments read-only for certain users
43-
/>
44-
<VeltCommentsSidebar
45-
context={{ jobId: selectedJob?.id, jobName: selectedJob?.jobName, jobStatus: selectedJob?.status, commentType: 'jobLevel' }}
46-
shadowDom={false}
47-
groupConfig={groupConfig}
48-
pageMode={true}
49-
sortData="asc"
50-
focusedThreadMode={true}
51-
// readOnly={true}
52-
/>
53-
</>
54-
)}
30+
<VeltComments
31+
popoverTriangleComponent={false}
32+
popoverMode={true}
33+
shadowDom={false}
34+
textMode={false}
35+
commentPinHighlighter={false}
36+
dialogOnHover={false}
37+
groupMatchedComments={true}
38+
// readOnly={true} // Uncomment this to make the comments read-only for certain users
39+
/>
40+
<VeltCommentsSidebar
41+
context={{ jobId: selectedJob?.id, jobName: selectedJob?.jobName, jobStatus: selectedJob?.status, commentType: 'jobLevel' }}
42+
shadowDom={false}
43+
groupConfig={groupConfig}
44+
pageMode={true}
45+
sortData="asc"
46+
focusedThreadMode={true}
47+
// readOnly={true}
48+
/>
5549

5650
<VeltCustomization />
5751
</>

apps/react/comments/dashboard/self-hosting/dashboard-postgres-demo/components/velt/VeltCollaboration.tsx

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22
import { useAppUser } from "@/app/userAuth/AppUserContext";
3-
import { useVeltClient, useVeltInitState, VeltComments, VeltCommentsSidebar } from "@veltdev/react";
3+
import { useVeltClient, VeltComments, VeltCommentsSidebar } from "@veltdev/react";
44
import { useEffect } from "react";
55
import VeltInitializeDocument from "./VeltInitializeDocument";
66
import { VeltCustomization } from "./ui-customization/VeltCustomization";
@@ -10,8 +10,6 @@ export function VeltCollaboration() {
1010
const { isUserLoggedIn } = useAppUser();
1111
// [Velt] Get Velt client instance
1212
const { client } = useVeltClient();
13-
// [Velt] Check if Velt is fully initialized (user authenticated + document set)
14-
const veltInitialized = useVeltInitState();
1513

1614
const selectedJob = useSelectedJob();
1715

@@ -29,29 +27,25 @@ export function VeltCollaboration() {
2927
return (
3028
<>
3129
<VeltInitializeDocument />
32-
{veltInitialized && (
33-
<>
34-
<VeltComments
35-
popoverTriangleComponent={false}
36-
popoverMode={true}
37-
shadowDom={false}
38-
textMode={false}
39-
commentPinHighlighter={false}
40-
dialogOnHover={false}
41-
groupMatchedComments={true}
42-
// readOnly={true} // Uncomment this to make the comments read-only for certain users
43-
/>
44-
<VeltCommentsSidebar
45-
context={{ jobId: selectedJob?.id, jobName: selectedJob?.jobName, jobStatus: selectedJob?.status, commentType: 'jobLevel' }}
46-
shadowDom={false}
47-
groupConfig={groupConfig}
48-
pageMode={true}
49-
sortData="asc"
50-
focusedThreadMode={true}
51-
// readOnly={true}
52-
/>
53-
</>
54-
)}
30+
<VeltComments
31+
popoverTriangleComponent={false}
32+
popoverMode={true}
33+
shadowDom={false}
34+
textMode={false}
35+
commentPinHighlighter={false}
36+
dialogOnHover={false}
37+
groupMatchedComments={true}
38+
// readOnly={true} // Uncomment this to make the comments read-only for certain users
39+
/>
40+
<VeltCommentsSidebar
41+
context={{ jobId: selectedJob?.id, jobName: selectedJob?.jobName, jobStatus: selectedJob?.status, commentType: 'jobLevel' }}
42+
shadowDom={false}
43+
groupConfig={groupConfig}
44+
pageMode={true}
45+
sortData="asc"
46+
focusedThreadMode={true}
47+
// readOnly={true}
48+
/>
5549

5650
<VeltCustomization />
5751
</>

apps/react/comments/tables/ag-grid/comment-aggregation/components/velt/VeltCollaboration.tsx

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use client";
2-
import { useVeltClient, useVeltInitState, VeltComments, VeltCommentsSidebar } from "@veltdev/react";
2+
import { useVeltClient, VeltComments, VeltCommentsSidebar } from "@veltdev/react";
33
import VeltInitializeDocument from "./VeltInitializeDocument";
44
import { VeltCustomization } from "./ui-customization/VeltCustomization";
55
import { useEffect } from "react";
@@ -9,8 +9,6 @@ export function VeltCollaboration() {
99
const { isUserLoggedIn } = useAppUser();
1010
// [Velt] Get Velt client instance
1111
const { client } = useVeltClient();
12-
// [Velt] Check if Velt is fully initialized (user authenticated + document set)
13-
const veltInitialized = useVeltInitState();
1412

1513
// [Velt] Sign out user when user logs out, getting user login state from host app
1614
useEffect(() => {
@@ -26,21 +24,17 @@ export function VeltCollaboration() {
2624
return (
2725
<>
2826
<VeltInitializeDocument />
29-
{veltInitialized && (
30-
<>
31-
<VeltComments
32-
popoverTriangleComponent={false}
33-
popoverMode={true}
34-
shadowDom={false}
35-
textMode={false}
36-
commentPinHighlighter={false}
37-
dialogOnHover={false}
38-
groupMatchedComments={true}
39-
priority={true}
40-
/>
41-
<VeltCommentsSidebar groupConfig={groupConfig} />
42-
</>
43-
)}
27+
<VeltComments
28+
popoverTriangleComponent={false}
29+
popoverMode={true}
30+
shadowDom={false}
31+
textMode={false}
32+
commentPinHighlighter={false}
33+
dialogOnHover={false}
34+
groupMatchedComments={true}
35+
priority={true}
36+
/>
37+
<VeltCommentsSidebar groupConfig={groupConfig} />
4438
<VeltCustomization />
4539
</>
4640
);

apps/react/comments/tables/ag-grid/multiple-tools/components/velt/VeltCollaboration.tsx

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use client";
2-
import { useVeltClient, useVeltInitState, VeltComments, VeltCommentsSidebar } from "@veltdev/react";
2+
import { useVeltClient, VeltComments, VeltCommentsSidebar } from "@veltdev/react";
33
import VeltInitializeDocument from "./VeltInitializeDocument";
44
import { VeltCustomization } from "./ui-customization/VeltCustomization";
55
import { useEffect } from "react";
@@ -8,8 +8,6 @@ import { useAppUser } from "@/app/userAuth/AppUserContext";
88
export function VeltCollaboration() {
99
const { isUserLoggedIn } = useAppUser();
1010
const { client } = useVeltClient();
11-
// [Velt] Check if Velt is fully initialized (user authenticated + document set)
12-
const veltInitialized = useVeltInitState();
1311

1412
// [Velt] Sign out user when user logs out, getting user login state from host app
1513
useEffect(() => {
@@ -25,18 +23,14 @@ export function VeltCollaboration() {
2523
return (
2624
<>
2725
<VeltInitializeDocument />
28-
{veltInitialized && (
29-
<>
30-
<VeltComments
31-
popoverMode={true}
32-
shadowDom={false}
33-
textMode={false}
34-
commentPinHighlighter={false}
35-
dialogOnHover={false}
36-
/>
37-
<VeltCommentsSidebar groupConfig={groupConfig} />
38-
</>
39-
)}
26+
<VeltComments
27+
popoverMode={true}
28+
shadowDom={false}
29+
textMode={false}
30+
commentPinHighlighter={false}
31+
dialogOnHover={false}
32+
/>
33+
<VeltCommentsSidebar groupConfig={groupConfig} />
4034
<VeltCustomization />
4135
</>
4236
);

apps/react/comments/tables/ag-grid/single-tool/components/velt/VeltCollaboration.tsx

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use client";
2-
import { useVeltClient, useVeltInitState, VeltComments, VeltCommentsSidebar } from "@veltdev/react";
2+
import { useVeltClient, VeltComments, VeltCommentsSidebar } from "@veltdev/react";
33
import VeltInitializeDocument from "./VeltInitializeDocument";
44
import { VeltCustomization } from "./ui-customization/VeltCustomization";
55
import { useEffect } from "react";
@@ -8,8 +8,6 @@ import { useAppUser } from "@/app/userAuth/AppUserContext";
88
export function VeltCollaboration() {
99
const { isUserLoggedIn } = useAppUser();
1010
const { client } = useVeltClient();
11-
// [Velt] Check if Velt is fully initialized (user authenticated + document set)
12-
const veltInitialized = useVeltInitState();
1311

1412
// [Velt] Sign out user when user logs out, getting user login state from host app
1513
useEffect(() => {
@@ -25,20 +23,16 @@ export function VeltCollaboration() {
2523
return (
2624
<>
2725
<VeltInitializeDocument />
28-
{veltInitialized && (
29-
<>
30-
{/* [Velt] Enable comments in popover mode */}
31-
<VeltComments
32-
popoverMode={true}
33-
shadowDom={false}
34-
textMode={false}
35-
commentPinHighlighter={false}
36-
dialogOnHover={false}
37-
/>
38-
{/* [Velt] Comments sidebar panel */}
39-
<VeltCommentsSidebar groupConfig={groupConfig} />
40-
</>
41-
)}
26+
{/* [Velt] Enable comments in popover mode */}
27+
<VeltComments
28+
popoverMode={true}
29+
shadowDom={false}
30+
textMode={false}
31+
commentPinHighlighter={false}
32+
dialogOnHover={false}
33+
/>
34+
{/* [Velt] Comments sidebar panel */}
35+
<VeltCommentsSidebar groupConfig={groupConfig} />
4236
<VeltCustomization />
4337
</>
4438
);

0 commit comments

Comments
 (0)