From 6e1e832d6593e4d1c344935b0e28d1ca1b3781ae Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Tue, 26 Nov 2024 21:42:56 +0500 Subject: [PATCH] Add featuring functionality --- .../CustomRoadmap/RoadmapHeader.tsx | 2 +- .../CustomRoadmap/Showcase/ShowcaseAlert.tsx | 25 ++++++++--------- .../CustomRoadmap/Showcase/ShowcaseStatus.tsx | 4 +-- .../Showcase/SubmitShowcaseWarning.tsx | 27 ++++++++++++++----- .../CustomRoadmap/SkeletonRoadmapHeader.tsx | 2 +- .../DiscoverRoadmaps/DiscoverRoadmaps.tsx | 16 ----------- 6 files changed, 36 insertions(+), 40 deletions(-) diff --git a/src/components/CustomRoadmap/RoadmapHeader.tsx b/src/components/CustomRoadmap/RoadmapHeader.tsx index 5baca89dd..5775d89e3 100644 --- a/src/components/CustomRoadmap/RoadmapHeader.tsx +++ b/src/components/CustomRoadmap/RoadmapHeader.tsx @@ -81,7 +81,7 @@ export function RoadmapHeader(props: RoadmapHeaderProps) { )} -
+
{!$canManageCurrentRoadmap && } {creator?.name && ( diff --git a/src/components/CustomRoadmap/Showcase/ShowcaseAlert.tsx b/src/components/CustomRoadmap/Showcase/ShowcaseAlert.tsx index 059c92b8b..2f6933cb0 100644 --- a/src/components/CustomRoadmap/Showcase/ShowcaseAlert.tsx +++ b/src/components/CustomRoadmap/Showcase/ShowcaseAlert.tsx @@ -22,35 +22,35 @@ export function ShowcaseAlert(props: ShowcaseAlertProps) { submitted: { icon: EyeIcon, label: - 'We are reviewing your roadmap. It will be visible to everyone on the platform once approved.', - className: 'text-blue-600 border-blue-200', + 'We are currently reviewing your roadmap, please wait for our response.', + className: 'bg-blue-100 text-blue-600 border-blue-200', }, approved: { icon: SmileIcon, - label: 'Hooray! Your roadmap is now visible to everyone on the platform.', - className: 'text-green-600 border-green-200', + label: 'Hooray! Your roadmap is now visible on the community page.', + className: 'text-green-600 bg-green-100 border-green-300', }, rejected: { icon: FrownIcon, label: 'Sorry, we are unable to feature your roadmap at this time.', - className: 'text-red-600 border-red-200', + className: 'text-red-600 bg-red-100 border-red-300', }, rejected_with_reason: { icon: FlagIcon, label: ( <> - Your roadmap needs changes before it can be featured.{' '} + Your roadmap could not be featured at this time{' '} ), - className: 'text-yellow-600 border-yellow-200', + className: 'text-red-800 bg-red-200 border-red-200', }, }; const showcaseStatusDetails = showcaseStatusMap[showcaseStatus]; @@ -72,11 +72,8 @@ export function ShowcaseAlert(props: ShowcaseAlertProps) {
diff --git a/src/components/CustomRoadmap/Showcase/ShowcaseStatus.tsx b/src/components/CustomRoadmap/Showcase/ShowcaseStatus.tsx index 7ab709768..cfb84837b 100644 --- a/src/components/CustomRoadmap/Showcase/ShowcaseStatus.tsx +++ b/src/components/CustomRoadmap/Showcase/ShowcaseStatus.tsx @@ -13,7 +13,7 @@ export function ShowcaseStatus(props: ShowcaseStatusProps) { const { showcaseStatus } = currentRoadmap; const [showSubmitWarning, setShowSubmitWarning] = useState(false); - if (!currentRoadmap || showcaseStatus !== undefined) { + if (!currentRoadmap || showcaseStatus) { return null; } @@ -35,7 +35,7 @@ export function ShowcaseStatus(props: ShowcaseStatusProps) { disabled={!!showcaseStatus} > - Submit for Showcase + Apply to be Featured ); diff --git a/src/components/CustomRoadmap/Showcase/SubmitShowcaseWarning.tsx b/src/components/CustomRoadmap/Showcase/SubmitShowcaseWarning.tsx index c5cecc795..ddf8359af 100644 --- a/src/components/CustomRoadmap/Showcase/SubmitShowcaseWarning.tsx +++ b/src/components/CustomRoadmap/Showcase/SubmitShowcaseWarning.tsx @@ -48,16 +48,31 @@ export function SubmitShowcaseWarning(props: SubmitShowcaseWarningProps) {

{showcaseStatus === 'rejected_with_reason' - ? 'Rejected Reason' - : 'Featured Listing'} + ? 'Rejected with Reason' + : 'Feature Your Roadmap'}

- {showcaseStatus === 'rejected_with_reason' && showcaseRejectedReason} + {showcaseStatus === 'rejected_with_reason' && ( + <> + + {showcaseRejectedReason} + + + Feel free to make changes to your roadmap and resubmit. + + + )} {!showcaseStatus && ( <> - Submitting your roadmap for a featured listing will make it - visible to everyone on the platform.{' '} - Are you sure? + We will review your roadmap and if accepted, we will make it + public and show it on the community roadmap listing.{' '} + + Are you sure to submit? + )}

diff --git a/src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx b/src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx index 9759918d4..16d7832ef 100644 --- a/src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx +++ b/src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx @@ -1,7 +1,7 @@ export function SkeletonRoadmapHeader() { return (
-
+
diff --git a/src/components/DiscoverRoadmaps/DiscoverRoadmaps.tsx b/src/components/DiscoverRoadmaps/DiscoverRoadmaps.tsx index 7cf290df4..f93b92b92 100644 --- a/src/components/DiscoverRoadmaps/DiscoverRoadmaps.tsx +++ b/src/components/DiscoverRoadmaps/DiscoverRoadmaps.tsx @@ -133,14 +133,6 @@ export function DiscoverRoadmaps(props: DiscoverRoadmapsProps) {
- - Ask us to feature it once you're done! - - - Up-to-date and maintained by the official team -