react icon indicating copy to clipboard operation
react copied to clipboard

Expose input area via imperative handle

Open talum opened this issue 3 years ago β€’ 3 comments

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.

talum avatar Sep 09 '22 16:09 talum

πŸ¦‹ 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

changeset-bot[bot] avatar Sep 09 '22 16:09 changeset-bot[bot]

πŸ‘‹πŸ» @siddharthkp I think you reviewed the initial implementation of MarkdownEditor, is that right? Would you mind giving this a look?

lesliecdubs avatar Sep 12 '22 23:09 lesliecdubs

@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

siddharthkp avatar Sep 13 '22 09:09 siddharthkp

πŸ‘‹πŸ» @talum Hi! Were you able to put up a PR for this directly in the repo, or is this forked draft still relevant?

lesliecdubs avatar Oct 10 '22 23:10 lesliecdubs

Yeah, this work was reprioritized, so I was pulled off it. I'll close this out for now.

talum avatar Oct 11 '22 14:10 talum