Skip to content

Commit

Permalink
collapsed descriptions by default
Browse files Browse the repository at this point in the history
  • Loading branch information
lieut-data committed Jun 24, 2022
1 parent 8c8cdd7 commit 3de6e42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions webapp/src/components/backstage/rhs/task_inbox/task.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const Task = (props: Props) => {
checklistNum={props.item.checklist_num}
dragging={false}
collapsibleDescription={true}
descriptionCollapsedByDefault={true}
newItem={false}
disabled={false}
itemNum={props.item.item_num}
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/checklist_item/checklist_item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ interface ChecklistItemProps {
dragging: boolean;
disabled: boolean;
collapsibleDescription: boolean;
descriptionCollapsedByDefault?: boolean;
newItem: boolean;
cancelAddingItem?: () => void;
onUpdateChecklistItem?: (newItem: ChecklistItemType) => void;
Expand All @@ -50,7 +51,7 @@ interface ChecklistItemProps {

export const ChecklistItem = (props: ChecklistItemProps): React.ReactElement => {
const {formatMessage} = useIntl();
const [showDescription, setShowDescription] = useState(true);
const [showDescription, setShowDescription] = useState(!props.descriptionCollapsedByDefault);
const [isEditing, setIsEditing] = useState(props.newItem);
const [titleValue, setTitleValue] = useState(props.checklistItem.title);
const [descValue, setDescValue] = useState(props.checklistItem.description);
Expand Down

0 comments on commit 3de6e42

Please sign in to comment.