You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect -->
# Summary
+ implemented automatic links on web
+ handled `linkRegex` prop
+ wrote e2e tests for automatic links
+ refactored `useOnLinkDetected` so it uses a shared `LinkEmitter` with
autolink plugin, because we want to emit an event when an automatic link
is created, but we also do no want to send the same event twice.
+ this PR doesn't use automatic link functionality from `Link`
extensions from Tiptap, as it doesn't allow passing any regex, and it
also struggles with extending automatic links on the right. I've
implemented a custom plugin that looks at changed rages and research
using a regex for texts where we should applied the automatic link mark.
## Test Plan
+ Run `yarn test:e2e:web` to see if all the tests pass
+ Run `yarn example-web dev` and play around with automatic links,
change `LINK_REGEX` in `apps/example-web/App.tsx`
## Screenshots / Videos
## Compatibility
| OS | Implemented |
| ------- | :---------: |
| iOS | ❌ |
| Android | ❌ |
| Web | ✅ |
## Checklist
- [x] E2E tests are passing
- [x] Required E2E tests have been added (if applicable)
---------
Co-authored-by: Krystian Sienkiewicz <krystian.sienkiewicz@swmansion.com>
Co-authored-by: Igor Furgala <exploif@icloud.com>
Co-authored-by: Krystian Sienkiewicz <146986839+hejsztynx@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Submit props: `submitBehavior` and `onSubmitEditing`. `returnKeyType` is only a hint, it maps to [enterkeyhint](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint) (`done`, `go`, `next`, `previous`, `search`, `send`, `default`/`enter`). Not all values of `ReturnKeyTypeOptions` are supported, the behavior of this prop is heavily dependent on the browser's capabilities.
@@ -25,7 +26,6 @@ See [Web Keyboard Shortcuts](./INPUT_API_REFERENCE.md#web-keyboard-shortcuts) fo
25
26
## Unsupported
26
27
27
28
-**`returnKeyLabel`**: ignored on web, it's not possible to set it inside a browser.
28
-
-**Automatic link detection**: `linkRegex` is ignored. Links only work when set explicitly via the `setLink` ref method.
29
29
-**Context menu**: `contextMenuItems` is ignored.
30
30
-**RN layout ref methods**: `measure`, `measureInWindow`, `measureLayout`, and `setNativeProps` are no-ops.
31
31
-**`EnrichedText`**: The read-only component is not exported on web.
0 commit comments