Skip to content

Commit 795ee80

Browse files
authored
Merge pull request #874 from microboxlabs/873-kanban-zindex
Fixing tooltip in kanban
2 parents 0d42082 + f14b775 commit 795ee80

5 files changed

Lines changed: 111 additions & 53 deletions

File tree

turbo-repo/apps/app/src/features/common/components/absolute-modal/absolute-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function AbsoluteModal({
2222

2323
return (
2424
<div
25-
className={`fixed top-0 right-0 left-0 bottom-0 flex justify-center items-center text-white transition-all duration-300 z-[800] w-full h-full backdrop-blur-[10px] gap-2 px-4 ${selected ? "opacity-100 visible" : "opacity-0 invisible"}`}
25+
className={`fixed top-0 right-0 left-0 bottom-0 flex justify-center items-center text-white transition-all duration-300 z-800 w-full h-full backdrop-blur-[10px] gap-2 px-4 ${selected ? "opacity-100 visible" : "opacity-0 invisible"}`}
2626
role="button"
2727
tabIndex={0}
2828
onMouseDown={(e) => {

turbo-repo/apps/app/src/features/layout/components/section-header/section-header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function SectionHeader({
2525
rightContent,
2626
}: Readonly<SectionHeaderProps>) {
2727
return (
28-
<div className="sticky top-0 z-50 bg-white dark:bg-gray-900 w-full">
28+
<div className="sticky top-0 bg-white dark:bg-gray-900 w-full">
2929
<div className="px-5 h-[60px] flex items-center justify-between dark:text-white border-b border-gray-200 dark:border-gray-700">
3030
{leftContent ?? (
3131
path && breadcrumbDict ? (

turbo-repo/apps/app/src/features/shipping/components/modal-tooltip.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function ModalTooltip({
4545
selected={selectedTask}
4646
setSelected={setSelectedTask}
4747
maxWidth="1500px"
48-
maxHeight="90vh"
48+
maxHeight="80vh"
4949
height=""
5050
>
5151
<div className="p-4 text-gray-500 dark:text-gray-400">
@@ -60,7 +60,7 @@ export default function ModalTooltip({
6060
selected={selectedTask}
6161
setSelected={setSelectedTask}
6262
maxWidth="1500px"
63-
maxHeight="90vh"
63+
maxHeight="80vh"
6464
height="fit-content"
6565
>
6666
{isLoading && (

turbo-repo/apps/app/src/features/task-forms/components/task-bento-form/components/side-data/symptoms-card.tsx

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function getConditions(symptoms: any[], id: string): string[] {
4343
: [];
4444
}
4545

46-
// Symptom card component
46+
// Symptom row component (same data as before, laid out as a compact row)
4747
const SymptomCard = ({
4848
symptom,
4949
dict,
@@ -53,50 +53,49 @@ const SymptomCard = ({
5353
dict: I18nRecord;
5454
loading?: boolean;
5555
}) => {
56+
const conditions = symptom.conditions.filter(Boolean);
57+
5658
return (
57-
<div className="bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg flex items-center gap-1 p-2 w-min-[150px] h-[70px] ">
58-
{/* min-w-fit */}
59-
{/* First column: Icon and conditions */}
60-
<div className="flex flex-col items-center gap-1 min-w-0.5">
61-
<div className="text-gray-600 dark:text-gray-400 dark:bg-gray-300 rounded-lg p-1">
62-
<SymptomIcon
63-
type={symptom.icon}
64-
size="h-6 w-6"
65-
dict={dict}
66-
fixed_label={symptom.label}
67-
/>
68-
</div>
69-
<div className="flex gap-1">
70-
<div className="flex -space-x-2.5 transition-all duration-[0.5s] animate-show-flex">
71-
{Array.from(symptom.conditions).map((condition) => (
72-
<ConditionIcon
73-
key={condition}
74-
condition={condition ?? ""}
75-
size="h-4 w-4"
76-
dict={dict}
77-
/>
78-
))}
79-
</div>
80-
</div>
59+
<div className="flex items-center gap-2 py-1 px-1.5 rounded-md bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700">
60+
<div className="text-gray-600 dark:text-gray-400 dark:bg-gray-300 rounded-md p-0.5 shrink-0">
61+
<SymptomIcon
62+
type={symptom.icon}
63+
size="h-5 w-5"
64+
dict={dict}
65+
fixed_label={symptom.label}
66+
/>
8167
</div>
8268

83-
{/* Second column: Label */}
84-
<div className="flex-1 justify-center text-gray-900 dark:text-gray-100 text-[11px] font-light min-w-0 overflow-hidden">
85-
{/* <span className="text-sm text-gray-700 font-light truncate block"> */}
69+
<span className="flex-1 min-w-0 truncate font-light text-sm text-gray-600 dark:text-gray-300">
8670
{symptom.label}
87-
{/* </span> */}
88-
</div>
71+
</span>
8972

90-
{/* Third column: Number */}
91-
<div className="text-xl text-gray-800 dark:text-gray-200 flex-shrink-0">
92-
{loading ? (
93-
<div className="bg-gray-300 dark:bg-gray-700 text-gray-300 dark:text-gray-700 animate-pulse rounded-lg h-full w-full">
94-
00
95-
</div>
96-
) : (
97-
symptom.count.toString().padStart(2, "0")
98-
)}
99-
</div>
73+
{conditions.length > 0 && (
74+
<div className="flex -space-x-1.5 shrink-0">
75+
{conditions.map((condition) => (
76+
<ConditionIcon
77+
key={condition}
78+
condition={condition}
79+
size="h-4 w-4"
80+
dict={dict}
81+
/>
82+
))}
83+
</div>
84+
)}
85+
86+
{loading ? (
87+
<div className="bg-gray-300 dark:bg-gray-700 animate-pulse rounded h-4 w-6 shrink-0" />
88+
) : (
89+
<span
90+
className={`shrink-0 text-xs font-medium rounded px-1.5 py-0.5 min-w-6 text-center ${
91+
symptom.count > 0
92+
? "bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-100"
93+
: "text-gray-300 dark:text-gray-600"
94+
}`}
95+
>
96+
{symptom.count.toString().padStart(2, "0")}
97+
</span>
98+
)}
10099
</div>
101100
);
102101
};
@@ -266,12 +265,19 @@ export default function SymptomsCard({
266265
subtitle={null}
267266
>
268267
<div
269-
className={`grid gap-2 ${reactive ? "grid-cols-3 lg:grid-cols-2 2xl:grid-cols-3" : "grid-cols-2 md:grid-cols-3"}`}
268+
className={`grid gap-1.5 ${
269+
reactive
270+
? "grid-cols-1 lg:grid-cols-2 lg:[&>*:last-child:nth-child(odd)]:col-span-2"
271+
: "grid-cols-2 md:grid-cols-3 max-md:[&>*:last-child:nth-child(odd)]:col-span-2 md:[&>*:last-child:nth-child(3n+1)]:col-span-3 md:[&>*:last-child:nth-child(3n+2)]:col-span-2"
272+
}`}
270273
>
271274
{allSymptoms.map((symptom) => (
272-
<div key={symptom.key}>
273-
<SymptomCard symptom={symptom} dict={dict} loading={isLoading} />
274-
</div>
275+
<SymptomCard
276+
key={symptom.key}
277+
symptom={symptom}
278+
dict={dict}
279+
loading={isLoading}
280+
/>
275281
))}
276282
</div>
277283
</CustomCard>

0 commit comments

Comments
 (0)