Commit Graph

6959 Commits

Author SHA1 Message Date
Samuel Newman b1d891385e fix older android versions 2026-03-09 14:21:02 +02:00
Samuel Newman b7ba2d3f0f set isClosing before cancel() to prevent content observer fighting dismiss
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 23:38:10 +02:00
Samuel Newman 88354a69d3 fix chat report dialog adjusting to wrong height 2026-03-06 23:38:10 +02:00
Samuel Newman a7c8b1bdce fix cancelling dialogs with preventDismiss 2026-03-06 23:38:10 +02:00
Samuel Newman 7f47551e73 remove hack 2026-03-06 23:38:10 +02:00
Samuel Newman 0279fcadf3 style nit 2026-03-06 23:38:10 +02:00
Samuel Newman 9906a4cda5 remove unused platform select 2026-03-06 23:38:10 +02:00
Samuel Newman 537c3cb0ca rm extraneous comment 2026-03-06 23:38:10 +02:00
Samuel Newman 1e8ce36184 add fullHeight prop, fix Android bottom sheet behavior, keyboard handling
Native module:
- Add `fullHeight` prop to BottomSheetView on Android and iOS
- iOS: fullHeight sets detent to .large, skips content observation
- Android: fullHeight uses isFitToContents=false with expandedOffset=statusBarHeight

Android bottom sheet behavior overhaul:
- Switch normal sheets to isFitToContents=false with expandedOffset, enabling
  proper 3-state snapping (half-expanded ↔ expanded ↔ hidden). Previously
  isFitToContents=true prevented settling at half-expanded during gestures,
  making it impossible to swipe back down from expanded.
- preventExpansion sheets keep isFitToContents=true with maxHeight cap, plus
  a state callback safety net that bounces EXPANDED→HALF_EXPANDED. This
  catches an edge case where rapid content resizes during opening can invert
  the expanded/half-expanded offsets, causing the sheet to dismiss.
- Add requestLayout() after maxHeight changes in updateLayout() so the
  FrameLayout actually re-measures (fixes keyboard padding not resizing sheet)
- Set backgroundTint=transparent in the theme to remove Material3 surface
  tint that was visible in gaps between sheet and screen edge

Keyboard handling:
- Remove native keyboard expansion logic (insets listener, isKeyboardVisible
  tracking, manual STATE_EXPANDED on keyboard show)
- Replace with JS-side keyboard padding: ScrollableInner listens for RN
  Keyboard events and adds bottom padding equal to keyboard height
- Generalize useOnKeyboardDidShow → useOnKeyboard(eventName, cb)

Callers:
- Replace minHeight: screenHeight hack with fullHeight: true in EditProfile,
  ChangeHandle, AddAppPassword, ImageAltText, GifAltText, LanguageSelect,
  FollowDialog, GifSelect, StarterPack, Select, NewChat, ShareViaChat,
  DraftsList, WizardEditList, ListAddRemoveUsers, CreateOrEditList
- Remove unused useWindowDimensions imports
- ServerInput: simplify to just preventExpansion (was platform-specific)
- ImageAltTextDialog: remove old {height: 300} keyboard spacer hack

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 23:38:10 +02:00
Samuel Newman e46977ddca fix android bottom sheet height observation and content clipping
- getContentHeight: use max of children heights instead of DFS index 1
  (old approach measured the drag handle, not the content)
- observe height via OnLayoutChangeListener on each direct child instead
  of OnGlobalLayoutListener (RN bypasses requestLayout, so global listener
  never fires for RN-driven layout changes)
- defer state changes during DRAGGING/SETTLING to avoid interrupting
  dismiss swipes, apply when gesture settles
- subtract insets.top from NativeView height on android (matching iOS)
  to prevent scroll content clipping at bottom of full-height sheets

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 23:38:10 +02:00
Claude 132c46817f Fix Android sheets opening at ~10px height
OnLayoutChangeListener only fires on future layout changes, but
dialog.show() triggers the initial content layout synchronously
before the listener is registered. The sheet was stuck at the tiny
halfExpandedRatio computed from the pre-layout content height (0).

After registering the listener, do an immediate updateLayout() if
the content view already has a nonzero height, so we pick up the
real dimensions.

https://claude.ai/code/session_01Rp7ef1h3fKh6fhStcjqLJ5
2026-03-06 23:38:10 +02:00
Claude 5a122230a7 Fix OnLayoutChangeListener lambda parameter count
The lambda had 10 destructured parameters but OnLayoutChangeListener
only passes 9 (view, left, top, right, bottom, oldLeft, oldTop,
oldRight, oldBottom). Remove the extra placeholder.

https://claude.ai/code/session_01Rp7ef1h3fKh6fhStcjqLJ5
2026-03-06 23:38:10 +02:00
Claude affa0cf810 Remove dead updateLayout JS→native bridge path
Now that both platforms observe content height natively (iOS via KVO,
Android via OnLayoutChangeListener), the JS-callable updateLayout()
is unused. Remove:

- updateLayout() and prevLayoutDetentIdentifier from iOS SheetView
- AsyncFunction("updateLayout") from both platform module definitions
- updateLayout method from the JS BottomSheetNativeComponent

Android's updateLayout() is kept as a private implementation detail
since the keyboard insets listener and native layout observer both
call it internally.

https://claude.ai/code/session_01Rp7ef1h3fKh6fhStcjqLJ5
2026-03-06 23:38:10 +02:00
Claude 421c4abd02 Fix sheet getting set to previous height on rapid content changes
The KVO callback was calling updateLayout(), which has two problems for
content-driven updates:

1. The prevLayoutDetentIdentifier guard can block updates. When
   updateDetents triggers animateChanges, the delegate callback
   sheetPresentationControllerDidChangeSelectedDetentIdentifier fires
   and updates selectedDetentIdentifier to the system-assigned custom
   detent identifier. On the next KVO callback, prevLayoutDetentIdentifier
   (.medium) no longer matches selectedDetentIdentifier, so the update
   is silently dropped.

2. Re-reading frame.size.height from the view hierarchy instead of using
   the observed bounds can return a stale value during rapid layout passes.

Fix: have the KVO callback call updateDetents directly with the observed
height, bypassing both the guard and the frame re-read. The guard in
updateLayout() is preserved for the manual/fallback code path.

https://claude.ai/code/session_01Rp7ef1h3fKh6fhStcjqLJ5
2026-03-06 23:38:10 +02:00
Claude eab139d51f Revert "Add compiled JS build artifacts for bottom-sheet module"
This reverts commit 76dc194bcdfbac4a37e1023c848f936d0913da7a.
2026-03-06 23:38:10 +02:00
Claude cd41cbd8d6 Add compiled JS build artifacts for bottom-sheet module
https://claude.ai/code/session_01Rp7ef1h3fKh6fhStcjqLJ5
2026-03-06 23:38:10 +02:00
Claude 00e990b276 Observe content view layout natively on Android too
Same approach as the iOS KVO change: use View.OnLayoutChangeListener on
the content view to detect height changes purely on the native side.
This eliminates the setTimeout → updateLayout() JS bridge hack that was
a known workaround for async timing issues on Android.

The onLayout callback in JS is now only used for the iOS 15 fallback
height measurement. All other height observation is native.

https://claude.ai/code/session_01Rp7ef1h3fKh6fhStcjqLJ5
2026-03-06 23:38:10 +02:00
Claude f83662275d Observe content view bounds natively to update sheet height on iOS
Replace the async JS bridge round-trip (onLayout → updateLayout()) with
native KVO observation on the content view's bounds. When React Native's
Yoga layout engine sets the frame, the KVO callback fires synchronously
on the same run loop iteration and calls updateLayout() directly. This
eliminates the timing issues that surfaced after enabling iOS 26 design.

https://claude.ai/code/session_01Rp7ef1h3fKh6fhStcjqLJ5
2026-03-06 23:38:10 +02:00
Samuel Newman ae2dd8432b fix bottom sheet keyboard expansion with preventExpansion on android
When preventExpansion is true, the maxHeight cap prevented the sheet
from expanding when the keyboard opened. Lift the cap temporarily when
the keyboard appears (updateLayout restores it on dismiss). Also
broadened the state check to handle SETTLING state during rapid
keyboard open/close.

Fixes #9943

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 23:38:10 +02:00
DS Boyce f8886fbfe6 Refine presentation of translation results (#10015)
Co-authored-by: Eric Bailey <git@esb.lol>
2026-03-06 13:36:58 -08:00
Samuel Newman 041e348581 Bump version to 1.119.0 (#10020) 2026-03-06 13:34:03 -08:00
Samuel Newman e2c54a858c Move dev-env to subdirectory (#10009) 2026-03-06 11:45:49 -06:00
Eric Bailey 60a0edbbe2 [APP-1960] Fix current session refresh bug (#10019) 2026-03-06 11:43:14 -06:00
pfrazee 562bf3be22 Nightly source-language update 2026-03-06 03:06:49 +00:00
DS Boyce 290e0f2b54 Disable animations for translation events on Android (#10013) 2026-03-05 15:01:29 -08:00
DS Boyce ece6dc251c Link to profile via handle vs did (#10012) 2026-03-05 12:52:39 -08:00
Eric Bailey 8c705864a2 Prep 1.118.1 patch relase (#10011) 1.118.1 2026-03-05 14:43:18 -06:00
Eric Bailey 7a08b82810 Fix deps (#10010) 2026-03-05 14:11:57 -06:00
Samuel Newman 20bf2cd117 Prevent over-eager translate button (#10007) 2026-03-05 12:07:34 -08:00
DS Boyce fe8e8ce7de Add README.md for lib/translation (#10005) 2026-03-05 10:53:25 -08:00
Eric Bailey 8b8acb7bd1 Add docs on directory structures and naming conventions (#10002) 2026-03-05 12:31:55 -06:00
DS Boyce 1a487d0943 Remove duplicate punctuation (#10004) 2026-03-05 10:16:20 -08:00
Samuel Newman 1ae77aa997 Fix findNodeHandle usage on web (#10001) 2026-03-05 07:22:13 -08:00
Samuel Newman 7cec490cef Use a different icon for testflight builds (#10000) 2026-03-05 07:04:59 -08:00
Eric Bailey 1281eb01e6 Prep 1.118.0 (#9999) 1.118.0 2026-03-04 21:08:55 -06:00
pfrazee 4339585b27 Nightly source-language update 2026-03-05 03:06:58 +00:00
Samuel Newman 30c9ea5789 v1.118.0 E2E tests (#9994) 2026-03-04 20:45:08 -06:00
DS Boyce afbade6f6f Refine UX for on-device translation for posts (#9987)
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Co-authored-by: Eric Bailey <git@esb.lol>
2026-03-04 20:37:44 -06:00
Samuel Newman 1782a65174 Add iOS 26 fluid zoom transition to alt text dialog (#9970)
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-04 20:32:08 -06:00
Eric Bailey 7fd218c97d Update API package to fix stale session issues (#9998) 2026-03-04 18:27:12 -06:00
DS Boyce 8446efb739 Pass feed URI to sendInteractions endpoint (#9989) 2026-03-04 12:38:24 -08:00
pfrazee b84f28f884 Nightly source-language update 2026-03-04 03:05:02 +00:00
DS Boyce 7dc3b4fa8e Add search event analytics (#9949)
Co-authored-by: Eric Bailey <git@esb.lol>
2026-03-03 14:49:38 -06:00
Samuel Newman 37a82761f5 Cache profile view before opening AfterReportDialog (#9962) 2026-03-03 13:50:22 -06:00
Samuel Newman 612a778361 Set mute word dialog text input return key type to "done" (#9967)
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-03 13:35:09 -06:00
Samuel Newman 162a78e1ae Add 🪿 (#9983) 2026-03-03 06:06:13 -08:00
pfrazee c42502fdcb Nightly source-language update 2026-03-03 03:09:48 +00:00
Samuel Newman 8b1c47a499 bskyweb: use avatar thumbnail for post og:image fallback (#9923) 2026-03-02 22:28:16 +00:00
Samuel Newman c2fd87bd8b Remove JPG hardcoding from image processing systems (#9955) 2026-03-02 20:23:07 +00:00
Samuel Newman d247a65683 Add Trans to string (#9981) 2026-03-02 11:39:50 -08:00