Skip to content

Commit 0786ccb

Browse files
Merge pull request #2317 from makeplane/sync/ce-ee
Sync: Community Changes
2 parents fd2b509 + 8c001d7 commit 0786ccb

File tree

8 files changed

+41
-16
lines changed

8 files changed

+41
-16
lines changed

apiserver/plane/api/serializers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
from .cycle import CycleSerializer, CycleIssueSerializer, CycleLiteSerializer
1616
from .module import ModuleSerializer, ModuleIssueSerializer, ModuleLiteSerializer
1717
from .intake import IntakeIssueSerializer
18+
from .estimate import EstimatePointSerializer
1819
from .issue_type import IssueTypeAPISerializer, ProjectIssueTypeAPISerializer
19-
from .user import UserLiteSerializer

apiserver/plane/api/serializers/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def to_representation(self, instance):
7272
StateLiteSerializer,
7373
UserLiteSerializer,
7474
WorkspaceLiteSerializer,
75+
EstimatePointSerializer,
7576
)
7677

7778
# Expansion mapper
@@ -88,6 +89,7 @@ def to_representation(self, instance):
8889
"owned_by": UserLiteSerializer,
8990
"members": UserLiteSerializer,
9091
"parent": IssueLiteSerializer,
92+
"estimate_point": EstimatePointSerializer,
9193
}
9294
# Check if field in expansion then expand the field
9395
if expand in expansion:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Module imports
2+
from plane.db.models import EstimatePoint
3+
from .base import BaseSerializer
4+
5+
6+
class EstimatePointSerializer(BaseSerializer):
7+
class Meta:
8+
model = EstimatePoint
9+
fields = ["id", "value"]
10+
read_only_fields = fields

web/core/components/editor/sticky-editor/editor.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ import React, { useState } from "react";
33
import { EIssueCommentAccessSpecifier } from "@plane/constants";
44
// plane editor
55
import { EditorRefApi, ILiteTextEditor, LiteTextEditorWithRef } from "@plane/editor";
6-
// components
6+
// plane types
77
import { TSticky } from "@plane/types";
88
// helpers
99
import { cn } from "@/helpers/common.helper";
1010
import { getEditorFileHandlers } from "@/helpers/editor.helper";
11-
// hooks
1211
// plane web hooks
1312
import { useEditorFlagging } from "@/plane-web/hooks/use-editor-flagging";
1413
import { useFileSize } from "@/plane-web/hooks/use-file-size";
@@ -60,7 +59,7 @@ export const StickyEditor = React.forwardRef<EditorRefApi, StickyEditorWrapperPr
6059

6160
return (
6261
<div
63-
className={cn("relative border border-custom-border-200 rounded p-3", parentClassName)}
62+
className={cn("relative border border-custom-border-200 rounded", parentClassName)}
6463
onFocus={() => !showToolbarInitially && setIsFocused(true)}
6564
onBlur={() => !showToolbarInitially && setIsFocused(false)}
6665
>
@@ -82,10 +81,10 @@ export const StickyEditor = React.forwardRef<EditorRefApi, StickyEditorWrapperPr
8281
/>
8382
{showToolbar && (
8483
<div
85-
className={cn(
86-
"transition-all duration-300 ease-out origin-top",
87-
isFocused ? "max-h-[200px] opacity-100 scale-y-100 mt-3" : "max-h-0 opacity-0 scale-y-0 invisible"
88-
)}
84+
className={cn("transition-all duration-300 ease-out origin-top px-4 h-[60px]", {
85+
"max-h-[60px] opacity-100 scale-y-100": isFocused,
86+
"max-h-0 opacity-0 scale-y-0 invisible": !isFocused,
87+
})}
8988
>
9089
<StickyEditorToolbar
9190
executeCommand={(item) => {

web/core/components/editor/sticky-editor/toolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const StickyEditorToolbar: React.FC<Props> = (props) => {
5858
useOutsideClickDetector(colorPaletteRef, () => setShowColorPalette(false));
5959

6060
return (
61-
<div className="flex w-full justify-between mt-2 h-full">
61+
<div className="flex w-full justify-between h-full">
6262
<div className="flex my-auto gap-4" ref={colorPaletteRef}>
6363
{/* color palette */}
6464
{showColorPalette && <ColorPalette handleUpdate={handleColorChange} />}

web/core/components/stickies/layout/sticky-dnd-wrapper.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,20 @@ export const StickyDNDWrapper = observer((props: Props) => {
121121
}, [handleDrop, isDragging, isLastChild, pathname, stickyId, workspaceSlug]);
122122

123123
return (
124-
<div className="flex min-h-[300px] box-border p-2 flex-col" style={{ width: itemWidth }}>
125-
{!isInFirstRow && <DropIndicator isVisible={instruction === "reorder-above"} />}
124+
<div
125+
className="flex flex-col box-border p-[8px]"
126+
style={{
127+
width: itemWidth,
128+
}}
129+
>
130+
{/* {!isInFirstRow && <DropIndicator isVisible={instruction === "reorder-above"} />} */}
126131
<StickyNote
127132
key={stickyId || "new"}
128133
workspaceSlug={workspaceSlug}
129134
stickyId={stickyId}
130135
handleLayout={handleLayout}
131136
/>
132-
{!isInLastRow && <DropIndicator isVisible={instruction === "reorder-below"} />}
137+
{/* {!isInLastRow && <DropIndicator isVisible={instruction === "reorder-below"} />} */}
133138
</div>
134139
);
135140
});

web/core/components/stickies/sticky/inputs.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { useCallback, useEffect, useRef } from "react";
2+
import { usePathname } from "next/navigation";
23
import { Controller, useForm } from "react-hook-form";
34
// plane editor
45
import { EditorRefApi } from "@plane/editor";
56
// plane types
67
import { TSticky } from "@plane/types";
78
// plane utils
8-
import { isCommentEmpty } from "@plane/utils";
9+
import { cn, isCommentEmpty } from "@plane/utils";
910
// hooks
1011
import { useWorkspace } from "@/hooks/store";
1112
// components
@@ -25,10 +26,13 @@ export const StickyInput = (props: TProps) => {
2526
const { stickyData, workspaceSlug, handleUpdate, stickyId, handleDelete, handleChange, showToolbar } = props;
2627
// refs
2728
const editorRef = useRef<EditorRefApi>(null);
29+
// navigation
30+
const pathname = usePathname();
2831
// store hooks
2932
const { getWorkspaceBySlug } = useWorkspace();
3033
// derived values
3134
const workspaceId = getWorkspaceBySlug(workspaceSlug)?.id?.toString() ?? "";
35+
const isStickiesPage = pathname?.includes("stickies");
3236
// form info
3337
const { handleSubmit, reset, control } = useForm<TSticky>({
3438
defaultValues: {
@@ -74,10 +78,15 @@ export const StickyInput = (props: TProps) => {
7478
if (!isContentEmpty) return "";
7579
return "Click to type here";
7680
}}
77-
containerClassName="px-0 text-base min-h-[250px] w-full"
81+
containerClassName={cn(
82+
"w-full min-h-[256px] max-h-[540px] overflow-y-scroll vertical-scrollbar scrollbar-sm p-4 text-base",
83+
{
84+
"max-h-[588px]": isStickiesPage,
85+
}
86+
)}
7887
uploadFile={async () => ""}
7988
showToolbar={showToolbar}
80-
parentClassName={"border-none p-0"}
89+
parentClassName="border-none p-0"
8190
handleDelete={handleDelete}
8291
handleColorChange={handleChange}
8392
ref={editorRef}

web/core/components/stickies/sticky/root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const StickyNote = observer((props: TProps) => {
7474
handleClose={() => setIsDeleteModalOpen(false)}
7575
/>
7676
<div
77-
className={cn("w-full flex flex-col h-fit rounded p-4 group/sticky max-h-[650px] overflow-y-scroll", className)}
77+
className={cn("w-full h-fit flex flex-col rounded group/sticky overflow-y-scroll", className)}
7878
style={{
7979
backgroundColor,
8080
}}

0 commit comments

Comments
 (0)