-
Notifications
You must be signed in to change notification settings - Fork 535
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
Small improvements to MarkdownEditor
component
#2236
Conversation
🦋 Changeset detectedLatest commit: d62f317 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
d8bbb7b
to
28e61fb
Compare
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scoped to drafts, pretty safe. Trust Ian on the implementation details
This has some minor followup changes to #2182:
Ref
passed toMarkdownEditor
so that consumers cannot accidentally create the ref usinguseRef<HTMLTextAreaElement>
. This was possible before becauseHTMLElement
was assignable toMarkdownEditorHandle
, so I added a fake symbol 'brand' key to disallow this. It's somewhat hacky but worth it to prevent a very common mistake.MarkdownViewer
docs so the examples will render (they are erroring withTypeError: Cannot read properties of undefined (reading '__html')
).This fixes #2231, except for erroring when there is no
Label
present - I tried to fix this but it's very hard to do with the current implementation of slots. I think it's not worth the extra lift right now.Merge checklist