googleworkspace / googleworkspace/drive-picker-element
Gaps in React wrapper
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 67
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Two gaps in the wrapper at v0.2.0 that I had to work around:
-
picker-erroris not surfaced as anon…prop. The underlying<drive-picker>element does dispatchpicker-errorCustomEvents — they're just not inDrivePickerEventHandlers. To preserve the iframe-side authorization-error signal, I attach a manualpicker-errorlistener via a container ref +querySelector("drive-picker"). Worth filing upstream —onErrorshould be a first-class prop alongsideonPicked/onCanceled/onOauthError. -
visibleis not a prop. The wrapper renders<drive-picker>but doesn't forward a ref or expose visibility. Per the element's README,visiblemust be set imperatively on the DOM node. The same effect that wires thepicker-errorlistener also setselement.visible = true. The dialog closes by flipping our localpickerOpenstate on any ofonPicked/onCanceled/onOauthError/picker-error, which unmounts the wrapper.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the React wrapper's DrivePickerEventHandlers definition and wrapper entry point, then read the drive-picker element README for the visible property and event behavior. Confirm how onPicked, onCanceled, and onOauthError are exposed and how the wrapper renders the custom element. Done means picker-error is available through a first-class handler and visible can be controlled through the wrapper.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100