diff --git a/packages/editor/src/styles/editor.css b/packages/editor/src/styles/editor.css index 63dfa16ba9b..b7742f5389e 100644 --- a/packages/editor/src/styles/editor.css +++ b/packages/editor/src/styles/editor.css @@ -105,14 +105,14 @@ ul[data-type="taskList"] li > div { } ul[data-type="taskList"] li > label input[type="checkbox"] { - border: 1px solid rgba(var(--color-border-300)) !important; + border: 1px solid rgba(var(--color-text-100), 0.2) !important; outline: none; border-radius: 2px; transform: scale(1.05); } .ProseMirror[contenteditable="true"] input[type="checkbox"]:hover { - background-color: rgba(var(--color-background-80)); + background-color: rgba(var(--color-text-100), 0.1); } .ProseMirror[contenteditable="false"] input[type="checkbox"] { diff --git a/web/core/components/editor/sticky-editor/editor.tsx b/web/core/components/editor/sticky-editor/editor.tsx index d31090b516e..cd2ae8cad6d 100644 --- a/web/core/components/editor/sticky-editor/editor.tsx +++ b/web/core/components/editor/sticky-editor/editor.tsx @@ -12,7 +12,7 @@ import { getEditorFileHandlers } from "@/helpers/editor.helper"; // plane web hooks import { useEditorFlagging } from "@/plane-web/hooks/use-editor-flagging"; import { useFileSize } from "@/plane-web/hooks/use-file-size"; -import { Toolbar } from "./toolbar"; +import { StickyEditorToolbar } from "./toolbar"; interface StickyEditorWrapperProps extends Omit { @@ -87,7 +87,7 @@ export const StickyEditor = React.forwardRef - { // TODO: update this while toolbar homogenization // @ts-expect-error type mismatch here diff --git a/web/core/components/editor/sticky-editor/toolbar.tsx b/web/core/components/editor/sticky-editor/toolbar.tsx index 8f6aa50cee4..35dbb9ada08 100644 --- a/web/core/components/editor/sticky-editor/toolbar.tsx +++ b/web/core/components/editor/sticky-editor/toolbar.tsx @@ -23,7 +23,7 @@ type Props = { const toolbarItems = TOOLBAR_ITEMS.sticky; -export const Toolbar: React.FC = (props) => { +export const StickyEditorToolbar: React.FC = (props) => { const { executeCommand, editorRef, handleColorChange, handleDelete } = props; // State to manage active states of toolbar items @@ -69,7 +69,11 @@ export const Toolbar: React.FC = (props) => {

} > - @@ -95,7 +99,7 @@ export const Toolbar: React.FC = (props) => { type="button" onClick={() => executeCommand(item)} className={cn( - "grid place-items-center aspect-square rounded-sm p-0.5 text-custom-text-300", + "grid place-items-center aspect-square rounded-sm p-0.5 text-custom-text-100/50", {} )} > @@ -122,7 +126,7 @@ export const Toolbar: React.FC = (props) => {

} > - diff --git a/web/core/components/home/home-dashboard-widgets.tsx b/web/core/components/home/home-dashboard-widgets.tsx index 009cb9ffe74..8ebdb70664e 100644 --- a/web/core/components/home/home-dashboard-widgets.tsx +++ b/web/core/components/home/home-dashboard-widgets.tsx @@ -25,7 +25,7 @@ export const HOME_WIDGETS_LIST: { quick_links: { component: DashboardQuickLinks, fullWidth: false, - title: "Quick links", + title: "Quicklinks", }, recents: { component: RecentActivityWidget, diff --git a/web/core/components/home/widgets/empty-states/index.ts b/web/core/components/home/widgets/empty-states/index.ts index 1efe34c51ec..72b042924d7 100644 --- a/web/core/components/home/widgets/empty-states/index.ts +++ b/web/core/components/home/widgets/empty-states/index.ts @@ -1 +1,4 @@ -export * from "./root"; +export * from "./links"; +export * from "./no-projects"; +export * from "./recents"; +export * from "./stickies"; diff --git a/web/core/components/home/widgets/empty-states/links.tsx b/web/core/components/home/widgets/empty-states/links.tsx index db8b05df754..40df6aedeee 100644 --- a/web/core/components/home/widgets/empty-states/links.tsx +++ b/web/core/components/home/widgets/empty-states/links.tsx @@ -1,12 +1,10 @@ import { Link2 } from "lucide-react"; export const LinksEmptyState = () => ( -
-
- -
- Add any links you need for quick access to your work. -
-
+
+
+
- ); +

Save links to work things that you{"'"}d like handy.

+
+); diff --git a/web/core/components/home/widgets/empty-states/root.tsx b/web/core/components/home/widgets/empty-states/no-projects.tsx similarity index 51% rename from web/core/components/home/widgets/empty-states/root.tsx rename to web/core/components/home/widgets/empty-states/no-projects.tsx index b359f2bb486..c3b9a8807a7 100644 --- a/web/core/components/home/widgets/empty-states/root.tsx +++ b/web/core/components/home/widgets/empty-states/no-projects.tsx @@ -2,6 +2,8 @@ import React from "react"; import Link from "next/link"; import { useParams } from "next/navigation"; import { Briefcase, Hotel, Users } from "lucide-react"; +// plane ui +import { Avatar } from "@plane/ui"; // helpers import { getFileURL } from "@/helpers/file.helper"; // hooks @@ -9,7 +11,7 @@ import { useCommandPalette, useEventTracker, useUser, useUserPermissions } from // plane web constants import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants"; -export const EmptyWorkspace = () => { +export const NoProjectsEmptyState = () => { // navigation const { workspaceSlug } = useParams(); // store hooks @@ -26,11 +28,11 @@ export const EmptyWorkspace = () => { const EMPTY_STATE_DATA = [ { id: "create-project", - title: "Create a project", - description: "Create your first project now to get started", - icon: , + title: "Create a project.", + description: "Most things start with a project in Plane.", + icon: , cta: { - text: "Create Project", + text: "Get started", onClick: (e: React.MouseEvent) => { if (!canCreateProject) return; e.preventDefault(); @@ -42,66 +44,56 @@ export const EmptyWorkspace = () => { }, { id: "invite-team", - title: "Invite your team", - description: "The sub text will be of two lines and that will be placed.", - icon: , + title: "Invite your team.", + description: "Build, ship, and manage with coworkers.", + icon: , cta: { - text: "Invite now", + text: "Get them in", link: `/${workspaceSlug}/settings/members`, }, }, { id: "configure-workspace", - title: "Configure your workspace", - description: "The sub text will be of two lines and that will be placed.", - icon: , + title: "Set up your workspace.", + description: "Turn features on or off or go beyond that.", + icon: , cta: { - text: "Configure workspace", + text: "Configure this workspace", link: "settings", }, }, { id: "personalize-account", - title: "Personalize your account", - description: "The sub text will be of two lines and that will be placed.", - icon: - currentUser?.avatar_url && currentUser?.avatar_url.trim() !== "" ? ( - - - {currentUser?.display_name - - - ) : ( - - - {(currentUser?.email ?? currentUser?.display_name ?? "?")[0]} - - - ), + title: "Make Plane yours.", + description: "Choose your picture, colors, and more.", + icon: ( + + ), cta: { - text: "Personalize account", + text: "Personalize now", link: "/profile", }, }, ]; return ( -
+
{EMPTY_STATE_DATA.map((item) => (
-
+
{item.icon}
-

{item.title}

-

{item.description}

- +

{item.title}

+

{item.description}

{item.cta.link ? ( { ) : ( ); }; diff --git a/web/core/components/home/widgets/links/create-update-link-modal.tsx b/web/core/components/home/widgets/links/create-update-link-modal.tsx index 0c25747842d..9e45415b33b 100644 --- a/web/core/components/home/widgets/links/create-update-link-modal.tsx +++ b/web/core/components/home/widgets/links/create-update-link-modal.tsx @@ -66,9 +66,7 @@ export const LinkCreateUpdateModal: FC = observer((props)
-

- {preloadedData?.id ? "Update" : "Add"} quick link -

+

{preloadedData?.id ? "Update" : "Add"} quicklink

diff --git a/web/core/components/home/widgets/links/link-detail.tsx b/web/core/components/home/widgets/links/link-detail.tsx index 72e3bfded88..17c96717305 100644 --- a/web/core/components/home/widgets/links/link-detail.tsx +++ b/web/core/components/home/widgets/links/link-detail.tsx @@ -1,15 +1,17 @@ "use client"; import { FC } from "react"; -// hooks -// ui import { observer } from "mobx-react"; -import { Pencil, Trash2, ExternalLink, EllipsisVertical, Link2, Link } from "lucide-react"; +import { Pencil, Trash2, ExternalLink, Link2, Link } from "lucide-react"; +// plane ui import { TOAST_TYPE, setToast, CustomMenu, TContextMenuItem } from "@plane/ui"; -// helpers +// plane utils import { cn, copyTextToClipboard } from "@plane/utils"; +// helpers import { calculateTimeAgo } from "@/helpers/date-time.helper"; +// hooks import { useHome } from "@/hooks/store/use-home"; +// types import { TLinkOperations } from "./use-links"; export type TProjectLinkDetail = { @@ -75,54 +77,47 @@ export const ProjectLinkDetail: FC = observer((props) => { return (
-
- +
+
-
+
{linkDetail.title || linkDetail.url}
{calculateTimeAgo(linkDetail.created_at)}
- - - } - placement="bottom-end" - menuItemsClassName="z-20" - closeOnSelect - className=" my-auto" - > - {MENU_ITEMS.map((item) => ( - { - e.preventDefault(); - e.stopPropagation(); - item.action(); - }} - className={cn("flex items-center gap-2 w-full ", { - "text-custom-text-400": item.disabled, - })} - disabled={item.disabled} - > - {item.icon && } -
-
{item.title}
- {item.description && ( -

- {item.description} -

- )} -
-
- ))} -
+
+ + {MENU_ITEMS.map((item) => ( + { + e.preventDefault(); + e.stopPropagation(); + item.action(); + }} + className={cn("flex items-center gap-2 w-full ", { + "text-custom-text-400": item.disabled, + })} + disabled={item.disabled} + > + {item.icon && } +
+
{item.title}
+ {item.description && ( +

+ {item.description} +

+ )} +
+
+ ))} +
+
); }); diff --git a/web/core/components/home/widgets/links/links.tsx b/web/core/components/home/widgets/links/links.tsx index 415183d44e3..7e61bce55d7 100644 --- a/web/core/components/home/widgets/links/links.tsx +++ b/web/core/components/home/widgets/links/links.tsx @@ -38,9 +38,9 @@ export const ProjectLinkList: FC = observer((props) => { buttonClassName="bg-custom-background-90/20" >
- {links && - links.length > 0 && - links.map((linkId) => )} + {links.map((linkId) => ( + + ))}
diff --git a/web/core/components/home/widgets/links/root.tsx b/web/core/components/home/widgets/links/root.tsx index 504a7cf1680..f25f035d165 100644 --- a/web/core/components/home/widgets/links/root.tsx +++ b/web/core/components/home/widgets/links/root.tsx @@ -34,14 +34,14 @@ export const DashboardQuickLinks = observer((props: THomeWidgetProps) => { />
-
Quick links
+
Quicklinks
diff --git a/web/core/components/home/widgets/recents/index.tsx b/web/core/components/home/widgets/recents/index.tsx index c28358400ea..9801e479475 100644 --- a/web/core/components/home/widgets/recents/index.tsx +++ b/web/core/components/home/widgets/recents/index.tsx @@ -11,8 +11,7 @@ import { LayersIcon } from "@plane/ui"; import { ContentOverflowWrapper } from "@/components/core/content-overflow-HOC"; import { useProject } from "@/hooks/store"; import { WorkspaceService } from "@/plane-web/services"; -import { EmptyWorkspace } from "../empty-states"; -import { RecentsEmptyState } from "../empty-states/recents"; +import { NoProjectsEmptyState, RecentsEmptyState } from "../empty-states"; import { EWidgetKeys, WidgetLoader } from "../loaders"; import { FiltersDropdown } from "./filters"; import { RecentIssue } from "./issue"; @@ -34,6 +33,7 @@ export const RecentActivityWidget: React.FC = observer((props) const [filter, setFilter] = useState(filters[0].name); // ref const ref = useRef(null); + // store hooks const { joinedProjectIds, loader } = useProject(); const { data: recents, isLoading } = useSWR( @@ -65,10 +65,11 @@ export const RecentActivityWidget: React.FC = observer((props) } }; - if (!loader && joinedProjectIds?.length === 0) return ; + if (!loader && joinedProjectIds?.length === 0) return ; + if (!isLoading && recents?.length === 0) return ( -
+
Recents
@@ -94,10 +95,9 @@ export const RecentActivityWidget: React.FC = observer((props)
{isLoading && } {!isLoading && - recents?.length > 0 && recents - .filter((recent: TActivityEntityData) => recent.entity_data) - .map((activity: TActivityEntityData) =>
{resolveRecent(activity)}
)} + ?.filter((recent) => recent.entity_data) + .map((activity) =>
{resolveRecent(activity)}
)}
); diff --git a/web/core/components/stickies/layout/stickies-list.tsx b/web/core/components/stickies/layout/stickies-list.tsx index 1a8a6fd3273..c960ff1cec8 100644 --- a/web/core/components/stickies/layout/stickies-list.tsx +++ b/web/core/components/stickies/layout/stickies-list.tsx @@ -84,7 +84,7 @@ export const StickiesList = observer((props: TProps) => { if (loader === "loaded" && workspaceStickyIds.length === 0) { return ( -
+
{isStickiesPage || searchQuery ? ( = { key: EmptyStateType.STICKIES, title: "Stickies are quick notes and to-dos you take down on the fly.", description: - "Capture your thoughts and ideas effortlessly by creating stickies that you can access anytime and from anywhere.", + "Capture ideas, ahas, brainwaves, light-bulb moments without scrambling for a pen and paper, hunting for the recorder app on your phone, or firing up a notes app only to forget all about it later. Keep them all right next to your work so you can easily come back, build them up, or well, discard them.", path: "/empty-state/stickies/stickies", primaryButton: { icon: , @@ -945,8 +945,8 @@ const emptyStateDetails: Record = { }, [EmptyStateType.HOME_WIDGETS]: { key: EmptyStateType.HOME_WIDGETS, - title: "It's Quiet Without Widgets, Turn Them On", - description: "It looks like all your widgets are turned off. Enable them\nnow to enhance your experience!", + title: "So much to add, yet such empty", + description: "You have turned off all your widgets. Turn some or\nall of them back on to see delightful things.", path: "/empty-state/dashboard/widgets", primaryButton: { icon: , diff --git a/web/core/services/workspace.service.ts b/web/core/services/workspace.service.ts index a4d2e7fdcc7..ef3699fad50 100644 --- a/web/core/services/workspace.service.ts +++ b/web/core/services/workspace.service.ts @@ -16,6 +16,7 @@ import { TSearchResponse, TSearchEntityRequestPayload, TWidgetEntityData, + TActivityEntityData, } from "@plane/types"; import { APIService } from "@/services/api.service"; // helpers @@ -282,7 +283,7 @@ export class WorkspaceService extends APIService { }); } - // quick links + // quicklinks async fetchWorkspaceLinks(workspaceSlug: string): Promise { return this.get(`/api/workspaces/${workspaceSlug}/quick-links/`) .then((response) => response?.data) @@ -329,7 +330,7 @@ export class WorkspaceService extends APIService { } // recents - async fetchWorkspaceRecents(workspaceSlug: string, entity_name?: string) { + async fetchWorkspaceRecents(workspaceSlug: string, entity_name?: string): Promise { return this.get(`/api/workspaces/${workspaceSlug}/recent-visits/`, { params: { entity_name, diff --git a/web/public/empty-state/dashboard/widgets-dark.webp b/web/public/empty-state/dashboard/widgets-dark.webp index 2ab0765c6b9..4c185294b89 100644 Binary files a/web/public/empty-state/dashboard/widgets-dark.webp and b/web/public/empty-state/dashboard/widgets-dark.webp differ diff --git a/web/public/empty-state/stickies/stickies-search-dark.webp b/web/public/empty-state/stickies/stickies-search-dark.webp index 927ae36d43f..50d15f2f7a6 100644 Binary files a/web/public/empty-state/stickies/stickies-search-dark.webp and b/web/public/empty-state/stickies/stickies-search-dark.webp differ