Commit Graph

56 Commits

Author SHA1 Message Date
97b6755504 Add missing localized strings and export strings for translation 2025-09-04 22:22:27 -04:00
kernelkind
f436b49fec add Repost to composite unit & fragment
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-04 15:53:43 -04:00
kernelkind
04ce29d1dd ui: render repost cluster impl
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-04 15:53:40 -04:00
kernelkind
ae1d5ab1c5 add CompositeType::Repost
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-04 15:53:37 -04:00
kernelkind
80ae489967 ui: repost description impl
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-04 15:53:31 -04:00
kernelkind
571435cf85 ui: modularize composite entry rendering & fix tr
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-04 15:53: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
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
7d4e9799e5 ui: add rendering for NoteUnits
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:56:48 -04: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
kernelkind
8960b3f052 add scroll_id for all views with vertical scroll
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-24 17:53:35 -04: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
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
kernelkind
cc92fc2082 make TimelineCache::timelines private
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-16 18:13:07 -04: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
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
074472eec9 columns/timeline: include column index in timeline view_id
might fix weird scroll issues on profiles

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 13:02:05 -07:00
kernelkind
a7f5319fde remove MuteFun prop
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-14 21:34:05 -04:00
kernelkind
397bfce817 add Accounts to NoteContext
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-14 21:34:02 -04:00
William Casarin
96cb5e26ce Merge follow/unfollow from kernel
Jakub Gladysz (1):
      ui: add follow button

kernelkind (14):
      bump nostrdb
      move polling responsibility to `AccountData`
      `AccountData`: decouple query from constructor
      add constructor for `AccountData`
      add `Contacts`
      use `Contacts` in `AccountData`
      expose `AccountSubs`
      Unify sub for contacts in accounts & timeline
      move `styled_button_toggleable` to notedeck_ui
      construct NoteBuilder from existing note
      send kind 3 event
      add actions for follow/unfollow
      add UI for (un)follow
      send contact list event on account creation
2025-07-11 13:06:24 -07:00
William Casarin
22cfaaf64a Merge remote-tracking branch 'github/pr/928' 2025-07-10 09:10:28 -07:00
William Casarin
e4e8d7fcf3 note/action: add ScrollInfo
I might need this... lets add it just in case

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-10 09:03:39 -07:00
Fernando López Guevara
ec25413433 feat(mobile): improve layout and behavior on narrow screens 2025-07-08 16:20:51 -07:00
kernelkind
8e92a97a57 make selected accounts non optional
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:41:17 -04:00
Fernando López Guevara
f3f5026719 fix: skip blurring for user's own images 2025-06-02 12:36:42 -03:00
kernelkind
db5e10656d set variable for scroll offset
necessary to maintain scroll positions across popup & Nav

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-22 20:33:20 -04:00
kernelkind
54c0fdb563 don't show zap button if no wallet
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-17 14:29:43 -04:00
kernelkind
a29277d263 propagate JobsCache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-05-04 12:55:53 -04:00
William Casarin
8af80d7d10 ui: move note and profile rendering to notedeck_ui
We want to render notes in other apps like dave, so lets move
our note rendering to notedeck_ui. We rework NoteAction so it doesn't
have anything specific to notedeck_columns

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-17 12:34:43 -07:00
William Casarin
50dec5b5d5 context: implement note broadcasting
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 16:02:43 -07:00
William Casarin
418e08541d notedeck: include frame history
for debugging.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 11:30:22 -07:00
William Casarin
9c9b4199f5 ui crate and chrome sidebar
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 11:29:01 -07:00
kernelkind
5917bc16fd propagate current account
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-04-08 22:50:00 -04:00
William Casarin
71f6d3014a Merge fullscreen images from jglad
jglad (3):
      #716 add full screen images
      #716 move goto button one level down
      #716 store full size img, add zoom & pan
2025-03-13 10:31:01 -07:00
Ken Sedgwick
2f4d9442f0 allow deprecated round_rect_to_pixels 2025-03-11 10:52:00 -07:00
jglad
02ec025096 #716 move goto button one level down 2025-03-10 18:02:43 +01:00
kernelkind
a9f473e3c9 introduce NoteContext
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-03-08 14:57:32 -05:00
William Casarin
4365839242 Revert driller
This reverts commit cec49c83bd.

Revert "update NoteContentsDriller to NoteContext"

This reverts commit 65bd6a65f9.

Revert "introduce the driller"

This reverts commit 95d618e7fe.
2025-03-07 12:53:34 -08:00
William Casarin
cec49c83bd fix formatting
Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-07 12:36:26 -08:00
William Casarin
65bd6a65f9 update NoteContentsDriller to NoteContext
Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-07 12:30:53 -08:00
kernelkind
95d618e7fe introduce the driller
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-03-07 12:07:24 -05:00
kernelkind
33fdf647e3 migrate to using Images instead of MediaCache directly
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
4f4a0feb8c rename ImageCache -> MediaCache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
William Casarin
bd352f76d4 feat: add scramble flag for development text scrambling
This commit introduces a new scramble option to help reduce distractions
during development by scrambling text using rot13. When enabled via the
new `--scramble` flag, text displayed in various views is transformed,
making it easier to focus on layout and behavior without reading the
actual content.

App & Args Updates

  - Added a `scramble: bool` field to the main application state (in `app.rs`).

  - Extended argument parsing (in `args.rs`) to recognize the `--scramble` flag.

NoteOptions Enhancement

  - Introduced a new bit flag `scramble_text` in `NoteOptions` with
    corresponding setter/getter methods.

UI Adjustments

  - Propagated the scramble flag through note rendering functions across
    navigation, timeline, and note view modules.

  - Updated several UI components (e.g., in `nav.rs`, `route.rs`, and
    `contents.rs`) to accept and apply the new note options.

Rot13 Implementation

  - Implemented a helper function (`rot13`) to scramble text
    conditionally when the scramble option is enabled.

This feature is intended for development builds only, offering a way to
obscure text content during UI tweaks and testing.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-22 14:30:38 -08:00
William Casarin
0cc1d8a600 Switch to unified timeline cache via TimelineKinds
This is a fairly large rewrite which unifies our threads, timelines and
profiles. Now all timelines have a MultiSubscriber, and can be added
and removed to columns just like Threads and Profiles.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-05 18:30:45 -08:00
William Casarin
8a87791594 morenotes: show pointer on hover
all clickable things should show pointers

Cc: kernel
2025-01-25 16:06:32 -08:00
kernelkind
5b0068e6cb add more notes indicator
closes: https://github.com/damus-io/notedeck/issues/72

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-01-25 17:48:34 -05:00
William Casarin
4b542c0a74 switch to TimelineCache
Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-19 14:18:59 -08:00