-
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
Support custom emojis & declarative loading
state in MarkdownEditor
suggestions
#3004
Conversation
🦋 Changeset detectedLatest commit: 19f6833 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 |
size-limit report 📦
|
…hub.com/primer/react into markdown-editor-suggestion-improvements
loading
state in MarkdownEditor
suggestions
{name: '+1', character: '👍'}, | ||
{name: '-1', character: '👎'}, | ||
{name: 'heart', character: '❤️'}, | ||
{name: 'wave', character: '👋'}, | ||
{name: 'raised_hands', character: '🙌'}, | ||
] | ||
{name: 'octocat', url: 'https://github.githubassets.com/images/icons/emoji/octocat.png'}, | ||
] satisfies Emoji[] |
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.
Ohh I've read about satisfies
but haven't actually used it yet. Nice.
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.
turns out I had to remove it because the Jest transpiler doesn't work with it
@iansan5653 sorry about the Jest issue! just opened up: #3005 to avoid this in the future for TypeScript 4.9 features like |
{name: string, url: string}
whereurl
is an image."loading"
as the suggestions prop. We already supported asynchronous suggestions via an async function, but this imperative strategy isn't idiomatic React and is incompatible withreact-query
, which we'd like to use in Projects for caching data more effectively. My bad for originally writing it this way 😬. I'd really like to completely change it but I want to avoid breaking changes for now and this works just fine.This change is completely non-breaking and won't require any additional QA if we can get it into this release (as evidenced by the Storybook stories which didn't require any changes).