fix: bug and ui fix (#1073)

* fix: cycle and module sidebar scroll

* style: date picker theming

* style: workspace slug spacing

* fix: app sidebar z-index

* fix: favorite cycle mutation

* fix: cycle modal on error close

* feat: cycle view context

* style: active cycle stats scroll

* fix: active cycle favorite mutation

* feat: import export banner

* feat: cycle sidebar date picker logic updated

* fix: NaN in progress percentage fix

* fix: tooltip fix

* style: empty state for active cycle

* style: cycle badge width fix , all cycle empty state fix and cycle icon size fix
This commit is contained in:
Anmol Singh Bhatia 2023-05-18 19:07:01 +05:30 committed by GitHub
parent c3d520aefd
commit 5916d6e749
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 436 additions and 159 deletions

View file

@ -13,9 +13,10 @@ import {
CompletedCycles,
} from "components/cycles";
// ui
import { Loader } from "components/ui";
import { EmptyState, Loader } from "components/ui";
// icons
import { ListBulletIcon, Squares2X2Icon } from "@heroicons/react/24/outline";
import emptyCycle from "public/empty-state/empty-cycle.svg";
// types
import {
SelectCycleType,
@ -25,8 +26,6 @@ import {
} from "types";
type Props = {
cycleView: string;
setCycleView: React.Dispatch<React.SetStateAction<string>>;
setSelectedCycle: React.Dispatch<React.SetStateAction<SelectCycleType>>;
setCreateUpdateCycleModal: React.Dispatch<React.SetStateAction<boolean>>;
cyclesCompleteList: ICycle[] | undefined;
@ -35,8 +34,6 @@ type Props = {
};
export const CyclesView: React.FC<Props> = ({
cycleView,
setCycleView,
setSelectedCycle,
setCreateUpdateCycleModal,
cyclesCompleteList,
@ -44,6 +41,7 @@ export const CyclesView: React.FC<Props> = ({
draftCycles,
}) => {
const { storedValue: cycleTab, setValue: setCycleTab } = useLocalStorage("cycleTab", "All");
const { storedValue: cycleView, setValue: setCycleView } = useLocalStorage("cycleView", "list");
const currentTabValue = (tab: string | null) => {
switch (tab) {
@ -153,8 +151,15 @@ export const CyclesView: React.FC<Props> = ({
)}
</Tab.Panel>
<Tab.Panel as="div" className="mt-7 space-y-5">
{currentAndUpcomingCycles?.current_cycle?.[0] && (
{currentAndUpcomingCycles?.current_cycle?.[0] ? (
<ActiveCycleDetails cycle={currentAndUpcomingCycles?.current_cycle?.[0]} />
) : (
<EmptyState
type="cycle"
title="Create New Cycle"
description="Sprint more effectively with Cycles by confining your project to a fixed amount of time. Create new cycle now."
imgURL={emptyCycle}
/>
)}
</Tab.Panel>
<Tab.Panel as="div" className="mt-7 space-y-5">
@ -177,7 +182,7 @@ export const CyclesView: React.FC<Props> = ({
</Tab.Panel>
<Tab.Panel as="div" className="mt-7 space-y-5">
<CompletedCycles
cycleView={cycleView}
cycleView={cycleView ?? "list"}
setCreateUpdateCycleModal={setCreateUpdateCycleModal}
setSelectedCycle={setSelectedCycle}
/>