Skip to content
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

Fix word wrapping and spacing of cards #81

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions todoqueue_frontend/src/components/tasks/Tasks.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
gap: 16px;
overflow-x: auto;
overflow-y: visible;
white-space: nowrap;
/* white-space: nowrap; */
flex-wrap: nowrap;
position: absolute;
/* Change from relative to absolute */
Expand All @@ -95,7 +95,7 @@
background: #f9f9f9;
width: 170px;
min-width: 170px;
height: 100px;
/* height: 100px; */
margin: 10px;
border: 2px solid #e0e0e0;
cursor: pointer;
Expand Down Expand Up @@ -123,8 +123,7 @@
}

.task-wrapper::after {
content: "";
position: absolute;
position: relative;
top: 0;
bottom: 0;
right: 0;
Expand All @@ -138,8 +137,6 @@
/* Align tasks vertically */
align-items: center;
/* Center tasks horizontally */
gap: 120px;
/* Spacing between tasks */
bottom: 100px;
/* Lower bottom since the scores disappear */
}
Expand All @@ -155,6 +152,8 @@
/* Initial position of the task cards */
bottom: auto;
/* Reset the bottom property */
position: relative;
/* Make spacing work properly */
transition: left 0.75s cubic-bezier(0.68, -0.55, 0.27, 1.55);
/* Transition effect for the left property */
}
Expand Down
9 changes: 7 additions & 2 deletions todoqueue_frontend/src/components/tasks/Tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,10 @@ const Tasks = ({ selectedHousehold, showSelectedHouseholdSelector, setShowHouseh
style={
windowWidth < 800
? { left: `calc(${task.staleness} * (100% - 200px))` }
: { bottom: `calc(${(task.staleness) * 100}% - ${task.staleness * 120}px)` }
: {
bottom: `calc(${(task.staleness) * 100}%)`,
transform: `translateY(calc(${task.staleness * 100}% + ${task.staleness * 30}px))`
}
}
>
<div className="task-content">
Expand All @@ -358,7 +361,9 @@ const Tasks = ({ selectedHousehold, showSelectedHouseholdSelector, setShowHouseh
</div>
</div>
</div>
))}
))
}


<div className={`empty-state ${noTasks && selectedHousehold ? "show" : "hide"}`} >
<h3>You have no tasks!</h3>
Expand Down