Expose input area via imperative handle
In order to properly insert suggestions, we need a reference to the textarea itself.
I'm working on implementing a "suggest changes" button in the draft MarkdownEditor, and I think that still belongs outside of the MarkdownEditor. We should be able to use some of the existing behavior as long as we expose a reference to the textarea.
Since we're already using useImperativeHandle, I added another property.
I want to be able to test a canary version of this before going through the release process π, so if y'all have advice about the failing check I would appreciate it.
Screenshots
n/a
Merge checklist
- [x] Added/updated tests
- [ ] Added/updated documentation
- [ ] Tested in Chrome
- [ ] Tested in Firefox
- [ ] Tested in Safari
- [ ] Tested in Edge
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.
π¦ Changeset detected
Latest commit: e4c997b375c90eac3a4d36a6ecc71bc85b0ba844
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @primer/react | Minor |
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
ππ» @siddharthkp I think you reviewed the initial implementation of MarkdownEditor, is that right? Would you mind giving this a look?
@talum oh yep, known issue: visual tests don't run on forks (secrets etc)
I invited you as a contributor so that you can directly create pull requests on the repo
ππ» @talum Hi! Were you able to put up a PR for this directly in the repo, or is this forked draft still relevant?
Yeah, this work was reprioritized, so I was pulled off it. I'll close this out for now.