Merge pull request #1951 from makeplane/stage-release

Promote: Stage release to Production
This commit is contained in:
sriram veeraghanta 2023-08-23 16:18:08 +05:30 committed by GitHub
commit 6f397710ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 20 deletions

View File

@ -17,13 +17,7 @@ import useUser from "hooks/use-user";
// ui // ui
import { Input, Spinner } from "components/ui"; import { Input, Spinner } from "components/ui";
// icons // icons
import { import { PlusIcon, RectangleGroupIcon, TagIcon, XMarkIcon } from "@heroicons/react/24/outline";
ChevronDownIcon,
PlusIcon,
RectangleGroupIcon,
TagIcon,
XMarkIcon,
} from "@heroicons/react/24/outline";
// types // types
import { IIssue, IIssueLabels } from "types"; import { IIssue, IIssueLabels } from "types";
// fetch-keys // fetch-keys
@ -281,18 +275,15 @@ export const SidebarLabelSelect: React.FC<Props> = ({
<Popover className="relative"> <Popover className="relative">
{({ open }) => ( {({ open }) => (
<> <>
<Popover.Button <Popover.Button className="grid place-items-center outline-none">
className={`flex items-center gap-1 rounded-md bg-custom-background-80 p-1 outline-none focus:ring-2 focus:ring-custom-primary`}
>
{watch("color") && watch("color") !== "" && ( {watch("color") && watch("color") !== "" && (
<span <span
className="h-5 w-5 rounded" className="h-6 w-6 rounded"
style={{ style={{
backgroundColor: watch("color") ?? "black", backgroundColor: watch("color") ?? "black",
}} }}
/> />
)} )}
<ChevronDownIcon className="h-3 w-3" />
</Popover.Button> </Popover.Button>
<Transition <Transition
@ -304,7 +295,7 @@ export const SidebarLabelSelect: React.FC<Props> = ({
leaveFrom="opacity-100 translate-y-0" leaveFrom="opacity-100 translate-y-0"
leaveTo="opacity-0 translate-y-1" leaveTo="opacity-0 translate-y-1"
> >
<Popover.Panel className="absolute right-0 bottom-8 z-10 mt-1 max-w-xs transform px-2 sm:px-0"> <Popover.Panel className="absolute z-10 mt-1.5 max-w-xs px-2 sm:px-0">
<Controller <Controller
name="color" name="color"
control={labelControl} control={labelControl}

View File

@ -285,7 +285,7 @@ export const IssueDetailsSidebar: React.FC<Props> = ({
user={user} user={user}
/> />
<div className="h-full w-full flex flex-col divide-y-2 divide-custom-border-200 overflow-hidden"> <div className="h-full w-full flex flex-col divide-y-2 divide-custom-border-200 overflow-hidden">
<div className="flex items-center justify-between pb-3"> <div className="flex items-center justify-between px-5 pb-3">
<h4 className="text-sm font-medium"> <h4 className="text-sm font-medium">
{issueDetail?.project_detail?.identifier}-{issueDetail?.sequence_id} {issueDetail?.project_detail?.identifier}-{issueDetail?.sequence_id}
</h4> </h4>
@ -327,7 +327,7 @@ export const IssueDetailsSidebar: React.FC<Props> = ({
</div> </div>
</div> </div>
<div className="h-full w-full overflow-y-auto"> <div className="h-full w-full px-5 overflow-y-auto">
<div className={`divide-y-2 divide-custom-border-200 ${uneditable ? "opacity-60" : ""}`}> <div className={`divide-y-2 divide-custom-border-200 ${uneditable ? "opacity-60" : ""}`}>
{showFirstSection && ( {showFirstSection && (
<div className="py-1"> <div className="py-1">

View File

@ -19,6 +19,7 @@ export const JoinProjectModal: React.FC<TJoinProjectModalProps> = ({ onClose, on
const handleJoin = () => { const handleJoin = () => {
setIsJoiningLoading(true); setIsJoiningLoading(true);
onJoin() onJoin()
.then(() => { .then(() => {
setIsJoiningLoading(false); setIsJoiningLoading(false);
@ -59,7 +60,7 @@ export const JoinProjectModal: React.FC<TJoinProjectModalProps> = ({ onClose, on
leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveFrom="opacity-100 translate-y-0 sm:scale-100"
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
> >
<Dialog.Panel className="relative transform overflow-hidden rounded-lg bg-custom-background-80 px-5 py-8 text-left shadow-xl transition-all sm:w-full sm:max-w-xl sm:p-6"> <Dialog.Panel className="relative transform overflow-hidden rounded-lg bg-custom-background-100 border border-custom-border-300 px-5 py-8 text-left shadow-xl transition-all sm:w-full sm:max-w-xl sm:p-6">
<div className="space-y-5"> <div className="space-y-5">
<Dialog.Title <Dialog.Title
as="h3" as="h3"

View File

@ -48,7 +48,7 @@ export const ProjectSidebarList: FC = () => {
const { projects: allProjects } = useProjects(); const { projects: allProjects } = useProjects();
const joinedProjects = allProjects?.filter((p) => p.sort_order); const joinedProjects = allProjects?.filter((p) => p.is_member);
const favoriteProjects = allProjects?.filter((p) => p.is_favorite); const favoriteProjects = allProjects?.filter((p) => p.is_favorite);
const orderedJoinedProjects: IProject[] | undefined = joinedProjects const orderedJoinedProjects: IProject[] | undefined = joinedProjects
@ -201,7 +201,7 @@ export const ProjectSidebarList: FC = () => {
key={project.id} key={project.id}
draggableId={project.id} draggableId={project.id}
index={index} index={index}
isDragDisabled={project.sort_order === null} isDragDisabled={!project.is_member}
> >
{(provided, snapshot) => ( {(provided, snapshot) => (
<div ref={provided.innerRef} {...provided.draggableProps}> <div ref={provided.innerRef} {...provided.draggableProps}>

View File

@ -148,7 +148,7 @@ const IssueDetailsPage: NextPage = () => {
<div className="w-2/3 h-full overflow-y-auto space-y-5 divide-y-2 divide-custom-border-300 p-5"> <div className="w-2/3 h-full overflow-y-auto space-y-5 divide-y-2 divide-custom-border-300 p-5">
<IssueMainContent issueDetails={issueDetails} submitChanges={submitChanges} /> <IssueMainContent issueDetails={issueDetails} submitChanges={submitChanges} />
</div> </div>
<div className="w-1/3 h-full space-y-5 border-l border-custom-border-300 p-5 overflow-hidden"> <div className="w-1/3 h-full space-y-5 border-l border-custom-border-300 py-5 overflow-hidden">
<IssueDetailsSidebar <IssueDetailsSidebar
control={control} control={control}
issueDetail={issueDetails} issueDetail={issueDetails}

View File

@ -28,6 +28,8 @@ import type { NextPage } from "next";
import { PROJECT_MEMBERS } from "constants/fetch-keys"; import { PROJECT_MEMBERS } from "constants/fetch-keys";
// helper // helper
import { truncateText } from "helpers/string.helper"; import { truncateText } from "helpers/string.helper";
// types
import { IProject } from "types";
const ProjectsPage: NextPage = () => { const ProjectsPage: NextPage = () => {
// router // router
@ -39,7 +41,7 @@ const ProjectsPage: NextPage = () => {
const { user } = useUserAuth(); const { user } = useUserAuth();
// context data // context data
const { activeWorkspace } = useWorkspaces(); const { activeWorkspace } = useWorkspaces();
const { projects } = useProjects(); const { projects, mutateProjects } = useProjects();
// states // states
const [deleteProject, setDeleteProject] = useState<string | null>(null); const [deleteProject, setDeleteProject] = useState<string | null>(null);
const [selectedProjectToJoin, setSelectedProjectToJoin] = useState<string | null>(null); const [selectedProjectToJoin, setSelectedProjectToJoin] = useState<string | null>(null);
@ -101,6 +103,14 @@ const ProjectsPage: NextPage = () => {
}) })
.then(async () => { .then(async () => {
mutate(PROJECT_MEMBERS(project.id)); mutate(PROJECT_MEMBERS(project.id));
mutateProjects<IProject[]>(
(prevData) =>
(prevData ?? []).map((p) => ({
...p,
is_member: p.id === project.id ? true : p.is_member,
})),
false
);
setSelectedProjectToJoin(null); setSelectedProjectToJoin(null);
}) })
.catch(() => { .catch(() => {