feat: Persist closed state per card

This commit is contained in:
Maksim Eltyshev
2025-07-09 17:45:47 +02:00
parent 69c75a03b1
commit 709a0d1758
19 changed files with 163 additions and 71 deletions
+3 -11
View File
@@ -15,7 +15,7 @@ import { usePopup } from '../../../lib/popup';
import selectors from '../../../selectors';
import Paths from '../../../constants/Paths';
import { BoardMembershipRoles, CardTypes, ListTypes } from '../../../constants/Enums';
import { BoardMembershipRoles, CardTypes } from '../../../constants/Enums';
import ProjectContent from './ProjectContent';
import StoryContent from './StoryContent';
import InlineContent from './InlineContent';
@@ -108,10 +108,7 @@ const Card = React.memo(({ id, isInline }) => {
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,
jsx-a11y/no-static-element-interactions */}
<div
className={classNames(
styles.content,
list.type === ListTypes.CLOSED && styles.contentDisabled,
)}
className={classNames(styles.content, card.isClosed && styles.contentDisabled)}
onClick={handleClick}
>
<Content cardId={id} />
@@ -126,12 +123,7 @@ const Card = React.memo(({ id, isInline }) => {
)}
</>
) : (
<span
className={classNames(
styles.content,
list.type === ListTypes.CLOSED && styles.contentDisabled,
)}
>
<span className={classNames(styles.content, card.isClosed && styles.contentDisabled)}>
<Content cardId={id} />
{colorLineNode}
</span>