Skip to content

Commit

Permalink
chore: workspace view display filters and properties , code refactor (#…
Browse files Browse the repository at this point in the history
…2295)

* chore: spreadsheet view context

* chore: spreadsheet context provider

* chore: spreadsheet view context

* chore: display filters and properties added in workspace view and code refactor

* fix: build error fix

* chore: set sub-issue display option to false for global views

---------

Co-authored-by: gurusainath <gurusainath007@gmail.com>
  • Loading branch information
anmolsinghbhatia and gurusainath authored Sep 28, 2023
1 parent 4503810 commit a048e51
Show file tree
Hide file tree
Showing 48 changed files with 3,121 additions and 2,371 deletions.
1 change: 0 additions & 1 deletion web/components/command-palette/command-pallette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ export const CommandPalette: React.FC = observer(() => {
/>
<CreateUpdateViewModal
handleClose={() => setIsCreateViewModalOpen(false)}
viewType="project"
isOpen={isCreateViewModalOpen}
user={user}
/>
Expand Down
61 changes: 2 additions & 59 deletions web/components/core/filters/filters-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ import { replaceUnderscoreIfSnakeCase } from "helpers/string.helper";
// helpers
import { renderShortDateWithYearFormat } from "helpers/date-time.helper";
// types
import {
IIssueFilterOptions,
IIssueLabels,
IProject,
IState,
IUserLite,
TStateGroups,
} from "types";
import { IIssueFilterOptions, IIssueLabels, IState, IUserLite, TStateGroups } from "types";
// constants
import { STATE_GROUP_COLORS } from "constants/state";

Expand All @@ -27,9 +20,7 @@ type Props = {
clearAllFilters: (...args: any) => void;
labels: IIssueLabels[] | undefined;
members: IUserLite[] | undefined;
states?: IState[] | undefined;
stateGroup?: string[] | undefined;
project?: IProject[] | undefined;
states: IState[] | undefined;
};

export const FiltersList: React.FC<Props> = ({
Expand All @@ -39,7 +30,6 @@ export const FiltersList: React.FC<Props> = ({
labels,
members,
states,
project,
}) => {
if (!filters) return <></>;

Expand Down Expand Up @@ -165,29 +155,6 @@ export const FiltersList: React.FC<Props> = ({
: key === "assignees"
? filters.assignees?.map((memberId: string) => {
const member = members?.find((m) => m.id === memberId);
return (
<div
key={memberId}
className="inline-flex items-center gap-x-1 rounded-full bg-custom-background-90 px-1"
>
<Avatar user={member} />
<span>{member?.display_name}</span>
<span
className="cursor-pointer"
onClick={() =>
setFilters({
assignees: filters.assignees?.filter((p: any) => p !== memberId),
})
}
>
<XMarkIcon className="h-3 w-3" />
</span>
</div>
);
})
: key === "subscriber"
? filters.subscriber?.map((memberId: string) => {
const member = members?.find((m) => m.id === memberId);

return (
<div
Expand Down Expand Up @@ -333,30 +300,6 @@ export const FiltersList: React.FC<Props> = ({
</div>
);
})
: key === "project"
? filters.project?.map((projectId) => {
const currentProject = project?.find((p) => p.id === projectId);
console.log("currentProject", currentProject);
console.log("currentProject", projectId);
return (
<p
key={currentProject?.id}
className="inline-flex items-center gap-x-1 rounded-full px-2 py-0.5 capitalize"
>
<span>{currentProject?.name}</span>
<span
className="cursor-pointer"
onClick={() =>
setFilters({
project: filters.project?.filter((p) => p !== projectId),
})
}
>
<XMarkIcon className="h-3 w-3" />
</span>
</p>
);
})
: (filters[key] as any)?.join(", ")}
<button
type="button"
Expand Down
1 change: 1 addition & 0 deletions web/components/core/filters/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from "./date-filter-modal";
export * from "./date-filter-select";
export * from "./filters-list";
export * from "./workspace-filters-list";
export * from "./issues-view-filter";
Loading

2 comments on commit a048e51

@vercel
Copy link

@vercel vercel bot commented on a048e51 Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plane-dev – ./web/

plane-dev-git-develop-plane.vercel.app
plane-dev.vercel.app
plane-dev-plane.vercel.app

@vercel
Copy link

@vercel vercel bot commented on a048e51 Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plane-sh-dev – ./space/

plane-space-dev.vercel.app
plane-sh-dev-plane.vercel.app
plane-sh-dev-git-develop-plane.vercel.app

Please sign in to comment.