Commit Graph

74 Commits

Author SHA1 Message Date
William Casarin
cb7dadee44 ui: note metadata stats
Signed-off-by: William Casarin <jb55@jb55.com>
2025-11-04 14:54:47 -08:00
William Casarin
74f63f49ca add is_root_note helper
Signed-off-by: William Casarin <jb55@jb55.com>
2025-11-04 14:53:51 -08:00
kernelkind
11611a11d8 feat(reaction): user can send reactions
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-10-17 15:35:39 -04:00
kernelkind
83753ccc7d feat(ui): add like button
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-10-17 15:35:32 -04:00
kernelkind
4bb60c6240 refactor: rename NoteAction::Quote -> Repost
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-10-04 18:09:18 -04:00
William Casarin
a6d91c43e4 Merge a bunch of fixes from kernel
PRs

* 1141
* 1137
* 1136

kernelkind (10):
      Revert "feat: transitively trust images from parent note"
      feat: enable transitive trust for repost
      fix `NoteUnits` front insertion logic
      fix: don't reset scroll position when switching toolbar
      fix: no longer make the scroll position jump oddly
      fix: repost desc text size on newline
      make `tabs_ui` return `InnerResponse`
      refactor: impl transitive trust via `NoteOptions::TrustMedia`
      refactor: move `profile_body` to fn
      refactor: remove unnecessary code
2025-09-16 11:28:48 -07:00
kernelkind
50293a6f34 refactor: remove unnecessary code
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-13 14:49:46 -04:00
kernelkind
d6182ed7c3 Revert "feat: transitively trust images from parent note"
This reverts commit ea14713b58.
2025-09-11 19:39:12 -04:00
kernelkind
4ac2e59983 refactor: impl transitive trust via NoteOptions::TrustMedia
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-11 19:37:56 -04:00
William Casarin
c0fcf53ff6 Merge a bunch of fixes by kernel
kernelkind (3):
      fix: can upload photo from reply or quote
      fix: image shimmer bug
      feat: transitively trust images from parent note
2025-09-10 12:06:31 -07:00
kernelkind
ea14713b58 feat: transitively trust images from parent note
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-09 19:56:12 -04:00
kernelkind
2eef34fa1c note: remove repost from note ui
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-09 17:53:28 -04:00
William Casarin
c765b031e9 ui/note: fix actionbar note responses
they are not responsive on android?

Signed-off-by: William Casarin <jb55@jb55.com>
2025-09-04 15:34:13 -07:00
kernelkind
637b05c1e2 make get_reposted_note pub
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-04 15:53:46 -04:00
kernelkind
72d696beb2 actionbar: reintroduce error messages
there was a regression that caused error messages to not be displayed
any more when zapping.

Now when you click the zap button and the zap fails for some reason, the
zap button will be replaced with an X and hovering over the X displays
the error message

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-31 19:34:51 -04:00
kernelkind
dea695fa8e actionbar: don't early return
it's not good practice to early return while rendering,
super easy to introduce flickering

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-31 19:29:11 -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
William Casarin
0dda26791a perf: a few micro optimizations
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-03 20:17:16 -07:00
William Casarin
27df33dc83 ui/note: fix reply description item spacing
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-03 16:30:37 -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
24f70930eb note: turn off full date view for previews
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-03 14:53:14 -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
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
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
William Casarin
0fc8e70180 ui/note: fix indented actionbar in non-wide mode
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-29 13:58:17 -07:00
William Casarin
2a85ee562c ui/note: simplify weird hack and make note of it
Fixes: https://github.com/damus-io/notedeck/issues/842
Fixes: f2e01f0e40 ("fix(note_actionbar): add invisible label to stabilize section width ¯\_(ツ)_/¯")
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-29 10:13:43 -07:00
William Casarin
1fabd347ca Merge remote-tracking branch 'github/pr/1031' 2025-07-29 10:08:43 -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
96ab4ee681 ui/note: fix another reply_desc wrapping issue
Fixes: https://github.com/damus-io/notedeck/issues/892
Changelog-Fixed: Fix another wrapping issue
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-25 12:12:25 -07:00
Fernando López Guevara
f2e01f0e40 fix(note_actionbar): add invisible label to stabilize section width ¯\_(ツ)_/¯ 2025-07-25 12:13:39 -03:00
William Casarin
8f63546524 ui: wrap reply description
This is similar to our fix in:

- Fixes: ee85b754dd ("Fix text wrapping issues")

Where removing the ui.horizontal call fixes subsequent main wrap layout
issues. It's still not clear to me where wrap state is getting mutated
where it would affect subsequent ui calls...

Fixes: https://github.com/damus-io/notedeck/issues/892
Changelog-Fixed: Fixed wrapping issues in Notes & Replies timeslines
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-24 09:11:12 -07:00
William Casarin
e997f1bf68 ui/note: make buttons larger
Changelog-Changed: Make buttons larger
Fixes: https://github.com/damus-io/notedeck/issues/879
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-23 11:49:06 -07:00
William Casarin
ff0428550b fix missing zap button
Changelog-Fixed: Fix missing zap button
Fixes: 397bfce817 ("add `Accounts` to `NoteContext`")
Fixes: https://github.com/damus-io/notedeck/issues/1021
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-23 11:49:03 -07:00
William Casarin
56cbf68ea5 ui/note: small refactor to use returns instead of break
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-23 09:39:05 -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
Fernando López Guevara
4bf75c95de feat(note-view): show note client 2025-07-16 17:09:59 -03: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
a517bc69bc Merge is_following fixes from kernel
kernelkind (4):
      add `Accounts` to `NoteContext`
      remove `MuteFun` prop
      make `Contacts::is_following` use bytes instead of `Pubkey`
      migrate to check following through `Contacts::is_following`
2025-07-16 08:50:58 -07:00
William Casarin
23d02a9dd2 note/options: remove redundant has function
there is a contains function generated by the bitflags macro

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 14:35:14 -07:00
kernelkind
397bfce817 add Accounts to NoteContext
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-14 21:34:02 -04:00
William Casarin
c402320ad3 ui: fix broken note previews
Also made the options more clear

Fixes: https://github.com/damus-io/notedeck/issues/959
Fixes: b6348b1507 ("note/options: simplify flag logic")
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-14 14:05:41 -07:00
William Casarin
b6348b1507 note/options: simplify flag logic
simpler, less macro magic

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-10 14:29:56 -07:00
William Casarin
298fab6471 ui/narrow: restore padding
This is a bit too tight

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-10 09:12:08 -07:00
William Casarin
22cfaaf64a Merge remote-tracking branch 'github/pr/928' 2025-07-10 09:10:28 -07:00
William Casarin
13021afa58 Revert "feat(note-actionbar): refine icons"
icons are too blurry, lets fix that

This reverts commit e1bd1d3e8b.
2025-07-09 11:18:04 -07:00
Fernando López Guevara
ec25413433 feat(mobile): improve layout and behavior on narrow screens 2025-07-08 16:20:51 -07:00
Fernando López Guevara
e1bd1d3e8b feat(note-actionbar): refine icons 2025-07-07 23:28:08 -03:00
Fernando López Guevara
36667bc024 feat(app_images): add module to manage static app image assets 2025-06-25 09:53:31 -07:00