Skip to content

feat: implement vaadin-markdown component #9023

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

tomivirkki
Copy link
Member

Description

Implement the <vaadin-markdown> component

Type of change

Feature

@tomivirkki tomivirkki marked this pull request as draft April 29, 2025 09:51
* @type {string}
*/
markdown: {
type: String,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this use sync: true for consistency with other components?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't we mostly using that for the Polymer -> Lit migration. I don't see sync use in the components that have been originally built with LitElement (side-nav, dashboard, card)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it could be problematic with the Flow counterpart if setting content doesn't immediately update the content (so that we'd have to wait for it to be updated in ITs)?

updated(props) {
super.updated(props);

renderMarkdownToElement(this, this.markdown);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a check for if (props.has('markdown')) just in case. There are no other props in the component but technically theme attribute from ThemePropertyMixin triggers an internal property which causes update.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link

sonarqubecloud bot commented May 5, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants