From a1e5b511ebb98165770db33cbe65158dafb9ffac Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Tue, 26 Jul 2022 18:04:54 +0530 Subject: [PATCH] chore: Deprecation warning for comments (#15363) Adds deprecation warning for comments Resolves #15364 --- app/client/cypress.json | 6 +- .../src/comments/AppComments/AppComments.tsx | 17 ++ .../src/notifications/NotificationsList.tsx | 15 ++ .../src/pages/Editor/ToggleModeButton.tsx | 30 ++- .../resources/email/commentAddedTemplate.html | 242 ++++++++++-------- 5 files changed, 186 insertions(+), 124 deletions(-) diff --git a/app/client/cypress.json b/app/client/cypress.json index a8d3c6ae99..45c66447fb 100644 --- a/app/client/cypress.json +++ b/app/client/cypress.json @@ -14,7 +14,9 @@ "json": false }, "ignoreTestFiles": [ - "**/Smoke_TestSuite/Application/PgAdmin_spec*.js" + "**/Smoke_TestSuite/Application/PgAdmin_spec*.js", + "**/Smoke_TestSuite/ClientSideTests/Git/GitSync/Comments_spec*.js", + "**/Smoke_TestSuite/ClientSideTests/OtherUIFeatures/AddComments_spec*.js" ], "chromeWebSecurity": false, "viewportHeight": 1100, @@ -23,4 +25,4 @@ "runMode": 1, "openMode": 0 } -} \ No newline at end of file +} diff --git a/app/client/src/comments/AppComments/AppComments.tsx b/app/client/src/comments/AppComments/AppComments.tsx index cfb37cda93..26a82dafaf 100644 --- a/app/client/src/comments/AppComments/AppComments.tsx +++ b/app/client/src/comments/AppComments/AppComments.tsx @@ -4,6 +4,9 @@ import { useSelector } from "react-redux"; import { commentModeSelector } from "selectors/commentsSelectors"; import AppCommentsHeader from "./AppCommentsHeader"; import AppCommentThreads from "./AppCommentThreads"; +import { Colors } from "constants/Colors"; +import { IconSize } from "components/ads"; +import { BannerMessage } from "components/ads/BannerMessage"; function AppComments() { const isCommentMode = useSelector(commentModeSelector); @@ -15,6 +18,20 @@ function AppComments() { className={`absolute top-0 left-0 flex flex-col w-full h-full bg-white ${tailwindLayers.appComments}`} > + ); diff --git a/app/client/src/notifications/NotificationsList.tsx b/app/client/src/notifications/NotificationsList.tsx index 620a04a807..b2d0958d25 100644 --- a/app/client/src/notifications/NotificationsList.tsx +++ b/app/client/src/notifications/NotificationsList.tsx @@ -33,6 +33,7 @@ import { import { ReactComponent as EmptyState } from "assets/icons/comments/notifications-empty-state.svg"; import { Colors } from "constants/Colors"; +import { BannerMessage } from "components/ads/BannerMessage"; const Container = styled.div` width: 326px; @@ -111,6 +112,20 @@ function NotificationsList() { return ( + {notifications.length > 0 ? ( { } if (updatedIsCommentMode && !currentUser?.commentOnboardingState) { - AnalyticsUtil.logEvent("COMMENTS_ONBOARDING_MODAL_TRIGGERED"); - dispatch(showCommentsIntroCarousel()); - setCommentModeInUrl(false); + // Deprecating. Do not onboard more users + // TODO Remove after deprecation of comments + Toaster.show({ + text: "Show error here", + variant: Variant.warning, + }); + // AnalyticsUtil.logEvent("COMMENTS_ONBOARDING_MODAL_TRIGGERED"); + // dispatch(showCommentsIntroCarousel()); + // setCommentModeInUrl(false); } else { setCommentModeInStore(updatedIsCommentMode); } @@ -274,10 +280,14 @@ function CommentModeBtn({ > - Comment Mode - C - +
+ + Comment Mode +
+ (Deprecating soon) +
+ C +
} hoverOpenDelay={1000} position="bottom" diff --git a/app/server/appsmith-server/src/main/resources/email/commentAddedTemplate.html b/app/server/appsmith-server/src/main/resources/email/commentAddedTemplate.html index 9b4882f153..d616b278f6 100644 --- a/app/server/appsmith-server/src/main/resources/email/commentAddedTemplate.html +++ b/app/server/appsmith-server/src/main/resources/email/commentAddedTemplate.html @@ -16,133 +16,133 @@ + .column { + display: block !important; + width: 100% !important; + padding-left: 0 !important; + padding-right: 0 !important; + margin-left: 0 !important; + margin-right: 0 !important; + } + } +
+ data-body-style="font-size:14px; font-family:arial,helvetica,sans-serif; color:#000000; background-color:#FFFFFF;">
+ cellspacing="0" border="0">
@@ -157,16 +157,16 @@ + style="width:100%; max-width:600px;" align="center">
+ style="padding:0px 0px 0px 0px; color:#000000; text-align:left;" + bgcolor="#ffffff" width="100%" align="left"> + data-type="preheader" border="0" cellpadding="0" + cellspacing="0" width="100%" + style="display: none !important; mso-hide: all; visibility: hidden; opacity: 0; color: transparent; height: 0; width: 0;"> + border="0" cellpadding="0" cellspacing="0" width="100%" + style="table-layout: fixed;"> + + +
+ valign="top" align="center"> +
+ +
+
+ +
+ + Commenting is deprecated
+ We will be removing comments from Appsmith in v1.7.11
+ Learn More +
+
+ +
@@ -190,13 +208,13 @@
+ cellpadding="0" cellspacing="0" width="100%" + style="table-layout: fixed;">
+ height="100%" valign="top" bgcolor="#ffffff" + role="module-content">
{{Commenter_Name}}, {{#NewComment}} added {{/NewComment}} @@ -214,10 +232,10 @@ {{/Comment_Body}}
VIEW THE COMMENT + style="background-color:#ff6d2d; border:1px solid #ff6d2d; border-color:#ff6d2d; border-width:1px; color:#ffffff; display:inline-block; font-weight:400; letter-spacing:0px; line-height:6px; padding:12px 18px 12px 18px; text-align:center; text-decoration:none; border-style:solid; font-family:tahoma,geneva,sans-serif; font-size:16px;" + target="_blank">VIEW THE COMMENT
- +