Compare commits

..

4 Commits

Author SHA1 Message Date
Aaryan Khandelwal 22836ea03e fix: editor placeholder color (#6430) 2025-01-20 15:52:23 +05:30
Anmol Singh Bhatia 13cc8b0e96 chore: workspace view loading state improvement (#6423) 2025-01-17 19:50:56 +05:30
Vamsi Krishna 9addcde553 fix: padding issue cycle active cycles menu (#6424) 2025-01-17 19:46:19 +05:30
Bavisetti Narayan 26a9b7fced fix: dashboard completed issues count (#6422) 2025-01-17 18:03:28 +05:30
6 changed files with 43 additions and 21 deletions
+3 -3
View File
@@ -25,7 +25,7 @@
.ProseMirror p.is-editor-empty:first-child::before {
content: attr(data-placeholder);
float: left;
color: rgb(var(--color-text-400));
color: var(--color-placeholder);
pointer-events: none;
height: 0;
}
@@ -34,7 +34,7 @@
.ProseMirror p.is-empty::before {
content: attr(data-placeholder);
float: left;
color: rgb(var(--color-text-400));
color: var(--color-placeholder);
pointer-events: none;
height: 0;
}
@@ -192,7 +192,7 @@ ul[data-type="taskList"] li > div {
ul[data-type="taskList"] li[data-checked="true"] {
& > div > p.editor-paragraph-block {
color: rgb(var(--color-text-400));
color: var(--color-placeholder);
}
[data-text-color] {
+2
View File
@@ -1,4 +1,6 @@
.editor-container {
--color-placeholder: rgba(var(--color-text-100), 0.5);
/* font sizes and line heights */
&.large-font {
--font-size-h1: 1.75rem;
@@ -1,5 +1,6 @@
"use client";
import { useState } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
// components
@@ -16,19 +17,25 @@ const GlobalViewIssuesPage = observer(() => {
const { globalViewId } = useParams();
// store hooks
const { currentWorkspace } = useWorkspace();
// states
const [isLoading, setIsLoading] = useState(false);
// derived values
const defaultView = DEFAULT_GLOBAL_VIEWS_LIST.find((view) => view.key === globalViewId);
const pageTitle = currentWorkspace?.name ? `${currentWorkspace?.name} - All Views` : undefined;
// handlers
const toggleLoading = (value: boolean) => setIsLoading(value);
return (
<>
<PageHead title={pageTitle} />
<div className="h-full overflow-hidden bg-custom-background-100">
<div className="flex h-full w-full flex-col border-b border-custom-border-300">
<GlobalViewsHeader />
{globalViewId && <GlobalViewsAppliedFiltersRoot globalViewId={globalViewId.toString()} />}
<AllIssueLayoutRoot isDefaultView={!!defaultView} />
{globalViewId && (
<GlobalViewsAppliedFiltersRoot globalViewId={globalViewId.toString()} isLoading={isLoading} />
)}
<AllIssueLayoutRoot isDefaultView={!!defaultView} isLoading={isLoading} toggleLoading={toggleLoading} />
</div>
</div>
</>
+1 -1
View File
@@ -183,7 +183,7 @@ export const CycleQuickActions: React.FC<Props> = observer((props) => {
</div>
)}
<ContextMenu parentRef={parentRef} items={MENU_ITEMS} />
<CustomMenu ellipsis placement="bottom-end" closeOnSelect>
<CustomMenu ellipsis placement="bottom-end" closeOnSelect maxHeight="lg">
{MENU_ITEMS.map((item) => {
if (item.shouldRender === false) return null;
return (
@@ -10,7 +10,7 @@ import { EIssueFilterType, EIssuesStoreType } from "@plane/constants";
import { IIssueFilterOptions, TStaticViewTypes } from "@plane/types";
//ui
// components
import { Header, EHeaderVariant } from "@plane/ui";
import { Header, EHeaderVariant, Loader } from "@plane/ui";
import { AppliedFiltersList } from "@/components/issues";
import { UpdateViewComponent } from "@/components/views/update-view-component";
import { CreateUpdateWorkspaceViewModal } from "@/components/workspace";
@@ -27,10 +27,11 @@ import { getAreFiltersEqual } from "../../../utils";
type Props = {
globalViewId: string;
isLoading?: boolean;
};
export const GlobalViewsAppliedFiltersRoot = observer((props: Props) => {
const { globalViewId } = props;
const { globalViewId, isLoading = false } = props;
// router
const { workspaceSlug } = useParams();
// store hooks
@@ -154,14 +155,22 @@ export const GlobalViewsAppliedFiltersRoot = observer((props: Props) => {
}}
/>
<AppliedFiltersList
labels={workspaceLabels ?? undefined}
appliedFilters={appliedFilters ?? {}}
handleClearAllFilters={handleClearAllFilters}
handleRemoveFilter={handleRemoveFilter}
disableEditing={isLocked}
alwaysAllowEditing
/>
{isLoading ? (
<Loader className="flex flex-wrap items-stretch gap-2 bg-custom-background-100 truncate my-auto">
<Loader.Item height="36px" width="150px" />
<Loader.Item height="36px" width="100px" />
<Loader.Item height="36px" width="300px" />
</Loader>
) : (
<AppliedFiltersList
labels={workspaceLabels ?? undefined}
appliedFilters={appliedFilters ?? {}}
handleClearAllFilters={handleClearAllFilters}
handleRemoveFilter={handleRemoveFilter}
disableEditing={isLocked}
alwaysAllowEditing
/>
)}
{!isDefaultView ? (
<UpdateViewComponent
@@ -29,10 +29,12 @@ import { TRenderQuickActions } from "../list/list-view-types";
type Props = {
isDefaultView: boolean;
isLoading?: boolean;
toggleLoading: (value: boolean) => void;
};
export const AllIssueLayoutRoot: React.FC<Props> = observer((props: Props) => {
const { isDefaultView } = props;
const { isDefaultView, isLoading = false, toggleLoading } = props;
// router
const { workspaceSlug, globalViewId } = useParams();
const router = useAppRouter();
@@ -92,7 +94,7 @@ export const AllIssueLayoutRoot: React.FC<Props> = observer((props: Props) => {
if (workspaceSlug && globalViewId) fetchNextIssues(workspaceSlug.toString(), globalViewId.toString());
}, [fetchNextIssues, workspaceSlug, globalViewId]);
const { isLoading } = useSWR(
const { isLoading: globalViewsLoading } = useSWR(
workspaceSlug ? `WORKSPACE_GLOBAL_VIEWS_${workspaceSlug}` : null,
async () => {
if (workspaceSlug) {
@@ -102,11 +104,12 @@ export const AllIssueLayoutRoot: React.FC<Props> = observer((props: Props) => {
{ revalidateIfStale: false, revalidateOnFocus: false }
);
useSWR(
const { isLoading: issuesLoading } = useSWR(
workspaceSlug && globalViewId ? `WORKSPACE_GLOBAL_VIEW_ISSUES_${workspaceSlug}_${globalViewId}` : null,
async () => {
if (workspaceSlug && globalViewId) {
clear();
toggleLoading(true);
await fetchFilters(workspaceSlug.toString(), globalViewId.toString());
await fetchIssues(
workspaceSlug.toString(),
@@ -118,6 +121,7 @@ export const AllIssueLayoutRoot: React.FC<Props> = observer((props: Props) => {
}
);
routerFilterParams();
toggleLoading(false);
}
},
{ revalidateIfStale: false, revalidateOnFocus: false }
@@ -171,7 +175,7 @@ export const AllIssueLayoutRoot: React.FC<Props> = observer((props: Props) => {
);
// when the call is not loading and the view does not exist and the view is not a default view, show empty state
if (!isLoading && !viewDetails && !isDefaultView) {
if (!isLoading && !globalViewsLoading && !issuesLoading && !viewDetails && !isDefaultView) {
return (
<EmptyState
image={emptyView}
@@ -185,7 +189,7 @@ export const AllIssueLayoutRoot: React.FC<Props> = observer((props: Props) => {
);
}
if (getIssueLoader() === "init-loader" || !globalViewId || !groupedIssueIds) {
if ((isLoading && issuesLoading && getIssueLoader() === "init-loader") || !globalViewId || !groupedIssueIds) {
return <SpreadsheetLayoutLoader />;
}