-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[WEB-2442] fix : Timeline layout bugs #5946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5ac4cad
fix relation creation and removal for Issue relations
rahulramesha d48128b
fix Scrolling to block when the block is beyond current chart's limits
rahulramesha e99bf4f
fix dark mode for timeline layout
rahulramesha ac3dd68
use a hook to get the current relations available in the environment,…
rahulramesha 623c2b0
Update relation activity for all the relations
rahulramesha 9c373f6
Merge branch 'preview' of github.com:makeplane/plane into fix-timelin…
rahulramesha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix critical bug in relates_to case and improve message consistency.
There are several issues in the switch statement:
relates_tocase is missing areturnstatement, making it always returnundefinedApply these fixes:
switch (activity.field) { case "blocking": - return activity.old_value === "" ? `marked this issue is blocking issue ` : `removed the blocking issue `; + return activity.old_value === "" ? `marked this issue as blocking ` : `removed blocking relation from `; case "blocked_by": return activity.old_value === "" - ? `marked this issue is being blocked by ` - : `removed this issue being blocked by issue `; + ? `marked this issue as blocked by ` + : `removed blocked by relation from `; 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 activity.old_value === "" ? `marked this issue as related to ` : `removed relation from `; }📝 Committable suggestion