diff --git a/web/components/core/activity.tsx b/web/components/core/activity.tsx index 629e9908d..a70cd0727 100644 --- a/web/components/core/activity.tsx +++ b/web/components/core/activity.tsx @@ -46,10 +46,10 @@ export const IssueLink = ({ activity }: { activity: IIssueActivity }) => { }`}`} target={activity.issue === null ? "_self" : "_blank"} rel={activity.issue === null ? "" : "noopener noreferrer"} - className="font-medium text-custom-text-100 hover:underline" + className="inline items-center gap-1 font-medium text-custom-text-100 hover:underline" > {`${activity.project_detail.identifier}-${activity.issue_detail.sequence_id}`}{" "} - {activity.issue_detail?.name} + {activity.issue_detail?.name} ) : ( @@ -105,7 +105,7 @@ const EstimatePoint = observer((props: { point: string }) => { const estimateValue = getEstimatePointValue(Number(point), null); return ( - + {areEstimatesEnabledForCurrentProject ? estimateValue : `${currentPoint} ${currentPoint > 1 ? "points" : "point"}`} @@ -300,11 +300,13 @@ const activityDetails: { message: (activity, showIssue, workspaceSlug) => { if (activity.old_value === "") return ( - <> + added a new label{" "} - + - {activity.new_value} + + {activity.new_value} + {showIssue && ( @@ -312,15 +314,17 @@ const activityDetails: { to )} - + ); else return ( <> removed the label{" "} - + - {activity.old_value} + + {activity.old_value} + {showIssue && ( @@ -404,29 +408,30 @@ const activityDetails: { return ( <> - added {showIssue ? : "this issue"} to the cycle{" "} + added {showIssue ? : "this issue"}{" "} + to the cycle{" "} - {activity.new_value} + {activity.new_value} ); else if (activity.verb === "updated") return ( <> - set the cycle to + set the cycle to - {activity.new_value} + {activity.new_value} ); @@ -438,9 +443,9 @@ const activityDetails: { href={`/${workspaceSlug}/projects/${activity.project}/cycles/${activity.old_identifier}`} target="_blank" rel="noopener noreferrer" - className="inline-flex items-center gap-1 truncate font-medium text-custom-text-100 hover:underline" + className="inline items-center gap-1 font-medium text-custom-text-100 hover:underline" > - {activity.old_value} + {activity.old_value} ); @@ -457,9 +462,9 @@ const activityDetails: { href={`/${workspaceSlug}/projects/${activity.project}/modules/${activity.new_identifier}`} target="_blank" rel="noopener noreferrer" - className="inline-flex items-center gap-1 truncate font-medium text-custom-text-100 hover:underline" + className="inline items-center gap-1 font-medium text-custom-text-100 hover:underline" > - {activity.new_value} + {activity.new_value} ); @@ -471,9 +476,9 @@ const activityDetails: { href={`/${workspaceSlug}/projects/${activity.project}/modules/${activity.new_identifier}`} target="_blank" rel="noopener noreferrer" - className="inline-flex items-center gap-1 truncate font-medium text-custom-text-100 hover:underline" + className="inline items-center gap-1 font-medium text-custom-text-100 hover:underline" > - {activity.new_value} + {activity.new_value} ); @@ -485,9 +490,9 @@ const activityDetails: { href={`/${workspaceSlug}/projects/${activity.project}/modules/${activity.old_identifier}`} target="_blank" rel="noopener noreferrer" - className="inline-flex items-center gap-1 truncate font-medium text-custom-text-100 hover:underline" + className="inline items-center gap-1 font-medium text-custom-text-100 hover:underline" > - {activity.old_value} + {activity.old_value} ); @@ -497,7 +502,7 @@ const activityDetails: { name: { message: (activity, showIssue) => ( <> - set the name to {activity.new_value} + set the name to {activity.new_value} {showIssue && ( <> {" "} @@ -513,7 +518,8 @@ const activityDetails: { if (!activity.new_value) return ( <> - removed the parent {activity.old_value} + removed the parent{" "} + {activity.old_value} {showIssue && ( <> {" "} @@ -525,7 +531,8 @@ const activityDetails: { else return ( <> - set the parent to {activity.new_value} + set the parent to{" "} + {activity.new_value} {showIssue && ( <> {" "} @@ -560,13 +567,14 @@ const activityDetails: { return ( <> marked that {showIssue ? : "this issue"} relates to{" "} - {activity.new_value}. + {activity.new_value}. ); else return ( <> - removed the relation from {activity.old_value}. + removed the relation from{" "} + {activity.old_value}. ); }, @@ -578,13 +586,14 @@ const activityDetails: { return ( <> marked {showIssue ? : "this issue"} is blocking issue{" "} - {activity.new_value}. + {activity.new_value}. ); else return ( <> - removed the blocking issue {activity.old_value}. + removed the blocking issue{" "} + {activity.old_value}. ); }, @@ -596,14 +605,14 @@ const activityDetails: { return ( <> marked {showIssue ? : "this issue"} is being blocked by{" "} - {activity.new_value}. + {activity.new_value}. ); else return ( <> removed {showIssue ? : "this issue"} being blocked by issue{" "} - {activity.old_value}. + {activity.old_value}. ); }, @@ -615,14 +624,14 @@ const activityDetails: { return ( <> marked {showIssue ? : "this issue"} as duplicate of{" "} - {activity.new_value}. + {activity.new_value}. ); else return ( <> removed {showIssue ? : "this issue"} as a duplicate of{" "} - {activity.old_value}. + {activity.old_value}. ); }, @@ -631,7 +640,7 @@ const activityDetails: { state: { message: (activity, showIssue) => ( <> - set the state to {activity.new_value} + set the state to {activity.new_value} {showIssue && ( <> {" "} @@ -660,7 +669,9 @@ const activityDetails: { return ( <> set the start date to{" "} - {renderFormattedDate(activity.new_value)} + + {renderFormattedDate(activity.new_value)} + {showIssue && ( <> {" "} @@ -690,7 +701,9 @@ const activityDetails: { return ( <> set the due date to{" "} - {renderFormattedDate(activity.new_value)} + + {renderFormattedDate(activity.new_value)} + {showIssue && ( <> diff --git a/web/components/dashboard/home-dashboard-widgets.tsx b/web/components/dashboard/home-dashboard-widgets.tsx index 0b13f8f11..010e46624 100644 --- a/web/components/dashboard/home-dashboard-widgets.tsx +++ b/web/components/dashboard/home-dashboard-widgets.tsx @@ -42,7 +42,7 @@ export const DashboardWidgets = observer(() => { if (!workspaceSlug || !homeDashboardId) return null; return ( -
+
{Object.entries(WIDGETS_LIST).map(([key, widget]) => { const WidgetComponent = widget.component; // if the widget doesn't exist, return null diff --git a/web/components/dashboard/widgets/recent-activity.tsx b/web/components/dashboard/widgets/recent-activity.tsx index bd69d1f6e..9f91aeeeb 100644 --- a/web/components/dashboard/widgets/recent-activity.tsx +++ b/web/components/dashboard/widgets/recent-activity.tsx @@ -68,8 +68,8 @@ export const RecentActivityWidget: React.FC = observer((props) => {
)}
-
-

+

+

{currentUser?.id === activity.actor_detail.id ? "You" : activity.actor_detail?.display_name}{" "} @@ -81,7 +81,9 @@ export const RecentActivityWidget: React.FC = observer((props) => { )}

-

{calculateTimeAgo(activity.created_at)}

+

+ {calculateTimeAgo(activity.created_at)} +

))} diff --git a/web/components/page-views/workspace-dashboard.tsx b/web/components/page-views/workspace-dashboard.tsx index f1561c42e..0b5517a92 100644 --- a/web/components/page-views/workspace-dashboard.tsx +++ b/web/components/page-views/workspace-dashboard.tsx @@ -1,6 +1,5 @@ import { useEffect } from "react"; import { observer } from "mobx-react-lite"; -// hooks // components import { Spinner } from "@plane/ui"; import { DashboardWidgets } from "@/components/dashboard"; @@ -12,7 +11,11 @@ import { UserGreetingsView } from "@/components/user"; // constants import { EmptyStateType } from "@/constants/empty-state"; import { PRODUCT_TOUR_COMPLETED } from "@/constants/event-tracker"; +// helpers +import { cn } from "@/helpers/common.helper"; +// hooks import { useApplication, useEventTracker, useDashboard, useProject, useUser } from "@/hooks/store"; +import useSize from "@/hooks/use-window-size"; export const WorkspaceDashboardView = observer(() => { // store hooks @@ -25,6 +28,8 @@ export const WorkspaceDashboardView = observer(() => { const { homeDashboardId, fetchHomeDashboardWidgets } = useDashboard(); const { joinedProjectIds } = useProject(); + const [windowWidth] = useSize(); + const handleTourCompleted = () => { updateTourCompleted() .then(() => { @@ -57,7 +62,14 @@ export const WorkspaceDashboardView = observer(() => { {joinedProjectIds.length > 0 ? ( <> -
+
= 768, + } + )} + > {currentUser && } diff --git a/web/components/profile/activity/activity-list.tsx b/web/components/profile/activity/activity-list.tsx index c83531966..2b1fa6fe7 100644 --- a/web/components/profile/activity/activity-list.tsx +++ b/web/components/profile/activity/activity-list.tsx @@ -97,10 +97,10 @@ export const ActivityList: React.FC = observer((props) => { return (
  • -
    +
    <>
    -
    +
    {activityItem.field ? ( @@ -127,7 +127,7 @@ export const ActivityList: React.FC = observer((props) => {
    -
    +
    {activityItem.field === "archived_at" && activityItem.new_value !== "restore" ? ( Plane ) : activityItem.actor_detail.is_bot ? ( @@ -135,6 +135,7 @@ export const ActivityList: React.FC = observer((props) => { ) : ( {currentUser?.id === activityItem.actor_detail.id @@ -143,7 +144,7 @@ export const ActivityList: React.FC = observer((props) => { )}{" "} -
    +
    {message}{" "} {calculateTimeAgo(activityItem.created_at)} diff --git a/web/components/profile/activity/profile-activity-list.tsx b/web/components/profile/activity/profile-activity-list.tsx index 41601d651..8316a24d9 100644 --- a/web/components/profile/activity/profile-activity-list.tsx +++ b/web/components/profile/activity/profile-activity-list.tsx @@ -120,10 +120,10 @@ export const ProfileActivityListPage: React.FC = observer((props) => { return (
  • -
    +
    <>
    -
    +
    {activityItem.field ? ( @@ -150,7 +150,7 @@ export const ProfileActivityListPage: React.FC = observer((props) => {
    -
    +
    {activityItem.field === "archived_at" && activityItem.new_value !== "restore" ? ( Plane ) : activityItem.actor_detail.is_bot ? ( @@ -158,6 +158,7 @@ export const ProfileActivityListPage: React.FC = observer((props) => { ) : ( {currentUser?.id === activityItem.actor_detail.id @@ -166,7 +167,7 @@ export const ProfileActivityListPage: React.FC = observer((props) => { )}{" "} -
    +
    {message}{" "} {calculateTimeAgo(activityItem.created_at)} diff --git a/web/components/profile/overview/activity.tsx b/web/components/profile/overview/activity.tsx index 9dfe433ef..5811db75a 100644 --- a/web/components/profile/overview/activity.tsx +++ b/web/components/profile/overview/activity.tsx @@ -61,7 +61,7 @@ export const ProfileActivity = observer(() => { )}
    -

    +

    {currentUser?.id === activity.actor_detail?.id ? "You" : activity.actor_detail?.display_name}{" "} @@ -73,7 +73,7 @@ export const ProfileActivity = observer(() => { )}

    -

    {calculateTimeAgo(activity.created_at)}

    +

    {calculateTimeAgo(activity.created_at)}

    ))} diff --git a/web/pages/profile/activity.tsx b/web/pages/profile/activity.tsx index f2a73c180..bd33b1efa 100644 --- a/web/pages/profile/activity.tsx +++ b/web/pages/profile/activity.tsx @@ -46,8 +46,8 @@ const ProfileActivityPage: NextPageWithLayout = observer(() => { return ( <> -
    -
    +
    +
    themeStore.toggleSidebar()} />

    Activity