mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
css change and refactor
This commit is contained in:
parent
34549c5e74
commit
9499698637
@ -107,14 +107,11 @@ export const BaseKanBanRoot: React.FC<IBaseKanBanLayout> = observer((props: IBas
|
|||||||
const displayProperties = issuesFilterStore?.issueFilters?.displayProperties || null;
|
const displayProperties = issuesFilterStore?.issueFilters?.displayProperties || null;
|
||||||
|
|
||||||
const sub_group_by: string | null = displayFilters?.sub_group_by || null;
|
const sub_group_by: string | null = displayFilters?.sub_group_by || null;
|
||||||
|
|
||||||
const group_by: string | null = displayFilters?.group_by || null;
|
const group_by: string | null = displayFilters?.group_by || null;
|
||||||
|
|
||||||
const order_by: string | null = displayFilters?.order_by || null;
|
|
||||||
|
|
||||||
const userDisplayFilters = displayFilters || null;
|
const userDisplayFilters = displayFilters || null;
|
||||||
|
|
||||||
const currentKanBanView: "swimlanes" | "default" = sub_group_by ? "swimlanes" : "default";
|
const KanBanView = sub_group_by ? KanBanSwimLanes : KanBan;
|
||||||
|
|
||||||
const { enableInlineEditing, enableQuickAdd, enableIssueCreation } = issueStore?.viewFlags || {};
|
const { enableInlineEditing, enableQuickAdd, enableIssueCreation } = issueStore?.viewFlags || {};
|
||||||
|
|
||||||
@ -258,8 +255,7 @@ export const BaseKanBanRoot: React.FC<IBaseKanBanLayout> = observer((props: IBas
|
|||||||
</Droppable>
|
</Droppable>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{currentKanBanView === "default" ? (
|
<KanBanView
|
||||||
<KanBan
|
|
||||||
issues={issues}
|
issues={issues}
|
||||||
issueIds={issueIds}
|
issueIds={issueIds}
|
||||||
sub_group_by={sub_group_by}
|
sub_group_by={sub_group_by}
|
||||||
@ -278,28 +274,6 @@ export const BaseKanBanRoot: React.FC<IBaseKanBanLayout> = observer((props: IBas
|
|||||||
currentStore={currentStore}
|
currentStore={currentStore}
|
||||||
addIssuesToView={addIssuesToView}
|
addIssuesToView={addIssuesToView}
|
||||||
/>
|
/>
|
||||||
) : (
|
|
||||||
<KanBanSwimLanes
|
|
||||||
issues={issues}
|
|
||||||
issueIds={issueIds}
|
|
||||||
sub_group_by={sub_group_by}
|
|
||||||
group_by={group_by}
|
|
||||||
order_by={order_by}
|
|
||||||
handleIssues={handleIssues}
|
|
||||||
quickActions={renderQuickActions}
|
|
||||||
displayProperties={displayProperties}
|
|
||||||
kanBanToggle={kanbanViewStore?.kanBanToggle}
|
|
||||||
handleKanBanToggle={handleKanBanToggle}
|
|
||||||
showEmptyGroup={userDisplayFilters?.show_empty_groups || true}
|
|
||||||
isDragStarted={isDragStarted}
|
|
||||||
disableIssueCreation={!enableIssueCreation || !isEditingAllowed}
|
|
||||||
enableQuickIssueCreate={enableQuickAdd}
|
|
||||||
currentStore={currentStore}
|
|
||||||
quickAddCallback={issueStore?.quickAddIssue}
|
|
||||||
addIssuesToView={addIssuesToView}
|
|
||||||
canEditProperties={canEditProperties}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</DragDropContext>
|
</DragDropContext>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import React from "react";
|
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
// mobx store
|
// mobx store
|
||||||
import { useMobxStore } from "lib/mobx/store-provider";
|
import { useMobxStore } from "lib/mobx/store-provider";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import React from "react";
|
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
//mobx
|
//mobx
|
||||||
import { useMobxStore } from "lib/mobx/store-provider";
|
import { useMobxStore } from "lib/mobx/store-provider";
|
||||||
@ -54,7 +53,6 @@ const SubGroupSwimlaneHeader: React.FC<ISubGroupSwimlaneHeader> = ({
|
|||||||
interface ISubGroupSwimlane extends ISubGroupSwimlaneHeader {
|
interface ISubGroupSwimlane extends ISubGroupSwimlaneHeader {
|
||||||
issues: IIssueResponse;
|
issues: IIssueResponse;
|
||||||
issueIds: any;
|
issueIds: any;
|
||||||
order_by: string | null;
|
|
||||||
showEmptyGroup: boolean;
|
showEmptyGroup: boolean;
|
||||||
handleIssues: (issue: IIssue, action: EIssueActions) => void;
|
handleIssues: (issue: IIssue, action: EIssueActions) => void;
|
||||||
quickActions: (issue: IIssue, customActionButton?: React.ReactElement) => React.ReactNode;
|
quickActions: (issue: IIssue, customActionButton?: React.ReactElement) => React.ReactNode;
|
||||||
@ -73,6 +71,7 @@ interface ISubGroupSwimlane extends ISubGroupSwimlaneHeader {
|
|||||||
data: IIssue,
|
data: IIssue,
|
||||||
viewId?: string
|
viewId?: string
|
||||||
) => Promise<IIssue | undefined>;
|
) => Promise<IIssue | undefined>;
|
||||||
|
viewId?: string;
|
||||||
}
|
}
|
||||||
const SubGroupSwimlane: React.FC<ISubGroupSwimlane> = observer((props) => {
|
const SubGroupSwimlane: React.FC<ISubGroupSwimlane> = observer((props) => {
|
||||||
const {
|
const {
|
||||||
@ -91,6 +90,7 @@ const SubGroupSwimlane: React.FC<ISubGroupSwimlane> = observer((props) => {
|
|||||||
canEditProperties,
|
canEditProperties,
|
||||||
addIssuesToView,
|
addIssuesToView,
|
||||||
quickAddCallback,
|
quickAddCallback,
|
||||||
|
viewId,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const calculateIssueCount = (column_id: string) => {
|
const calculateIssueCount = (column_id: string) => {
|
||||||
@ -139,6 +139,7 @@ const SubGroupSwimlane: React.FC<ISubGroupSwimlane> = observer((props) => {
|
|||||||
canEditProperties={canEditProperties}
|
canEditProperties={canEditProperties}
|
||||||
addIssuesToView={addIssuesToView}
|
addIssuesToView={addIssuesToView}
|
||||||
quickAddCallback={quickAddCallback}
|
quickAddCallback={quickAddCallback}
|
||||||
|
viewId={viewId}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -153,7 +154,6 @@ export interface IKanBanSwimLanes {
|
|||||||
issueIds: IGroupedIssues | ISubGroupedIssues | TUnGroupedIssues;
|
issueIds: IGroupedIssues | ISubGroupedIssues | TUnGroupedIssues;
|
||||||
sub_group_by: string | null;
|
sub_group_by: string | null;
|
||||||
group_by: string | null;
|
group_by: string | null;
|
||||||
order_by: string | null;
|
|
||||||
handleIssues: (issue: IIssue, action: EIssueActions) => void;
|
handleIssues: (issue: IIssue, action: EIssueActions) => void;
|
||||||
quickActions: (issue: IIssue, customActionButton?: React.ReactElement) => React.ReactNode;
|
quickActions: (issue: IIssue, customActionButton?: React.ReactElement) => React.ReactNode;
|
||||||
displayProperties: IIssueDisplayProperties | null;
|
displayProperties: IIssueDisplayProperties | null;
|
||||||
@ -171,6 +171,7 @@ export interface IKanBanSwimLanes {
|
|||||||
data: IIssue,
|
data: IIssue,
|
||||||
viewId?: string
|
viewId?: string
|
||||||
) => Promise<IIssue | undefined>;
|
) => Promise<IIssue | undefined>;
|
||||||
|
viewId?: string;
|
||||||
canEditProperties: (projectId: string | undefined) => boolean;
|
canEditProperties: (projectId: string | undefined) => boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +181,6 @@ export const KanBanSwimLanes: React.FC<IKanBanSwimLanes> = observer((props) => {
|
|||||||
issueIds,
|
issueIds,
|
||||||
sub_group_by,
|
sub_group_by,
|
||||||
group_by,
|
group_by,
|
||||||
order_by,
|
|
||||||
handleIssues,
|
handleIssues,
|
||||||
quickActions,
|
quickActions,
|
||||||
displayProperties,
|
displayProperties,
|
||||||
@ -193,6 +193,7 @@ export const KanBanSwimLanes: React.FC<IKanBanSwimLanes> = observer((props) => {
|
|||||||
canEditProperties,
|
canEditProperties,
|
||||||
addIssuesToView,
|
addIssuesToView,
|
||||||
quickAddCallback,
|
quickAddCallback,
|
||||||
|
viewId,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const { project, projectLabel, projectMember, projectState } = useMobxStore();
|
const { project, projectLabel, projectMember, projectState } = useMobxStore();
|
||||||
@ -228,7 +229,6 @@ export const KanBanSwimLanes: React.FC<IKanBanSwimLanes> = observer((props) => {
|
|||||||
issueIds={issueIds}
|
issueIds={issueIds}
|
||||||
group_by={group_by}
|
group_by={group_by}
|
||||||
sub_group_by={sub_group_by}
|
sub_group_by={sub_group_by}
|
||||||
order_by={order_by}
|
|
||||||
handleIssues={handleIssues}
|
handleIssues={handleIssues}
|
||||||
quickActions={quickActions}
|
quickActions={quickActions}
|
||||||
displayProperties={displayProperties}
|
displayProperties={displayProperties}
|
||||||
@ -241,6 +241,7 @@ export const KanBanSwimLanes: React.FC<IKanBanSwimLanes> = observer((props) => {
|
|||||||
addIssuesToView={addIssuesToView}
|
addIssuesToView={addIssuesToView}
|
||||||
canEditProperties={canEditProperties}
|
canEditProperties={canEditProperties}
|
||||||
quickAddCallback={quickAddCallback}
|
quickAddCallback={quickAddCallback}
|
||||||
|
viewId={viewId}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -540,3 +540,5 @@ div.web-view-spinner div.bar12 {
|
|||||||
animation-delay: -0.0833s;
|
animation-delay: -0.0833s;
|
||||||
-webkit-animation-delay: -0.0833s;
|
-webkit-animation-delay: -0.0833s;
|
||||||
}
|
}
|
||||||
|
[data-rfd-draggable-id] { will-change: transform, opacity; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user