[WEB-2542] Fix: display filter and tooltip issues in list layout. (#5696)
* [WEB-2542] fix: list layout issues. * fix: issue type display filter not working. * fix: layout shift when hovered on bulkops checkbox. * fix: build errors. * fix: lint errors
This commit is contained in:
parent
22623fad33
commit
6942e491d0
10 changed files with 18 additions and 18 deletions
|
|
@ -34,8 +34,8 @@ import { USER_ROLES } from "@/constants/workspace";
|
||||||
import { useUser, useUserSettings } from "@/hooks/store";
|
import { useUser, useUserSettings } from "@/hooks/store";
|
||||||
// import { ProfileSettingsLayout } from "@/layouts/settings-layout";
|
// import { ProfileSettingsLayout } from "@/layouts/settings-layout";
|
||||||
// layouts
|
// layouts
|
||||||
import { FileService } from "@/services/file.service";
|
|
||||||
import { ENABLE_LOCAL_DB_CACHE } from "@/plane-web/constants/issues";
|
import { ENABLE_LOCAL_DB_CACHE } from "@/plane-web/constants/issues";
|
||||||
|
import { FileService } from "@/services/file.service";
|
||||||
// services
|
// services
|
||||||
// types
|
// types
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ export const IssueBlock = observer((props: IssueBlockProps) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
//TODO: add better logic. This is to have a min width for ID/Key based on the length of project identifier
|
//TODO: add better logic. This is to have a min width for ID/Key based on the length of project identifier
|
||||||
const keyMinWidth = (projectIdentifier?.length ?? 0) * 7;
|
const keyMinWidth = displayProperties?.key ? (projectIdentifier?.length ?? 0) * 7 : 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ControlLink
|
<ControlLink
|
||||||
|
|
@ -178,7 +178,6 @@ export const IssueBlock = observer((props: IssueBlockProps) => {
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
disabled={issue.project_id === projectId}
|
disabled={issue.project_id === projectId}
|
||||||
renderByDefault={false}
|
|
||||||
>
|
>
|
||||||
<div className="flex-shrink-0 grid place-items-center w-3.5 absolute left-1">
|
<div className="flex-shrink-0 grid place-items-center w-3.5 absolute left-1">
|
||||||
<MultipleSelectEntityAction
|
<MultipleSelectEntityAction
|
||||||
|
|
@ -196,13 +195,14 @@ export const IssueBlock = observer((props: IssueBlockProps) => {
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{displayProperties && displayProperties?.key && (
|
{displayProperties && (displayProperties.key || displayProperties.issue_type) && (
|
||||||
<div className="flex-shrink-0" style={{ minWidth: `${keyMinWidth}px` }}>
|
<div className="flex-shrink-0" style={{ minWidth: `${keyMinWidth}px` }}>
|
||||||
{issue.project_id && (
|
{issue.project_id && (
|
||||||
<IssueIdentifier
|
<IssueIdentifier
|
||||||
issueId={issueId}
|
issueId={issueId}
|
||||||
projectId={issue.project_id}
|
projectId={issue.project_id}
|
||||||
textContainerClassName="text-xs font-medium text-custom-text-300"
|
textContainerClassName="text-xs font-medium text-custom-text-300"
|
||||||
|
displayProperties={displayProperties}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -293,4 +293,4 @@ export const IssueBlock = observer((props: IssueBlockProps) => {
|
||||||
</Row>
|
</Row>
|
||||||
</ControlLink>
|
</ControlLink>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import { FC, ReactNode } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import useSWRImmutable from "swr/immutable";
|
|
||||||
|
|
||||||
// components
|
// components
|
||||||
import { JoinProject } from "@/components/auth-screens";
|
import { JoinProject } from "@/components/auth-screens";
|
||||||
|
|
@ -23,10 +22,11 @@ import {
|
||||||
useProjectView,
|
useProjectView,
|
||||||
useUserPermissions,
|
useUserPermissions,
|
||||||
} from "@/hooks/store";
|
} from "@/hooks/store";
|
||||||
|
// local
|
||||||
|
import { persistence } from "@/local-db/storage.sqlite";
|
||||||
// plane web constants
|
// plane web constants
|
||||||
import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions";
|
import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions";
|
||||||
// images
|
// images
|
||||||
import { persistence } from "@/local-db/storage.sqlite";
|
|
||||||
import emptyProject from "@/public/empty-state/onboarding/dashboard-light.webp";
|
import emptyProject from "@/public/empty-state/onboarding/dashboard-light.webp";
|
||||||
|
|
||||||
interface IProjectAuthWrapper {
|
interface IProjectAuthWrapper {
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,11 @@ import { LogoSpinner } from "@/components/common";
|
||||||
import { useMember, useProject, useUser, useUserPermissions, useWorkspace } from "@/hooks/store";
|
import { useMember, useProject, useUser, useUserPermissions, useWorkspace } from "@/hooks/store";
|
||||||
import { useFavorite } from "@/hooks/store/use-favorite";
|
import { useFavorite } from "@/hooks/store/use-favorite";
|
||||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||||
|
// local
|
||||||
|
import { persistence } from "@/local-db/storage.sqlite";
|
||||||
// constants
|
// constants
|
||||||
import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions";
|
import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions";
|
||||||
// images
|
// images
|
||||||
import { persistence } from "@/local-db/storage.sqlite";
|
|
||||||
import PlaneBlackLogo from "@/public/plane-logos/black-horizontal-with-blue-logo.png";
|
import PlaneBlackLogo from "@/public/plane-logos/black-horizontal-with-blue-logo.png";
|
||||||
import PlaneWhiteLogo from "@/public/plane-logos/white-horizontal-with-blue-logo.png";
|
import PlaneWhiteLogo from "@/public/plane-logos/white-horizontal-with-blue-logo.png";
|
||||||
import WorkSpaceNotAvailable from "@/public/workspace/workspace-not-available.png";
|
import WorkSpaceNotAvailable from "@/public/workspace/workspace-not-available.png";
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ if (typeof window !== "undefined" && window) {
|
||||||
window.requestIdleCallback =
|
window.requestIdleCallback =
|
||||||
window.requestIdleCallback ??
|
window.requestIdleCallback ??
|
||||||
function (cb) {
|
function (cb) {
|
||||||
var start = Date.now();
|
const start = Date.now();
|
||||||
return setTimeout(function () {
|
return setTimeout(function () {
|
||||||
cb({
|
cb({
|
||||||
didTimeout: false,
|
didTimeout: false,
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ export class Storage {
|
||||||
try {
|
try {
|
||||||
const storageManager = window.navigator.storage;
|
const storageManager = window.navigator.storage;
|
||||||
const fileSystemDirectoryHandle = await storageManager.getDirectory();
|
const fileSystemDirectoryHandle = await storageManager.getDirectory();
|
||||||
//@ts-expect-error
|
//@ts-expect-error , clear local issue cache
|
||||||
await fileSystemDirectoryHandle.remove({ recursive: true });
|
await fileSystemDirectoryHandle.remove({ recursive: true });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Error clearing sqlite sync storage", e);
|
console.error("Error clearing sqlite sync storage", e);
|
||||||
|
|
|
||||||
|
|
@ -77,9 +77,7 @@ export const getMetaKeysFragment = (queries: any) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let sql;
|
const sql = ` ('${Array.from(fields).join("','")}')`;
|
||||||
|
|
||||||
sql = ` ('${Array.from(fields).join("','")}')`;
|
|
||||||
|
|
||||||
return sql;
|
return sql;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -408,6 +408,7 @@ export class ProjectStore implements IProjectStore {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Failed to delete project from project store");
|
console.log("Failed to delete project from project store");
|
||||||
this.fetchProjects(workspaceSlug);
|
this.fetchProjects(workspaceSlug);
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import { TUserPermissions } from "@plane/types/src/enums";
|
||||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||||
// local
|
// local
|
||||||
import { persistence } from "@/local-db/storage.sqlite";
|
import { persistence } from "@/local-db/storage.sqlite";
|
||||||
|
import { ENABLE_LOCAL_DB_CACHE } from "@/plane-web/constants/issues";
|
||||||
import { EUserPermissions } from "@/plane-web/constants/user-permissions";
|
import { EUserPermissions } from "@/plane-web/constants/user-permissions";
|
||||||
// services
|
// services
|
||||||
import { AuthService } from "@/services/auth.service";
|
import { AuthService } from "@/services/auth.service";
|
||||||
|
|
@ -19,7 +20,6 @@ import { IAccountStore } from "@/store/user/account.store";
|
||||||
import { ProfileStore, IUserProfileStore } from "@/store/user/profile.store";
|
import { ProfileStore, IUserProfileStore } from "@/store/user/profile.store";
|
||||||
import { IUserPermissionStore, UserPermissionStore } from "./permissions.store";
|
import { IUserPermissionStore, UserPermissionStore } from "./permissions.store";
|
||||||
import { IUserSettingsStore, UserSettingsStore } from "./settings.store";
|
import { IUserSettingsStore, UserSettingsStore } from "./settings.store";
|
||||||
import { ENABLE_LOCAL_DB_CACHE } from "@/plane-web/constants/issues";
|
|
||||||
|
|
||||||
type TUserErrorStatus = {
|
type TUserErrorStatus = {
|
||||||
status: string;
|
status: string;
|
||||||
|
|
|
||||||
|
|
@ -81,11 +81,11 @@ export class ProfileStore implements IUserProfileStore {
|
||||||
|
|
||||||
// helper action
|
// helper action
|
||||||
mutateUserProfile = (data: Partial<TUserProfile>) => {
|
mutateUserProfile = (data: Partial<TUserProfile>) => {
|
||||||
if (!data) return
|
if (!data) return;
|
||||||
Object.entries(data).forEach(([key, value]) => {
|
Object.entries(data).forEach(([key, value]) => {
|
||||||
if (key in this.data) set(this.data, key, value);
|
if (key in this.data) set(this.data, key, value);
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// actions
|
// actions
|
||||||
/**
|
/**
|
||||||
|
|
@ -129,7 +129,7 @@ export class ProfileStore implements IUserProfileStore {
|
||||||
}
|
}
|
||||||
const userProfile = await this.userService.updateCurrentUserProfile(data);
|
const userProfile = await this.userService.updateCurrentUserProfile(data);
|
||||||
return userProfile;
|
return userProfile;
|
||||||
} catch (error) {
|
} catch {
|
||||||
if (currentUserProfileData) {
|
if (currentUserProfileData) {
|
||||||
this.mutateUserProfile(currentUserProfileData);
|
this.mutateUserProfile(currentUserProfileData);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue