fix(advanced checklist): UI changes (#1208)
* fix: remove create task circle * fix: adjust outer margin * fix: remove reorder icon * fix: adjust checkbox and text size Co-authored-by: Johnny Almonte <johnny243@users.noreply.github.com>
This commit is contained in:
@@ -17,9 +17,9 @@ type MainTitleProps = {
|
|||||||
crossed?: boolean
|
crossed?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export const MainTitle: React.FC<MainTitleProps> = ({ children, highlight = false, crossed = false }) => {
|
export const MainTitle: React.FC<MainTitleProps> = ({ children, highlight = false, crossed = false, ...props }) => {
|
||||||
return (
|
return (
|
||||||
<Header1 className={`sk-h1 ${highlight ? 'info' : ''}`} crossed={crossed}>
|
<Header1 className={`sk-h1 ${highlight ? 'info' : ''}`} crossed={crossed} {...props}>
|
||||||
{children}
|
{children}
|
||||||
</Header1>
|
</Header1>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ const StyledTextArea = styled.textarea`
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
font-size: 1rem;
|
font-size: 0.98rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
margin-left: 6px;
|
margin-left: 2px;
|
||||||
outline: none;
|
outline: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
resize: none;
|
resize: none;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ $transition-duration: 750ms;
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
fill: none;
|
fill: none;
|
||||||
height: 22px;
|
height: 19px;
|
||||||
left: 0;
|
left: 0;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -32,7 +32,7 @@ $transition-duration: 750ms;
|
|||||||
stroke-width: 2;
|
stroke-width: 2;
|
||||||
stroke: var(--sn-stylekit-neutral-color);
|
stroke: var(--sn-stylekit-neutral-color);
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 22px;
|
width: 19px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.align-baseline {
|
.align-baseline {
|
||||||
|
|||||||
@@ -6,18 +6,12 @@ import { useAppDispatch, useAppSelector, useDebouncedCallback } from '../../app/
|
|||||||
import { GroupModel, taskAdded, tasksGroupDraft } from './tasks-slice'
|
import { GroupModel, taskAdded, tasksGroupDraft } from './tasks-slice'
|
||||||
|
|
||||||
import { TextInput } from '../../common/components'
|
import { TextInput } from '../../common/components'
|
||||||
import { DottedCircleIcon } from '../../common/components/icons'
|
|
||||||
import { isLastActiveGroup } from '../../common/utils'
|
import { isLastActiveGroup } from '../../common/utils'
|
||||||
|
|
||||||
const Container = styled.div`
|
const Container = styled.div`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
|
|
||||||
& > *:first-child {
|
|
||||||
margin-left: 1px;
|
|
||||||
margin-right: 9px;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
|
|
||||||
type CreateTaskProps = {
|
type CreateTaskProps = {
|
||||||
@@ -67,7 +61,6 @@ const CreateTask: React.FC<CreateTaskProps> = ({ group }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
<DottedCircleIcon />
|
|
||||||
<TextInput
|
<TextInput
|
||||||
testId="create-task-input"
|
testId="create-task-input"
|
||||||
disabled={!canEdit}
|
disabled={!canEdit}
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ import TaskGroupOptions from './TaskGroupOptions'
|
|||||||
|
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { CircularProgressBar, GenericInlineText, MainTitle, RoundButton } from '../../common/components'
|
import { CircularProgressBar, GenericInlineText, MainTitle, RoundButton } from '../../common/components'
|
||||||
import { ChevronDownIcon, ChevronUpIcon, ReorderIcon } from '../../common/components/icons'
|
import { ChevronDownIcon, ChevronUpIcon } from '../../common/components/icons'
|
||||||
|
|
||||||
const TaskGroupContainer = styled.div<{ isLast?: boolean }>`
|
const TaskGroupContainer = styled.div<{ isLast?: boolean }>`
|
||||||
background-color: var(--sn-stylekit-background-color);
|
background-color: var(--sn-stylekit-background-color);
|
||||||
border: 1px solid var(--sn-stylekit-border-color);
|
border: 1px solid var(--sn-stylekit-border-color);
|
||||||
border-radius: 8px;
|
border-radius: 4px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
margin-bottom: ${({ isLast }) => (!isLast ? '9px' : '0px')};
|
margin-bottom: ${({ isLast }) => (!isLast ? '9px' : '0px')};
|
||||||
@@ -85,12 +85,7 @@ const TaskGroup: React.FC<TaskGroupProps> = ({
|
|||||||
>
|
>
|
||||||
<div className="flex items-center justify-between h-8 mt-1 mb-1">
|
<div className="flex items-center justify-between h-8 mt-1 mb-1">
|
||||||
<div className="flex flex-grow items-center" onClick={handleClick}>
|
<div className="flex flex-grow items-center" onClick={handleClick}>
|
||||||
{canEdit && (
|
<MainTitle crossed={allTasksCompleted && collapsed} highlight={isDragging} {...props}>
|
||||||
<div className="mr-3 pt-1px" {...props}>
|
|
||||||
<ReorderIcon highlight={isDragging} />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<MainTitle crossed={allTasksCompleted && collapsed} highlight={isDragging}>
|
|
||||||
{groupName}
|
{groupName}
|
||||||
</MainTitle>
|
</MainTitle>
|
||||||
<CircularProgressBar size={18} percentage={percentageCompleted} />
|
<CircularProgressBar size={18} percentage={percentageCompleted} />
|
||||||
|
|||||||
@@ -21,12 +21,8 @@ import { CheckBoxElementsDefs } from './common/components/svg'
|
|||||||
import { getPlainPreview } from './common/utils'
|
import { getPlainPreview } from './common/utils'
|
||||||
|
|
||||||
const MainContainer = styled.div`
|
const MainContainer = styled.div`
|
||||||
margin: 16px;
|
margin: 6px;
|
||||||
padding-bottom: 60px;
|
padding-bottom: 60px;
|
||||||
|
|
||||||
@media only screen and (max-width: 600px) {
|
|
||||||
margin: 8px;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
|
|
||||||
const FloatingContainer = styled.div`
|
const FloatingContainer = styled.div`
|
||||||
|
|||||||
Reference in New Issue
Block a user