about summary refs log tree commit diff
path: root/src/view/com/composer/text-input
Commit message (Collapse)AuthorAgeFilesLines
* Rewrite the link detection (#3687)dan2024-04-243-87/+110
| | | | | * Rewrite the link detection * Handle parens and colons
* Remove unnecessary `.trimEnd()` and fix facet detection (#3672)Hailey2024-04-242-12/+23
| | | | | | | | | | | | | | | * Fix link facet detection Exclude the trailing period from the link, similar as done in the atproto package * Fix JSON to text conversion The trimEnd() call was only needed because we were always appending \n\n at the end. Fix that by only adding line breaks after non-final paragraphs. * Detect paste reliably --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Automatically add a link card for URLs in the composer (#3566)Hailey2024-04-163-50/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * automatically add a link card for urls in the composer simplify was paste check use a set simplify the cross platform reuse web implementation remove log pasting in the middle of a block of text proper regex dont re-add immediately after paste and remove don't use `byteIndex` lfg automatically add link card * `mayBePaste` * remove accidentally pasted url from comment
* Use consistent avatar shape/defaults for labelers (#3257)Eric Bailey2024-03-192-2/+10
| | | | | | | | | | | | | | | | | | | | | | | * Add type: labeler to easy spots * Search and ProfileCard * Filter out of suggested follows * ComposeReplyTo * PReviewable avatar in posts * Lists * PostMeta * Notifications * Autocomplete * Straggler * Bump sdk
* Integrate new tag detection and regexes (#3063)Eric Bailey2024-03-012-9/+18
| | | | | | | | | | | * Integrate new tag detection and regexes * Bump SDK * Can use const * Clarify intent * Enhance clarity
* Add tags and mute words (#2968)Eric Bailey2024-02-263-2/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add bare minimum hashtags support (#2804) * Add bare minimum hashtags support As atproto/api already parses hashtags, this is as simple as hooking it up like link segments. This is "bare minimum" because: - Opening hashtag "#foo" is actually just a search for "foo" right now to work around #2491. - There is no integration in the composer. This hasn't stopped people from using hashtags already, and can be added later. - This change itself only had to hook things up - thank you for having already put the hashtag parsing in place. * Remove workaround for hash search not working now that it's fixed * Add RichTextTag and TagMenu * Sketch * Remove hackfix * Some cleanup * Sketch web * Mobile design * Mobile handling of tags search * Web only * Fix navigation woes * Use new callback * Hook it up * Integrate muted tags * Fix dropdown styles * Type error * Use close callback * Fix styles * Cleanup, install latest sdk * Quick muted words screen * Targets * Dir structure * Icons, list view * Move to dialog * Add removal confirmation * Swap copy * Improve checkboxees * Update matching, add tests * Moderate embeds * Create global dialogs concept again to prevent flashing * Add access from moderation screen * Highlight tags on native * Add web highlighting * Add close to web modal * Adjust close color * Rename toggles and adjust logic * Icon update * Load states * Improve regex * Improve regex * Improve regex * Revert link test * Hyphenated words * Improve matching * Enhance * Some tweaks * Muted words modal changes * Handle invalid handles, handle long tags * Remove main regex * Better test * Space/punct check drop to includes * Lowercase post text before comparison * Add better real world test case --------- Co-authored-by: Kisaragi Hiu <mail@kisaragi-hiu.com>
* remove line height from text input for composer on ios (#2844)Hailey2024-02-121-1/+3
| | | | | * remove line height from text input for composer * only apply removal to ios
* use the palette's font color in the composer (as string) (#2792)Hailey2024-02-081-1/+4
|
* use the palette's font color in the composer (#2791)Hailey2024-02-071-1/+1
| | | | | | | * use the palette's font color in the composer * correct type for cssproperties * log
* Reduce the odds of false positives in the language suggester (close #2598) ↵Paul Frazee2024-01-301-1/+0
| | | | (#2700)
* Disable scroll on the composer TextInput (close #2413) (#2603)Paul Frazee2024-01-231-0/+1
|
* Tweak positioningPaul Frazee2024-01-221-1/+3
|
* Merge branch 'feat/image-dnd' of https://github.com/mary-ext/fork-bsky-app ↵Paul Frazee2024-01-221-14/+107
|\ | | | | | | into mary-ext-feat/image-dnd
| * fix: firefox edge-caseMary2024-01-211-5/+2
| |
| * fix: design adjustmentsMary2024-01-211-2/+3
| |
| * fix: always call preventDefaultMary2024-01-211-4/+12
| |
| * refactor: use right borderDarkMary2024-01-211-5/+1
| |
| * feat: new designMary2024-01-211-35/+81
| |
| * feat: web composer image drag and dropMary2024-01-211-9/+54
| |
* | New Web Layout (#2126)dan2024-01-221-1/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rip out virtualization on the web * Screw around with layout * onEndReached * scrollToOffset * Fix background * onScroll * Shell bars * More scroll * Fixes * position: sticky * Clean up 1 * Clean up 2 * Undo PagerWithHeader changes and fork it * Trim down both versions * Cleanup 3 * Memoize, lint * Don't scroll away modal or lightbox * Add content-visibility for rows * Fix composer * Fix types * Fix borked scroll animation * Fixes to layout * More FlatList parity * Layout fixes * Fix more layout * More layout * More layouts * Fix profile layout * Remove onScroll * Display: none inactive pages * Add an intermediate List component * Fix type * Add onScrolledDownChange * Port pager to use onScrolledDownChange * Fix on mobile * Don't pass down onScroll (replacement TBD) * Remove resetMainScroll * Replace onMainScroll with MainScrollProvider * Hook ScrollProvider to pager * Fix the remaining special case * Optimize a bit * Enforce that onScroll cannot be passed * Keep value updated even if no handler * Also memo it * Move the fork to List.web * Add scroll handler * Consolidate List props a bit * More stuff * Rm unused * Simplify * Make isScrolledDown work * Oops * Fixes * Hook up context scroll handlers * Scroll restore for tabs * Route scroll restoration POC * Fix some issues with restoration * Remove bad idea * Fix pager scroll restoration * Undo accidental locale changes * onContentSizeChange * Scroll to post * Better positioning * Layout fixes * Factor out navigation stuff * Cleanup * Oops * Cleanup * Fixes and types * Naming etc * Fix crash * Match FL semantics * Snap the header scroll on the web * Add body scroll lock * Scroll to top on search * Fix types * Typos * Fix Safari overflow * Fix search positioning * Add border * Patch react navigation * Revert "Patch react navigation" This reverts commit 62516ed9c20410d166e1582b43b656c819495ddc. * fixes * scroll * scrollbar * cleanup unrelated * undo unrel * flatter * Fix css * twk
* Internationalize more strings (#2440)Stanislas Signoud2024-01-091-1/+2
| | | Co-authored-by: Ansh <anshnanda10@gmail.com>
* emoji picker improvements (#2392)Hailey2024-01-023-57/+90
| | | | | | | | | | | | | * rework emoji picker * dynamic position * always prefer the left if it will fit * add accessibility label * Update EmojiPicker.web.tsx oops. remove accessibility from fake button
* Bump react-native to 0.73.1, expo to 50 (#2214)Eric Bailey2023-12-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Bump to react-native@0.73, bump expo@next Includes bumps for all expo deps and dev dependencies. Updates react-native patch and others, and removes the babel-preset-expo patch. * Remove duplicate Splash ref * Bump more deps * Properly install expo-notifications * Bump webview dep * Bump packages according to expo fix; remove pager-view patch as it is no longer needed * Don't access expo-camera from Web * Fix crypto dep on web * Fix some type issues * Build esnext modules to support dynamic imports --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Web composer improvements (#2257)Paul Frazee2023-12-201-1/+1
| | | | | * Keep the emoji picker in the tablet width (close #1880) * Support pressing tab to select a mention (close #1831)
* Restore autofocus on emoji drop down (#1821)Elie Michel2023-12-201-1/+1
|
* Set numberOfLines for Android text input (#2238)Eric Bailey2023-12-181-1/+7
| | | | | * Set numberOfLines for Android text input * Let's go with 4
* Add "Who can reply" controls [WIP] (#1954)Paul Frazee2023-12-101-1/+2
| | | | | | | | | | | | | | | | | | | | | * Add threadgating * UI improvements * More ui work * Remove comment * Tweak colors * Add missing keys * Tweak sizing * Only show composer option on non-reply * Flex wrap fix * Move the threadgate control to the top of the composer
* Hackfix to composer focus on web (#2057)Paul Frazee2023-12-031-0/+10
|
* Remove deprecated models and mobx usage (react-query refactor) (#1934)Paul Frazee2023-11-161-3/+2
| | | | | | | | | | | | | | | | | | | | | * Update login page to use service query * Update modal to use session instead of store * Move image sizes cache off store * Update settings to no longer use store * Update link-meta fetch to use agent instead of rootstore * Remove deprecated resolveName() * Delete deprecated link-metas cache * Delete deprecated posts cache * Delete all remaining mobx models, including the root store * Strip out unused mobx observer wrappers
* Autocomplete updates (react-query refactor) (#1911)Paul Frazee2023-11-153-21/+23
| | | | | | | | | | | | | * Unify the autocomplete code; drop fuse * Persist autocomplete results while they're in progress * Commit lockfile * Use ReturnType helper --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Composer update (react-query refactor) (#1899)Paul Frazee2023-11-144-30/+40
| | | | | | | | | * Move composer state to a context * Rework composer to use RQ --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Simplify loading emoji data (#1790)dan2023-11-012-2/+4
|
* Don't highlight tags in composer yet (#1665)Eric Bailey2023-10-101-10/+13
|
* Dont trim before posting (close #1621) (#1622)Paul Frazee2023-10-051-1/+1
| | | | | * Dont trim before posting (close #1621) * Tweak: do trim end
* fix link highlighting with mention present (#1544)Eric Bailey2023-09-272-80/+29
|
* make sure click events on the emoji picker don't bubble up to the mask (#1427)Ansh2023-09-111-15/+21
|
* composer: inhibit Cmd-Enter from inputting newline (#1421)uakci2023-09-111-0/+1
|
* Fix autocomplete avatar alignment (#1414)dan2023-09-081-1/+1
|
* Give explicit names to MobX observer components (#1413)dan2023-09-071-77/+75
| | | | | | | | | * Consider observer(...) as components * Add display names to MobX observers * Temporarily suppress nested components * Suppress new false positives for react/prop-types
* Add ESLint React plugin (#1412)dan2023-09-073-279/+272
| | | | | * Add eslint-plugin-react * Enable display name rule
* Fix caret jumps for web composer (#1374)dan2023-09-051-5/+2
| | | | | * Fix caret jumps for web composer * Autofocus at the end on mount
* Fix #1328 fix emoji picker scroll on firefox and chrome (#1332)Ansh2023-08-301-16/+36
| | | | | | | | | * fix emoji picker scroll on firefox and chrome * click outside emoji picker to dismiss * dynamically position emoji picker * dynamically placing picker
* Replace web editor link behavior (#1319)Paul Frazee2023-08-282-26/+123
| | | | | * Replace web editor link behavior (close #1293) (close #1292) * Update link decorator to match rich text link detector
* [APP-836] Emoji picker for web (#1254)Ansh2023-08-232-12/+106
| | | | | | | | | | | | | | | | | | | | | | | | | * add emoji-mart package for emoji dropdown picker * remove emoji picker modal * load emoji mart data not as part of the main bundle * remove @emoji-mart/data * setup emoji insertion with events * get emoji data from local static assets * close emoji picker after one emoji has been inserted * Switch emoji picker trigger to an icon * Update emoji-mart-data.js * make grabbing emoji data work on more browsers --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* [APP-834] Allow @ing someone in post directly from profile (#1241)Ansh2023-08-221-1/+59
| | | | | * setup `initMention` for mobile * setup creating post with profile tagged on web
* Update the web composer textinput to an emitter (close #1193) (#1205)Paul Frazee2023-08-171-9/+22
| | | | | | | The tiptap useEditor() hook creates an awkward challenge for passing event handlers into its plugins and native events. By introducing a memoized editor, we should be able to shuttle events out of tiptap without retriggering the useEditor hook. The emitter can then change its registered handlers with each state update.
* A set of composer fixes (#1187)Paul Frazee2023-08-161-0/+2
| | | | | | | * Don't insert a newline on cmd+entrl (close #1173) * Don't linkify selected text on url-paste (close #1149) * Disable the adult content controls if there is no media on the post (close #1169)
* Shorten links in composer to reduce char usage (#1188)Paul Frazee2023-08-161-0/+1
| | | | | | | * Modify toShortUrl() to always include the full domain * Shorten links in the composer to save on characters * Apply some limits to the link card suggester
* #929 Wrap `PasteInput` updates in a `setTimeout` (#1033)Eric Bailey2023-07-191-39/+51
| | | | | * wrap PasteInput updates in a setTimeout * just wrap the whole callback
* [APP-692] Accessibility font-scaling fixes (#922)Paul Frazee2023-06-281-0/+1
| | | | | | | | | | | * Fix: enable font scaling in the composer text input * Fix: cancel button in search no longer wraps * Fix: report modals no longer clip off the bottom with scaled fonts * Fix scrolling on android * Allow wrapping in dropdown items until we can handle proper sizing