Skip to content

Conversation

@DawidKossowski
Copy link
Contributor

@DawidKossowski DawidKossowski commented Dec 1, 2025

🚀 Summary

The title element in the model doesn't have a corresponding view element. Only its child title-content is converted to <h1> in the view. When attributes are set on the title element, the downcast conversion fails because there's no view element to apply them to.

Added a downcast converter that intercepts attribute changes on title elements and redirects them to the title-content corresponding view element. This ensures that attributes set on title in the model are correctly rendered in the view without causing conversion errors.


📌 Related issues

  • Closes #000

💡 Additional information

These changes are required for the AI feature, as it handles elements by adding the $elementId attribute to each one.

Copy link
Contributor

@scofalik scofalik left a comment

Choose a reason for hiding this comment

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

LGTM.

I dislike that we need to make a change in downcastdispatcher.ts because title feature is incorrectly written. But it is what it is. Title feature breaks the rule that every model element should be mapped to a counterpart in the view. The feature should be fixed. I will add this as a followup ticket.

@scofalik
Copy link
Contributor

scofalik commented Dec 5, 2025

#19484

@DawidKossowski DawidKossowski marked this pull request as ready for review December 9, 2025 11:50
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.

3 participants