[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:
parent
a1bfde6af9
commit
71589f93ca
22 changed files with 201 additions and 105 deletions
20
web/ce/components/relations/activity.ts
Normal file
20
web/ce/components/relations/activity.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { TIssueActivity } from "@plane/types";
|
||||
|
||||
export const getRelationActivityContent = (activity: TIssueActivity | undefined): string | undefined => {
|
||||
if (!activity) return;
|
||||
|
||||
switch (activity.field) {
|
||||
case "blocking":
|
||||
return activity.old_value === "" ? `marked this issue is blocking issue ` : `removed the blocking issue `;
|
||||
case "blocked_by":
|
||||
return activity.old_value === ""
|
||||
? `marked this issue is being blocked by `
|
||||
: `removed this issue being blocked by issue `;
|
||||
case "duplicate":
|
||||
return activity.old_value === "" ? `marked this issue as duplicate of ` : `removed this issue as a duplicate of `;
|
||||
case "relates_to":
|
||||
activity.old_value === "" ? `marked that this issue relates to ` : `removed the relation from `;
|
||||
}
|
||||
|
||||
return;
|
||||
};
|
||||
|
|
@ -3,6 +3,8 @@ import { RelatedIcon } from "@plane/ui";
|
|||
import { TRelationObject } from "@/components/issues";
|
||||
import { TIssueRelationTypes } from "../../types";
|
||||
|
||||
export * from "./activity";
|
||||
|
||||
export const ISSUE_RELATION_OPTIONS: Record<TIssueRelationTypes, TRelationObject> = {
|
||||
relates_to: {
|
||||
key: "relates_to",
|
||||
|
|
@ -33,3 +35,5 @@ export const ISSUE_RELATION_OPTIONS: Record<TIssueRelationTypes, TRelationObject
|
|||
placeholder: "None",
|
||||
},
|
||||
};
|
||||
|
||||
export const useTimeLineRelationOptions = () => ISSUE_RELATION_OPTIONS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue