Commit Graph

629 Commits

Author SHA1 Message Date
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
William Casarin
ad35547582 refactor: collapse client label settings; drop CLI/settings toggles
The "top vs bottom" client label setting was cluttering the UI and
codebase with toggles that added little value. This consolidates client
label handling into one option, removes unused CLI/settings knobs, and
makes NoteView’s API consistent and fluent. Result: fewer knobs, less
branching, and a clearer, more predictable UI.

Now client labels are only shown in one place: selected notes.

- Drop `--show-client` arg in notedeck and `--show-note-client=top|bottom`
  args in notedeck_columns

- Remove `NotedeckOptions::ShowClient` and related CLI parsing

- Delete `ShowSourceClientOption` enum, settings UI, and
  `SettingsAction::SetShowSourceClient`

- Collapse `NoteOptions::{ClientNameTop, ClientNameBottom}` into a single
  `NoteOptions::ClientName`

- Add `NoteOptions::{Framed, UnreadIndicator}`

- Move “framed” and unread indicator into flags (no more ad‑hoc bools)

- Add new NoteView builder methods: `.client_name()`, `.frame()`,
  `.unread_indicator()`, and `.selected_style()`

- CLI flags for showing client labels have been removed

- `ClientNameTop`/`ClientNameBottom` replaced with `ClientName`

- API using `framed` or `show_unread_indicator` booleans must now use
  the new flag setters

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-03 16:16:15 -07:00
William Casarin
5b1bc442d4 Pull spanish translations from terry
Terry Yiu (2):
      Import Spanish translations
      Fix localization issues and export strings for translation
2025-08-03 14:02:43 -07:00
William Casarin
391abe817d columns: clean up flags, refactor content rendering
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-03 14:02:05 -07:00
William Casarin
30eb2e0258 columns: fix double reference
its not needed

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-03 14:00:12 -07:00
Terry Yiu
fa13884908 Fix localization issues and export strings for translation
Changelog-Fixed: Fixed localization issues
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-08-01 14:36:29 -04:00
Fernando López Guevara
26ece3bc05 feat(note): show full created date format on selected notes 2025-08-01 08:42:58 -03:00
Fernando López Guevara
ab84304265 feat(settings): show note full date 2025-08-01 08:38:49 -03:00
kernelkind
41aa2db3c7 use unseen notification indicator
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-31 19:08:08 -04:00
kernelkind
8697a5cb0a set fresh from TimelineCache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-31 19:07:28 -04:00
kernelkind
7aca39aae8 add NotesFreshness to TimelineTab
necessary for notifications indicator

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-31 19:07:24 -04:00
kernelkind
aa467b9be0 extract notifications filter to own method
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-31 19:07:13 -04:00
William Casarin
b1a5dd6cab add NotedeckOptions and feature flags, add notebook feature
This switches from bools to flags in our Args struct. We also add
notebook as an optional feature flag (--notebook) since its not ready.
2025-07-31 16:03:13 -07:00
William Casarin
a8c6baeacb make clippy happy 2025-07-31 11:55:39 -07:00
William Casarin
a896a6ecfa Merge remote-tracking branch 'fernando/feat/persist_settings' 2025-07-31 11:48:57 -07:00
Fernando López Guevara
f282363748 feat(notedeck): add cross-platform URI opener 2025-07-30 16:27:51 -07:00
kernelkind
b04f50a9f6 insert space after mention selection
closes: https://github.com/damus-io/notedeck/issues/985

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-30 18:11:27 -04:00
kernelkind
173972f920 mentions: don't lose focus after select mention
Closes: https://github.com/damus-io/notedeck/issues/728

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-30 17:45:09 -04:00
kernelkind
31ec21ea02 mention-picker: re-add spacing from inner_margin
shouldn't do this in Frame, for some reason that captures the drag

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-30 17:45:05 -04:00
kernelkind
d3d8d7be4b fix scroll regression
Closes: https://github.com/damus-io/notedeck/issues/986

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-30 17:45:02 -04:00
kernelkind
09dc101c1b rename SearchResultsView => MentionPickerView
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-30 17:44:51 -04:00