Commit Graph

549 Commits

Author SHA1 Message Date
William Casarin
2c96dd99a8 Merge remote-tracking branch 'github/pr/1081' into notifications
especially if it merges an updated upstream into a topic branch.
2025-08-26 10:01:09 -07:00
William Casarin
e7843bad2f Merge remote-tracking branch 'github/pr/1087' into notifications 2025-08-26 09:58:50 -07:00
William Casarin
76fd7a9753 args: parse hashtag columns from cli
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-26 09:53:37 -07:00
kernelkind
8b5464641d render follow pack by index from virtual list
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 21:16:05 -04:00
kernelkind
c06d18f76b prop Onboarding as mut
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 21:14:52 -04:00
kernelkind
84e60e0642 add virtual list to Onboarding
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 21:14:02 -04:00
kernelkind
529377a706 ui: reactions closer approximation of iOS design
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 20:15:40 -04:00
kernelkind
30af03cfcc fix reaction target bug
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 20:02:34 -04:00
kernelkind
bb878d3772 fix duplicate ReactionUnit for multiple kth indices
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 20:02:34 -04:00
kernelkind
5c9eb492b6 introduce failing test for reaction duplication bug
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 20:02:34 -04:00
kernelkind
0b584a773f ui: remove unnecessary reverse
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:57:00 -04:00
kernelkind
78504a6673 use TimelineUnits instead of Vec<NoteRef>
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:56:56 -04:00
kernelkind
ae204cbd5c upgrade TimelineOpenResult to hold new pubkeys too
for handling unknown profiles

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:56:53 -04:00
kernelkind
7d4e9799e5 ui: add rendering for NoteUnits
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:56:48 -04:00
kernelkind
55d7cd3379 prop UnknownIds for initial timeline
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:32:10 -04:00
kernelkind
697040d862 make since optimize accept Option<&NoteRef> instead of notes
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:32:07 -04:00
kernelkind
49866418a6 note: account for mutes in the notifications dot
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:32:03 -04:00
kernelkind
9b784dfdf7 add TimelineUnits
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:31:59 -04:00
kernelkind
c1d6c0f535 add reactions kind to notifications filter
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:31:54 -04:00
kernelkind
1a93663b1a replace HybridSet with NoteUnits
This will unify the collections that hold the notes to timelines
and threads and allow the notifications timeline to have grouped
notifications, among other things

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:31:50 -04:00
kernelkind
686dea9831 move HybridSet to own file
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:31:34 -04:00
kernelkind
01171ff9d7 remove commented out code...
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:31:27 -04:00
kernelkind
b421e7e45f make TimelineCache::notes private
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:31:20 -04:00
William Casarin
ccc188c0ae chrome: greatly improve soft-keyboard visibility & layout handling
This reworks how we detect and respond to the on-screen keyboard so inputs
don’t get buried and the UI doesn’t “jump”.

- Add SoftKeyboardAnim + AnimState FSM for smooth IME open/close animation
- Centralize logic in keyboard_visibility() with clear edge states
- Animate keyboard height via animate_value_with_time instead of layer
  transforms
- Add ChromeOptions::KeyboardVisibility flag when focused input would be
  occluded
- Add SidebarOptions::Compact to collapse sidebar while typing
- Hide mobile toolbar when keyboard is open (columns app)
- Use .stick_to_bottom(true) in reply + profile editors; remove old spacer hack
- Virtual keyboard toggle moved to F1 in Debug builds
- Introduce SoftKeyboardContext::platform(ctx) helper
- Cleanup dead/commented code and wire up soft_kb_anim_state in Chrome

Result: inputs stay visible, open/close is smooth, and UI adjusts gracefully
when typing.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-20 15:28:28 -07:00
kernelkind
86641c6121 use the onboarding follow pack curator pubkey
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-19 15:05:28 -04:00
William Casarin
77ac91e810 Implement soft keyboard visibility on Android
- Added `SoftKeyboardContext` enum and support for calculating keyboard
  insets from both virtual and platform sources

- Updated `AppContext` to provide `soft_keyboard_rect` for determining
  visible keyboard area

- Adjusted UI rendering to shift content when input boxes intersect with
  the soft keyboard, preventing overlap

- Modified `MainActivity` and Android manifest to use
  `windowSoftInputMode="adjustResize"` and updated window inset handling

- Introduced helper functions (`include_input`, `input_rect`,
  `clear_input_rect`) in `notedeck_ui` for tracking focused input boxes

- Fixed Android JNI keyboard height reporting to clamp negative values

Together, these changes allow the app to correctly detect and respond
to soft keyboard visibility on Android, ensuring input fields remain
accessible when typing.

Fixes: https://github.com/damus-io/notedeck/issues/946
Fixes: https://github.com/damus-io/notedeck/issues/1043
2025-08-19 11:29:45 -07:00
William Casarin
3aa4d00053 clippy: fix lint errors
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-19 09:45:36 -07:00
kernelkind
9ef72ec7de fix contact list bug
not a great solution but we're going to get a new sub manager
soon so it'll probably get replaced anyway

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-17 15:07:24 -04:00
kernelkind
1566cd5cf4 integrate onboarding
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-17 15:07:21 -04:00
kernelkind
bdcd31cda0 add onboarding related state to app
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-17 15:07:19 -04:00
kernelkind
a782d01ec2 add onboarding view
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-17 15:07:16 -04:00
kernelkind
8d4c0cfdbe TMP: temporary author for trusted pks list
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-17 15:07:14 -04:00
kernelkind
f8f720c193 add onboarding 'manager'
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-17 15:07:09 -04:00
kernelkind
0b12b08c59 clippy: allow collapsible match
clippy being annoying

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-17 15:06:42 -04:00
William Casarin
507cf113a3 remove hjkl bindings
these interfere with input

we'll need to come back to this

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-15 11:55:29 -07:00
kernelkind
b750c0a927 use toolbar in columns rather than chrome
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-13 19:20:38 -04:00
kernelkind
49ef85aef6 copy toolbar rendering to notedeck_ui
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-13 19:18:28 -04:00
kernelkind
29f59459d2 add toolbar defaults
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-13 19:18:28 -04:00
kernelkind
cd0bd53b3d add toolbar related logic
copied from chrome

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-13 19:18:28 -04:00
kernelkind
5c0546deab add select_by_route
selects the column containing the desired route. Add it if it
doesn't exist and it's easy to do

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-13 19:18:28 -04:00
kernelkind
3d8018bb9a make compose button animate horiz rather than vert
it animating over the toolbar made the bar dissapear for
some reason

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-13 19:06:18 -04:00
kernelkind
361d0e3708 make search icon more customizable
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-13 19:04:16 -04:00
William Casarin
87cb5ed515 Merge thread scroll fix by kernel
kernelkind (5):
      TMP: use new egui-nav to fix scroll offset issues
      add `scroll_offset` to `NoteAction::Note`
      add `ThreadNote::set_scroll_offset`
      set scroll offset when routing to thread
      appease clippy
2025-08-04 15:08:32 -07:00
William Casarin
9cbba37507 debug: add repaint causes debug tool
enable with --debug, click on fps/frame time counter

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-04 15:04:38 -07:00
William Casarin
b94e715539 ui: add AnimationMode to control GIF rendering behavior
Introduces an `AnimationMode` enum with `Reactive`, `Continuous`, and
`NoAnimation` variants to allow fine-grained control over GIF playback
across the UI. This supports performance optimizations and accessibility
features, such as disabling animations when requested.

- Plumbs AnimationMode through image rendering paths
- Replaces hardcoded gif frame logic with reusable `process_gif_frame`
- Supports customizable FPS in Continuous mode
- Enables global animation opt-out via `NoteOptions::NoAnimations`
- Applies mode-specific logic in profile pictures, posts, media carousels, and viewer

Animation behavior by context
-----------------------------

- Profile pictures: Reactive (render only on interaction/activity)
- PostView: NoAnimation if disabled in NoteOptions, else Continuous (uncapped)
- Media carousels: NoAnimation or Continuous (capped at 24fps)
- Viewer/gallery: Always Continuous (full animation)

In the future, we can customize these by power settings.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-04 13:41:24 -07:00
kernelkind
e8be471608 set scroll offset when routing to thread
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-04 16:12:45 -04:00
kernelkind
97d15e41e7 add ThreadNote::set_scroll_offset
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-04 16:12:42 -04:00
kernelkind
ea5c876da6 add scroll_offset to NoteAction::Note
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-04 16:12:38 -04:00
William Casarin
2fb9470ee6 note/ui: fix reply line when replying in narrow mode
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-03 16:54:04 -07:00
William Casarin
af2c556700 post: set client tag to Damus Android on android
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-03 16:48:34 -07:00