Commit Graph

478 Commits

Author SHA1 Message Date
William Casarin
66ce42a302 remove context from DesktopSidePanel
we can just get this from the egui::Ui when rendering

Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-27 10:48:28 -07:00
kernelkind
fd943e5f9f account_management: refactor
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-27 10:48:28 -07:00
kernelkind
88a3a2d088 move test account creation & apply to global popup
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-27 10:48:28 -07:00
kernelkind
17d0c97c78 Create side panel & global popup
Create a side panel UI element for desktop with three buttons for:
adding a column, settings, and account management. The account
management button is temporary pending a better design. It is the only
one that is interactable at the moment. When the user clicks it, the
global popup window will be shown and the AccountManagementView will be
presented on the window. The user can click on the X on the top right of
the window to close it.

Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-27 10:48:28 -07:00
kernelkind
1dc832baea app: add accounts to Damus & mock
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-27 10:48:28 -07:00
William Casarin
5630f93b71 debug: add some debug logs for keyboard note selection
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-24 13:43:31 -07:00
William Casarin
9e5048d4f2 input: fix deadlock on resize
weird egui Context quirk

Fixes: https://github.com/damus-io/notedeck/issues/97
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-24 13:42:57 -07:00
William Casarin
2bef02106a mobile: use my timeline for testing again
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-24 13:21:37 -07:00
William Casarin
c5cc2f923c mobile: a tad more padding at the top
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-24 13:21:22 -07:00
William Casarin
56e1e2fa09 update slow timeline query
relays have trouble with large limits?

Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-24 13:21:02 -07:00
William Casarin
739e9f87f2 nip10: fetch unknown replied-to notes
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-24 13:20:33 -07:00
William Casarin
135a5c99ae Revert "deps: using tracing instead of log"
This reverts commit af92e326f6.
2024-05-23 16:10:07 -07:00
William Casarin
c421a49912 Merge MacOS key storage
kernelkind (3):
      Add MacOS key storage
      Conditionally compile MacOS key storage code
      macos_key_storage: runner ignore tests
2024-05-23 16:00:18 -07:00
William Casarin
83100d7f50 tabs: select notes & replies by default
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-23 15:50:06 -07:00
William Casarin
6fc5eb27fc working notes + notes&replies
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-23 15:31:24 -07:00
William Casarin
232ba0e3aa list: switch from arc mutext to rc refcell
we don't have any multithreaded stuff yet

Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-23 15:27:37 -07:00
William Casarin
a8693a2bd3 timeline: refactor tabs into TimelineView
TimelineView is a filtered view of a timeline. We will use this for
future tab rendering. We also introduce a new "selection" concept for
selecting notes on different timeline views. This is in preparation for
vim keybindings.
2024-05-23 15:27:37 -07:00
William Casarin
8663851e7e input: handle raw events 2024-05-23 15:27:37 -07:00
kernelkind
adc1d25948 macos_key_storage: runner ignore tests
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-23 16:07:58 -04:00
kernelkind
0c88c63460 Conditionally compile MacOS key storage code
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-23 16:07:38 -04:00
William Casarin
cf2a832a5e input: switch to scanning over raw input events
Calling key_pressed invokes a filter over the entire event list every
time, this is much more efficient, which is important when we are
handling many key events.
2024-05-23 11:16:50 -07:00
William Casarin
3a891a982c input: process input once
Instead of calling ctx.input multiple times, let's do it once. We are
going to do a lot more stuff in here, such as vim key bindings
2024-05-23 11:16:50 -07:00
William Casarin
93b7af1a4e perf: fix continuous repaint
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-23 11:16:50 -07:00
William Casarin
c30fc44df0 cleanup: remove old viewport code 2024-05-23 11:16:50 -07:00
William Casarin
af92e326f6 deps: using tracing instead of log
also update some other deps

Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-23 11:16:43 -07:00
kernelkind
9fad35485a Add MacOS key storage
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-21 19:50:05 -04:00
William Casarin
7e02c7f745 fonts: always use base fonts for all families
We should always fallback if we can't find a glyph in a particular font

Fixes: https://github.com/damus-io/notedeck/issues/78
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-20 12:19:48 -07:00
William Casarin
4fc6e225ca don't bump timeline when adding notes
This is quite different than Damus iOS. The timeline will continually
add new items without bumping scroll position, thanks to
egui-virtual-list's `items_inserted_at_start` function.

Closes: https://github.com/damus-io/notedeck/issues/38
Fixes: https://github.com/damus-io/notedeck/issues/59
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-16 10:26:36 -07:00
William Casarin
0e0e5d0eaa fix clippy issues
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-15 20:53:17 -07:00
William Casarin
0d240c16a5 simplify tab underline calculation
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-15 18:01:48 -07:00
William Casarin
95c526f453 mobile: add lots of top padding on mobile
and remove top panel

Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-15 18:01:28 -07:00
William Casarin
dbc56ac098 mobile: simplify is_mobile
we don't need context anymore

Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-15 18:01:04 -07:00
William Casarin
12a6c64778 move add_space to its correct location
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-15 17:39:42 -07:00
William Casarin
9e8f7a2e5c ui: integrate egui-tabs for notes & replies selector
demo: https://cdn.jb55.com/s/notedeck-tabs.mp4

Fixes: https://github.com/damus-io/notedeck/issues/47
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-15 17:28:01 -07:00
William Casarin
029896627c ui: add feathering-resistant hline separator fn
"pixel-aligned" Separators get feathered into a blurry mess. This seems
to help.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-15 15:26:19 -07:00
William Casarin
bc5ff4858f direnv: make args explicit so its easy to change
for direnv enjoyers

Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-15 09:41:19 -07:00
William Casarin
c7a1ca534d Merge commit 'refs/pull/github/53'
35adae86f9 ("nix: keep lazy for use_android=false")
2024-05-15 09:40:12 -07:00
William Casarin
e1f61076f7 switch to rustls-tls-native-roots
This fixes our android build which doesn't like openssl

Fixes: https://github.com/damus-io/notedeck/issues/54
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-15 09:16:20 -07:00
hellodword
35adae86f9
nix: keep lazy for use_android=false 2024-05-15 15:09:15 +00:00
kernelkind
95f8623c41 migrate AccountManagementView to enostr Keypair
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-14 14:39:05 -07:00
kernelkind
bb25fd4ae1 AccountSelectionWidget
Will be useful for selecting an account for the 'Add Column' view

Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-13 10:50:42 -07:00
kernelkind
e9c3596067 AccountManagementView
View used to add and remove accounts from the app

Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-13 10:50:42 -07:00
kernelkind
93800e0d04 Add SimpleProfilePreview
Preview that only contains the pfp, display name, and username

Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-13 10:50:42 -07:00
kernelkind
59818edd83 remove nostr-sdk
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-08 14:14:37 -07:00
kernelkind
e04c8821d5 Add keypair & update pubkey
Keypair & FullKeypair match structs in damus ios

Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-08 14:14:37 -07:00
kernelkind
b8177459ab use nostr in enostr
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-08 14:14:37 -07:00
William Casarin
3e1acfa9cf update version in comment because I still use this on my laptop
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-04 10:26:26 -07:00
William Casarin
30e9aa5357 nix: make android emulator optional
Tony was having issues on aarch64-linux

Changelog-Fixed: Fix nix build on aarch64-linux
2024-05-04 11:32:34 -05:00
kernelkind
aacc41e4c2 Add flag to emulate mobile during preview
Since the is_mobile check was moved to compile-time instead of runtime
in 0a6a441041, we need a way to override
the check when previewing using the 'mobile' flag.

Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-04 11:32:34 -05:00
William Casarin
f9d6161500 move account_login_view to ui submodule
trying to keep all views and widgets in here
2024-05-04 11:32:34 -05:00