Commit Graph

149 Commits

Author SHA1 Message Date
William Casarin
c2f012ff75 debug: fix memory debug builds
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-26 09:53:37 -07:00
kernelkind
2973a0c6c5 appease clippy
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:31:42 -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
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
kernelkind
b750c0a927 use toolbar in columns rather than chrome
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-13 19:20:38 -04:00
William Casarin
53b4a8da5c notedeck app: add clndash
a core-lightning dashboard i'm working on

feature-gate it behind --clndash

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-08 13:19:39 -07:00
William Casarin
cb72592f4b android: fix dark/light mode and folding screen crash
We have to tell android not to restart the activity when a dark/light
mode is switched or when the phone is folded/unfolded. Otherwise
it will crash.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-07 16:27:29 -07:00
William Casarin
c60e1af3eb chrome: add virtual keyboard ui 2025-08-06 19:00:30 -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
6a08d4b1b2 ui/note: fix width instabilities because of spacing_mut
TODO: get rid of all spacing_mut in the codebase

Fixes: 9ff5753bca ("settings: use timed serializer, handle zoom properly...")
2025-07-31 17:54:53 -07:00
William Casarin
d6d7e4c35e android: fix build
Fixes: dac786e60f ("chrome: remove duplication in app setup")
2025-07-31 17:29:06 -07:00
William Casarin
c3499729f2 Merge notification dot by kernel
kernelkind (6):
      extract notifications filter to own method
      add `NotesFreshness` to `TimelineTab`
      set fresh from `TimelineCache`
      chrome: method to find whether there are unseen notifications
      paint unseen indicator
      use unseen notification indicator

Changelog-Added: Add notification dot on toolbar
2025-07-31 17:18:20 -07:00
William Casarin
dac786e60f chrome: remove duplication in app setup
Also move debug warning to chrome so that headless
notedeck apps don't hit that.
2025-07-31 17:07:51 -07:00
kernelkind
41aa2db3c7 use unseen notification indicator
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-31 19:08:08 -04:00
kernelkind
10225158e5 paint unseen indicator
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-31 19:07:36 -04:00
kernelkind
557608db9b chrome: method to find whether there are unseen notifications
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-31 19:07:35 -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
1ab4eeb48c init notebook
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-31 15:07:50 -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
Fernando López Guevara
9ff5753bca settings: use timed serializer, handle zoom properly, use custom text style for note body font size, added font size slider, added preview note 2025-07-29 21:43:26 -03:00
Fernando López Guevara
be720c0f76 fix(settings): use localization 2025-07-29 21:21:06 -03:00
Fernando López Guevara
b8207106d7 feat(settings): persist settings to storage 2025-07-29 11:41:06 -07:00
William Casarin
51f7744149 media/viewer: fullscreen transition animations
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-28 16:12:29 -07:00
William Casarin
3d18db8fd2 Fullscreen MediaViewer refactor
- Moved media related logic into notedeck instead of the ui crate,
  since they pertain to Images/ImageCache based systems

- Made RenderableMedia owned to make it less of a nightmware
  to work with and the perf should be negligible

- Added a ImageMetadata cache to Images. This is referenced
  whenever we encounter an image so we don't have to
  redo the work all of the time

- Relpaced our ad-hoc, hand(vibe?)-coded panning and zoom logic
  with the Scene widget, which is explicitly designed for
  this use case

- Extracted and detangle fullscreen media rendering from inside of note
  rendering.  We instead let the application decide what action they
  want to perform when note media is clicked on.

- We add an on_view_media action to MediaAction for the application to
  handle. The Columns app uses this toggle a FullscreenMedia app
  option bits whenever we get a MediaAction::ViewMedis(urls).

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-28 08:57:57 -07:00
William Casarin
1a3112d8ef Merge remote-tracking branch 'github/pr/1027' 2025-07-24 12:29:11 -07:00
William Casarin
db6103d448 router: fix router selection
Many times we get the router selection wrong. This fixes that

Changelog-Fixed: Fix some routing issues when routing from the Chrome
Fixes: https://github.com/damus-io/notedeck/issues/1024
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-24 12:11:19 -07:00
Jakub Gladysz
bd9a78b305 Do not crash on unknown arg
Signed-off-by: Jakub Gladysz <jakub.gladysz@protonmail.com>
2025-07-24 11:02:43 +03:00
William Casarin
fe30704496 Merge remote-tracking branch 'fernando/feat/settings-view' 2025-07-23 12:00:29 -07:00
Fernando López Guevara
da6ede5f69 feat(settings): add settings view 2025-07-23 15:33:17 -03:00
William Casarin
f722a58d66 Merge new Accounts button to chrome sidebar by kernel #994
kernelkind (3):
      use saturating sub
      add new Accounts button to chrome sidebar
      add ChromePanelAction::Profile & use for pfp
2025-07-23 09:13:49 -07:00
William Casarin
3d4db820b4 i18n: make localization context non-global
- Simplify Localization{Context,Manager} to just Localization
- Fixed a bunch of lifetime issueo
- Removed all Arcs and Locks
- Removed globals
  * widgets now need access to &mut Localization for i18n

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-22 09:49:32 -07:00
Terry Yiu
3f5036bd32 Internationalize user-facing strings and export them for translations
Changelog-Added: Internationalized user-facing strings and exported them for translations
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-07-21 12:45:29 -07:00
William Casarin
c306ab2912 chrome/readme: mention signer
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 14:52:26 -07:00
William Casarin
8a1398face clippy fixes
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 13:54:43 -07:00
kernelkind
34afa755b8 add ChromePanelAction::Profile & use for pfp
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 15:23:41 -04:00
kernelkind
45490c918d add new Accounts button to chrome sidebar
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 15:23:32 -04:00
William Casarin
db6f02084d input: halve long press input duration
people were saying long press was too long

Fixes: https://github.com/damus-io/notedeck/issues/981
2025-07-16 18:01:48 -07:00
kernelkind
cc92fc2082 make TimelineCache::timelines private
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-16 18:13:07 -04:00
William Casarin
64ac06791a Merge show-note-client option by fernando
We should move this somewhere else before we turn it on
officially

Fernando López Guevara (2):
      refactor: use Margin:ZERO
      feat(note-view): show note client
2025-07-16 14:07:42 -07:00
Fernando López Guevara
4bf75c95de feat(note-view): show note client 2025-07-16 17:09:59 -03:00
William Casarin
872aadf279 debug: fix memory debugger
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-16 11:17:13 -07:00
William Casarin
461665f599 ui: remove show_pointer
This can just be achieved by on_hover_cursor

Didn't realize this.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-16 09:17:27 -07:00
William Casarin
ac22fc7072 columns: enable toolbar scroll to top
Fixes: https://github.com/damus-io/notedeck/issues/969
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 13:30:40 -07:00
William Casarin
cd560cb7bf chrome: make toolbar smaller
its a bit chonky

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 12:40:04 -07:00
William Casarin
e2295172a2 fix target sdk
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-14 16:15:29 -07:00
William Casarin
45bb00426f andriod: add app icons
Fixes: #958
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-14 16:02:49 -07:00
William Casarin
3a25f3b245 tweak minSdk
24 is lowest vulkan ... so target that

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-14 16:01:48 -07:00
William Casarin
cf1814f250 android: hide chrome sidebar by default
When compiled as android, make sure we hide the chrome sidebar
by default

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-10 13:33:27 -07:00
William Casarin
6172777b1a android: remove special load arguments
we want to make sure we have the same onboarding path as desktop

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-10 13:32:52 -07:00