Skip to content

Commit

Permalink
[Improvement] Updated assign task popup height (#2579)
Browse files Browse the repository at this point in the history
* [Improvement] Updated assign task popup height

* Fix the task list on other places
  • Loading branch information
GedeonTS authored Jun 6, 2024
1 parent 643f40e commit 874ac60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/web/lib/features/task/task-assign-popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export function TaskUnOrAssignPopover({
fullWidthCombobox
fullHeightCombobox
autoFocus
assignTaskPopup={true}
/>
</Modal>
</>
Expand Down
8 changes: 6 additions & 2 deletions apps/web/lib/features/task/task-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ type Props = {
usersTaskCreatedAssignTo?: { id: string }[];
onTaskCreated?: (task: ITeamTask | undefined) => void;
cardWithoutShadow?: boolean;
assignTaskPopup?: boolean;

forParentChildRelationship?: boolean;
} & PropsWithChildren;
Expand Down Expand Up @@ -386,6 +387,7 @@ export function TaskInput(props: Props) {
fullHeight={props.fullHeightCombobox}
handleTaskCreation={handleTaskCreation}
cardWithoutShadow={props.cardWithoutShadow}
assignTaskPopup={props.assignTaskPopup}
updatedTaskList={updatedTaskList}
forParentChildRelationship={props.forParentChildRelationship}
/>
Expand Down Expand Up @@ -436,7 +438,8 @@ function TaskCard({
handleTaskCreation,
cardWithoutShadow,
forParentChildRelationship,
updatedTaskList
updatedTaskList,
assignTaskPopup
}: {
datas: Partial<RTuseTaskInput>;
onItemClick?: (task: ITeamTask) => void;
Expand All @@ -447,6 +450,7 @@ function TaskCard({
cardWithoutShadow?: boolean;
forParentChildRelationship?: boolean;
updatedTaskList?: ITeamTask[];
assignTaskPopup?: boolean;
}) {
const [, setCount] = useState(0);
const t = useTranslations();
Expand Down Expand Up @@ -609,7 +613,7 @@ function TaskCard({

<Divider className="mt-4" />
{/* Task list */}
<ul className="py-6 max-h-56 overflow-y-auto">
<ul className={assignTaskPopup ? "py-6 max-h-[40vh] overflow-y-auto" : "py-6 max-h-56 overflow-y-auto"}>
{forParentChildRelationship &&
data?.map((task, i) => {
const last = (datas.filteredTasks?.length || 0) - 1 === i;
Expand Down

0 comments on commit 874ac60

Please sign in to comment.