[WEB-2442] fix : Timeline layout bugs (#5946)

* fix relation creation and removal for Issue relations

* fix Scrolling to block when the block is beyond current chart's limits

* fix dark mode for timeline layout

* use a hook to get the current relations available in the environment, instead of directly importing it

* Update relation activity for all the relations
This commit is contained in:
rahulramesha 2024-11-04 16:55:38 +05:30 committed by GitHub
parent a1bfde6af9
commit 71589f93ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 201 additions and 105 deletions

View file

@ -1,3 +1,4 @@
import isEmpty from "lodash/isEmpty";
import { IIssueLabel, IIssueLabelTree } from "@plane/types";
export const groupBy = (array: any[], key: string) => {
@ -90,3 +91,14 @@ export const buildTree = (array: IIssueLabel[], parent = null) => {
return tree;
};
/**
* Returns Valid keys from object whose value is not falsy
* @param obj
* @returns
*/
export const getValidKeysFromObject = (obj: any) => {
if (!obj || isEmpty(obj) || typeof obj !== "object" || Array.isArray(obj)) return [];
return Object.keys(obj).filter((key) => !!obj[key]);
};