forked from github/plane
style: ui improvement (#1077)
* style: assignee, sub-issue and due date display properties styling * style: cycle view indicator added
This commit is contained in:
parent
6da4247400
commit
ae1eb9527a
@ -37,6 +37,7 @@ import {
|
|||||||
ArrowTopRightOnSquareIcon,
|
ArrowTopRightOnSquareIcon,
|
||||||
PaperClipIcon,
|
PaperClipIcon,
|
||||||
} from "@heroicons/react/24/outline";
|
} from "@heroicons/react/24/outline";
|
||||||
|
import { LayerDiagonalIcon } from "components/icons";
|
||||||
// helpers
|
// helpers
|
||||||
import { handleIssuesMutation } from "constants/issue";
|
import { handleIssuesMutation } from "constants/issue";
|
||||||
import { copyTextToClipboard, truncateText } from "helpers/string.helper";
|
import { copyTextToClipboard, truncateText } from "helpers/string.helper";
|
||||||
@ -337,11 +338,6 @@ export const SingleBoardIssue: React.FC<Props> = ({
|
|||||||
isNotAllowed={isNotAllowed}
|
isNotAllowed={isNotAllowed}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{properties.sub_issue_count && (
|
|
||||||
<div className="flex flex-shrink-0 items-center gap-1 rounded-md border border-brand-base px-2 py-1 text-xs text-brand-secondary shadow-sm">
|
|
||||||
{issue.sub_issues_count} {issue.sub_issues_count === 1 ? "sub-issue" : "sub-issues"}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{properties.labels && issue.label_details.length > 0 && (
|
{properties.labels && issue.label_details.length > 0 && (
|
||||||
<div className="flex flex-wrap gap-1">
|
<div className="flex flex-wrap gap-1">
|
||||||
{issue.label_details.map((label) => (
|
{issue.label_details.map((label) => (
|
||||||
@ -377,6 +373,16 @@ export const SingleBoardIssue: React.FC<Props> = ({
|
|||||||
selfPositioned
|
selfPositioned
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{properties.sub_issue_count && (
|
||||||
|
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2.5 py-1 text-xs shadow-sm">
|
||||||
|
<Tooltip tooltipHeading="Sub-issue" tooltipContent={`${issue.sub_issues_count}`}>
|
||||||
|
<div className="flex items-center gap-1 text-brand-secondary">
|
||||||
|
<LayerDiagonalIcon className="h-3.5 w-3.5" />
|
||||||
|
{issue.sub_issues_count}
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{properties.link && (
|
{properties.link && (
|
||||||
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2.5 py-1 text-xs shadow-sm">
|
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2.5 py-1 text-xs shadow-sm">
|
||||||
<Tooltip tooltipHeading="Link" tooltipContent={`${issue.link_count}`}>
|
<Tooltip tooltipHeading="Link" tooltipContent={`${issue.link_count}`}>
|
||||||
|
@ -24,6 +24,7 @@ import {
|
|||||||
} from "components/issues";
|
} from "components/issues";
|
||||||
// icons
|
// icons
|
||||||
import { LinkIcon, PaperClipIcon, PencilIcon, TrashIcon } from "@heroicons/react/24/outline";
|
import { LinkIcon, PaperClipIcon, PencilIcon, TrashIcon } from "@heroicons/react/24/outline";
|
||||||
|
import { LayerDiagonalIcon } from "components/icons";
|
||||||
// helper
|
// helper
|
||||||
import { copyTextToClipboard, truncateText } from "helpers/string.helper";
|
import { copyTextToClipboard, truncateText } from "helpers/string.helper";
|
||||||
// type
|
// type
|
||||||
@ -201,11 +202,6 @@ export const SingleCalendarIssue: React.FC<Props> = ({
|
|||||||
isNotAllowed={isNotAllowed}
|
isNotAllowed={isNotAllowed}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{properties.sub_issue_count && (
|
|
||||||
<div className="flex items-center gap-1 rounded-md border border-brand-base px-2 py-1 text-xs text-brand-secondary shadow-sm">
|
|
||||||
{issue.sub_issues_count} {issue.sub_issues_count === 1 ? "sub-issue" : "sub-issues"}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{properties.labels && issue.label_details.length > 0 ? (
|
{properties.labels && issue.label_details.length > 0 ? (
|
||||||
<div className="flex flex-wrap gap-1">
|
<div className="flex flex-wrap gap-1">
|
||||||
{issue.label_details.map((label) => (
|
{issue.label_details.map((label) => (
|
||||||
@ -242,7 +238,16 @@ export const SingleCalendarIssue: React.FC<Props> = ({
|
|||||||
isNotAllowed={isNotAllowed}
|
isNotAllowed={isNotAllowed}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{properties.sub_issue_count && (
|
||||||
|
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2.5 py-1 text-xs shadow-sm">
|
||||||
|
<Tooltip tooltipHeading="Sub-issue" tooltipContent={`${issue.sub_issues_count}`}>
|
||||||
|
<div className="flex items-center gap-1 text-brand-secondary">
|
||||||
|
<LayerDiagonalIcon className="h-3.5 w-3.5" />
|
||||||
|
{issue.sub_issues_count}
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{properties.link && (
|
{properties.link && (
|
||||||
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2.5 py-1 text-xs shadow-sm">
|
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2.5 py-1 text-xs shadow-sm">
|
||||||
<Tooltip tooltipHeading="Links" tooltipContent={`${issue.link_count}`}>
|
<Tooltip tooltipHeading="Links" tooltipContent={`${issue.link_count}`}>
|
||||||
|
@ -31,6 +31,7 @@ import {
|
|||||||
ArrowTopRightOnSquareIcon,
|
ArrowTopRightOnSquareIcon,
|
||||||
PaperClipIcon,
|
PaperClipIcon,
|
||||||
} from "@heroicons/react/24/outline";
|
} from "@heroicons/react/24/outline";
|
||||||
|
import { LayerDiagonalIcon } from "components/icons";
|
||||||
// helpers
|
// helpers
|
||||||
import { copyTextToClipboard, truncateText } from "helpers/string.helper";
|
import { copyTextToClipboard, truncateText } from "helpers/string.helper";
|
||||||
import { handleIssuesMutation } from "constants/issue";
|
import { handleIssuesMutation } from "constants/issue";
|
||||||
@ -205,7 +206,7 @@ export const SingleListIssue: React.FC<Props> = ({
|
|||||||
</a>
|
</a>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
<div
|
<div
|
||||||
className="flex flex-wrap items-center justify-between gap-2 border-b border-brand-base bg-brand-base last:border-b-0"
|
className="flex flex-wrap items-center justify-between px-4 py-2.5 gap-2 border-b border-brand-base bg-brand-base last:border-b-0"
|
||||||
onContextMenu={(e) => {
|
onContextMenu={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setContextMenu(true);
|
setContextMenu(true);
|
||||||
@ -213,7 +214,7 @@ export const SingleListIssue: React.FC<Props> = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Link href={`/${workspaceSlug}/projects/${issue?.project_detail?.id}/issues/${issue.id}`}>
|
<Link href={`/${workspaceSlug}/projects/${issue?.project_detail?.id}/issues/${issue.id}`}>
|
||||||
<div className="flex-grow cursor-pointer px-4 pt-2.5 md:py-2.5">
|
<div className="flex-grow cursor-pointer">
|
||||||
<a className="group relative flex items-center gap-2">
|
<a className="group relative flex items-center gap-2">
|
||||||
{properties.key && (
|
{properties.key && (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
@ -234,7 +235,7 @@ export const SingleListIssue: React.FC<Props> = ({
|
|||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<div className="flex w-full flex-shrink flex-wrap items-center gap-2 px-4 pb-2.5 text-xs sm:w-auto md:px-0 md:py-2.5 md:pr-4">
|
<div className="flex w-full flex-shrink flex-wrap items-center gap-2 text-xs sm:w-auto">
|
||||||
{properties.priority && (
|
{properties.priority && (
|
||||||
<ViewPrioritySelect
|
<ViewPrioritySelect
|
||||||
issue={issue}
|
issue={issue}
|
||||||
@ -258,11 +259,6 @@ export const SingleListIssue: React.FC<Props> = ({
|
|||||||
isNotAllowed={isNotAllowed}
|
isNotAllowed={isNotAllowed}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{properties.sub_issue_count && (
|
|
||||||
<div className="flex items-center gap-1 rounded-md border border-brand-base px-2 py-1 text-xs text-brand-secondary shadow-sm">
|
|
||||||
{issue.sub_issues_count} {issue.sub_issues_count === 1 ? "sub-issue" : "sub-issues"}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{properties.labels && issue.label_details.length > 0 ? (
|
{properties.labels && issue.label_details.length > 0 ? (
|
||||||
<div className="flex flex-wrap gap-1">
|
<div className="flex flex-wrap gap-1">
|
||||||
{issue.label_details.map((label) => (
|
{issue.label_details.map((label) => (
|
||||||
@ -299,6 +295,16 @@ export const SingleListIssue: React.FC<Props> = ({
|
|||||||
isNotAllowed={isNotAllowed}
|
isNotAllowed={isNotAllowed}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{properties.sub_issue_count && (
|
||||||
|
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2.5 py-1 text-xs shadow-sm">
|
||||||
|
<Tooltip tooltipHeading="Sub-issue" tooltipContent={`${issue.sub_issues_count}`}>
|
||||||
|
<div className="flex items-center gap-1 text-brand-secondary">
|
||||||
|
<LayerDiagonalIcon className="h-3.5 w-3.5" />
|
||||||
|
{issue.sub_issues_count}
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{properties.link && (
|
{properties.link && (
|
||||||
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2.5 py-1 text-xs shadow-sm">
|
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2.5 py-1 text-xs shadow-sm">
|
||||||
<Tooltip tooltipHeading="Links" tooltipContent={`${issue.link_count}`}>
|
<Tooltip tooltipHeading="Links" tooltipContent={`${issue.link_count}`}>
|
||||||
|
@ -116,14 +116,18 @@ export const CyclesView: React.FC<Props> = ({
|
|||||||
<div className="flex items-center gap-x-1">
|
<div className="flex items-center gap-x-1">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className={`grid h-7 w-7 place-items-center rounded p-1 outline-none duration-300 hover:bg-brand-surface-2`}
|
className={`grid h-7 w-7 place-items-center rounded p-1 outline-none duration-300 ${
|
||||||
|
cycleView === "list" ? "bg-brand-surface-2" : ""
|
||||||
|
} hover:bg-brand-surface-2`}
|
||||||
onClick={() => setCycleView("list")}
|
onClick={() => setCycleView("list")}
|
||||||
>
|
>
|
||||||
<ListBulletIcon className="h-4 w-4 text-brand-secondary" />
|
<ListBulletIcon className="h-4 w-4 text-brand-secondary" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className={`grid h-7 w-7 place-items-center rounded p-1 outline-none duration-300 hover:bg-brand-surface-2`}
|
className={`grid h-7 w-7 place-items-center rounded p-1 outline-none duration-300 ${
|
||||||
|
cycleView === "board" ? "bg-brand-surface-2" : ""
|
||||||
|
} hover:bg-brand-surface-2`}
|
||||||
onClick={() => setCycleView("board")}
|
onClick={() => setCycleView("board")}
|
||||||
>
|
>
|
||||||
<Squares2X2Icon className="h-4 w-4 text-brand-secondary" />
|
<Squares2X2Icon className="h-4 w-4 text-brand-secondary" />
|
||||||
|
@ -17,6 +17,7 @@ import {
|
|||||||
} from "components/issues/view-select";
|
} from "components/issues/view-select";
|
||||||
// icon
|
// icon
|
||||||
import { LinkIcon, PaperClipIcon } from "@heroicons/react/24/outline";
|
import { LinkIcon, PaperClipIcon } from "@heroicons/react/24/outline";
|
||||||
|
import { LayerDiagonalIcon } from "components/icons";
|
||||||
// ui
|
// ui
|
||||||
import { AssigneesList } from "components/ui/avatar";
|
import { AssigneesList } from "components/ui/avatar";
|
||||||
import { CustomMenu, Tooltip } from "components/ui";
|
import { CustomMenu, Tooltip } from "components/ui";
|
||||||
@ -126,11 +127,6 @@ export const MyIssuesListItem: React.FC<Props> = ({ issue, properties, projectId
|
|||||||
isNotAllowed={isNotAllowed}
|
isNotAllowed={isNotAllowed}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{properties.sub_issue_count && (
|
|
||||||
<div className="flex items-center gap-1 rounded-md border border-brand-base px-2 py-1 text-xs text-brand-secondary shadow-sm">
|
|
||||||
{issue?.sub_issues_count} {issue?.sub_issues_count === 1 ? "sub-issue" : "sub-issues"}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{properties.labels && issue.label_details.length > 0 ? (
|
{properties.labels && issue.label_details.length > 0 ? (
|
||||||
<div className="flex flex-wrap gap-1">
|
<div className="flex flex-wrap gap-1">
|
||||||
{issue.label_details.map((label) => (
|
{issue.label_details.map((label) => (
|
||||||
@ -152,6 +148,7 @@ export const MyIssuesListItem: React.FC<Props> = ({ issue, properties, projectId
|
|||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
{properties.assignee && (
|
{properties.assignee && (
|
||||||
|
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2 py-1 text-xs shadow-sm">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
position="top-right"
|
position="top-right"
|
||||||
tooltipHeading="Assignees"
|
tooltipHeading="Assignees"
|
||||||
@ -165,10 +162,21 @@ export const MyIssuesListItem: React.FC<Props> = ({ issue, properties, projectId
|
|||||||
: "No Assignee"
|
: "No Assignee"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex h-4 items-center gap-1">
|
||||||
<AssigneesList userIds={issue.assignees ?? []} />
|
<AssigneesList userIds={issue.assignees ?? []} />
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{properties.sub_issue_count && (
|
||||||
|
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2.5 py-1 text-xs shadow-sm">
|
||||||
|
<Tooltip tooltipHeading="Sub-issue" tooltipContent={`${issue.sub_issues_count}`}>
|
||||||
|
<div className="flex items-center gap-1 text-brand-secondary">
|
||||||
|
<LayerDiagonalIcon className="h-3.5 w-3.5" />
|
||||||
|
{issue.sub_issues_count}
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
{properties.link && (
|
{properties.link && (
|
||||||
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2 py-1 text-xs shadow-sm">
|
<div className="flex cursor-default items-center rounded-md border border-brand-base px-2 py-1 text-xs shadow-sm">
|
||||||
|
@ -107,13 +107,11 @@ export const ViewAssigneeSelect: React.FC<Props> = ({
|
|||||||
>
|
>
|
||||||
{issue.assignees && issue.assignees.length > 0 && Array.isArray(issue.assignees) ? (
|
{issue.assignees && issue.assignees.length > 0 && Array.isArray(issue.assignees) ? (
|
||||||
<div className="-my-0.5 flex items-center justify-center gap-2">
|
<div className="-my-0.5 flex items-center justify-center gap-2">
|
||||||
<AssigneesList userIds={issue.assignees} length={3} showLength={false} />
|
<AssigneesList userIds={issue.assignees} length={5} showLength={true} />
|
||||||
<span className="text-brand-secondary">{issue.assignees.length} Assignees</span>
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex items-center justify-center gap-2">
|
<div className="flex items-center justify-center gap-2">
|
||||||
<UserGroupIcon className="h-4 w-4 text-brand-secondary" />
|
<UserGroupIcon className="h-4 w-4 text-brand-secondary" />
|
||||||
<span className="text-brand-secondary">Assignee</span>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,6 +21,11 @@
|
|||||||
background-color: rgba(var(--color-bg-base)) !important;
|
background-color: rgba(var(--color-bg-base)) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.react-datepicker-wrapper,
|
||||||
|
.react-datepicker__input-container {
|
||||||
|
border-radius: 0.375rem;
|
||||||
|
}
|
||||||
|
|
||||||
.react-datepicker {
|
.react-datepicker {
|
||||||
font-family: "Inter" !important;
|
font-family: "Inter" !important;
|
||||||
background-color: rgba(var(--color-bg-base)) !important;
|
background-color: rgba(var(--color-bg-base)) !important;
|
||||||
|
Loading…
Reference in New Issue
Block a user