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

Add preview image to board #5583

Open
wants to merge 1 commit into
base: preview
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions apiserver/plane/utils/grouper.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def issue_on_results(issues, group_by, sub_group_by):
"sequence_id",
"project_id",
"parent_id",
"description_html",
"cycle_id",
"sub_issues_count",
"created_at",
Expand Down
4 changes: 4 additions & 0 deletions web/core/components/issues/issue-layouts/kanban/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ const KanbanIssueDetailsBlock: React.FC<IssueDetailsBlockProps> = observer((prop
e.preventDefault();
};

const matchedImage = issue?.description_html?.match(/<img[^>]+src="([^">]+)"/)?.[1]

return (
<>
<WithDisplayPropertiesHOC displayProperties={displayProperties || {}} displayPropertyKey="key">
Expand Down Expand Up @@ -91,6 +93,8 @@ const KanbanIssueDetailsBlock: React.FC<IssueDetailsBlockProps> = observer((prop
</div>
</Tooltip>

{matchedImage && <img class="w-full h-auto" src={matchedImage} />}

<IssueProperties
className="flex flex-wrap items-center gap-2 whitespace-nowrap text-custom-text-300 pt-1.5"
issue={issue}
Expand Down