Skip to content

Fixes #34243: standardise Data Product card descriptions to plain text - #34244

Merged
anuj-kumary merged 4 commits into
open-metadata:mainfrom
anuj-kumary:fix-34243-data-product-card-description-plain-text
Sep 30, 2026
Merged

anuj-kumary merged 4 commits into
open-metadata:mainfrom
anuj-kumary:fix-34243-data-product-card-description-plain-text

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Closes #34243

On the Data Products listing page in card view, each card previewed its description with the full markdown rendered. A product whose description opens with a heading, or contains a table or a code block, dominated the row while its plain-text neighbours looked empty — the grid read as messy rather than as a catalogue.

Card previews are now standardised: every description is shown as plain text, clamped to two lines, with the existing View more affordance when it overflows. The preview no longer varies with how the author chose to format their description.

Scope is the card grid only. The data product details page still renders the description as authored, with all formatting intact — as do domain cards, which use a different renderer and were not part of the report.

Not included: a dedicated short summary field (optionally AI-generated from the description) for the card, which was raised alongside this. That is a schema change and is left for its own discussion.

Screen.Recording.2026-09-30.at.12.13.34.AM.mov

Testing

Seeded data products with heading-led, table-bearing, code-block-bearing and plain descriptions, and confirmed every card previews identically on the listing page while the details page is unchanged. Unit tests cover the plain-text preview and the empty-description placeholder.

🤖 Generated with Claude Code

… to plain text

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Sep 29, 2026
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions github-actions Bot added the UI UI specific issues label Sep 29, 2026
@github-actions github-actions Bot removed the safe to test Add this label to run secure Github workflows on PRs label Sep 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Sep 29, 2026
@github-actions github-actions Bot removed the safe to test Add this label to run secure Github workflows on PRs label Sep 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@anuj-kumary anuj-kumary self-assigned this Sep 30, 2026
@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Sep 30, 2026
@github-actions github-actions Bot removed the safe to test Add this label to run secure Github workflows on PRs label Sep 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Sep 30, 2026
@gitar-bot

gitar-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 closed / 1 findings

🟡 Medium risk · Card previews and shared markdown stripping now normalize description text and whitespace.

Standardizes Data Product card descriptions to plain text, clamped to two lines, so cards display consistently regardless of markdown formatting. Fixes word-break loss between HTML blocks by improving stripMarkdown to preserve spacing across block boundaries.

✅ 1 closed
✅ Bug: HTML block descriptions lose word breaks between paragraphs/list items

📄 openmetadata-ui/src/main/resources/ui/src/components/common/atoms/domain/ui/DataProductDescriptionField.tsx:31 📄 openmetadata-ui/src/main/resources/ui/src/components/common/atoms/domain/ui/DataProductDescriptionField.tsx:65
The block editor saves descriptions as HTML (e.g. <p>First.</p><p>Second.</p>), and isDescriptionContentEmpty in this same component is written to handle that HTML. stripMarkdown calls remove-markdown (^0.6.4), which drops tags with /<[^>]*>/g and puts nothing in their place. Adjacent block elements therefore run together: two paragraphs show as First.Second., and list items <li>a</li><li>b</li> show as ab. The old rich-text previewer showed these correctly. The fix is to put whitespace at block and <br> boundaries before stripping. Do it locally, or in stripMarkdown if the search-card callers should get the same fix.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 74%
74.15% (109259/147340) 59.44% (66954/112625) 60.85% (22190/36462)

@sonarqubecloud

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data Product marketplace: card descriptions render raw markdown formatting

2 participants