William Casarin
db1642bc31
remove useless struct
...
we can just use tuples for compound ids
Signed-off-by: William Casarin <jb55@jb55.com >
2024-06-13 09:10:31 -07:00
William Casarin
eb294bb4d3
fix light borders for quote reposts
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-06-12 10:46:09 -07:00
William Casarin
b1a7547580
lighter gray for inline previews in white mode
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-06-11 18:48:05 -07:00
William Casarin
5100070b24
fix colors again
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-06-11 18:44:40 -07:00
William Casarin
24d400d5aa
small inline preview pfps
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-06-11 17:50:15 -07:00
William Casarin
0dd33c90e7
initial navigation
2024-06-11 17:50:09 -07:00
William Casarin
bff0f3f628
fix inline note preview colors
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-06-11 16:10:18 -07:00
William Casarin
afb375356b
add test queries for elsat
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-06-10 07:58:39 -07:00
William Casarin
a47f0ba1b2
args: allow filter files and raw filters on cli
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-06-10 07:52:51 -07:00
William Casarin
c5634dac91
set tooltip delay to 100ms
...
so that we don't accidently pop it up all the time
Signed-off-by: William Casarin <jb55@jb55.com >
2024-06-10 06:11:00 -07:00
William Casarin
d576082297
reset virtual list if notes are spliced into timeline
...
Calling egui_virtual_list's `items_inserted_at_start` is incorrect if we
insert notes inbetween other notes in the timeline. To prevent our list
getting confused, let's handle this case explicitly by calling 'reset'
when we splice notes in.
Ideally we would update egui_virtual_list to handle spliced-in items,
but we will leave that to a future update.
2024-06-09 08:53:10 -07:00
William Casarin
0eec8c8c2b
dont since-optimize when we don't have enough notes
...
If our limit says we're ok with many more notes than we have, then don't
since-optimize, otherwise we may be missing notes. This results in a
Changelog-Changed: Don't since-optimize if we don't have enough notes
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-31 09:25:54 +02:00
William Casarin
2d9f45603c
remote: use default_remote_limit instead of hardcoding
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-31 09:24:52 +02:00
William Casarin
ab08e678a9
filter: add default limit
...
This is just an opinionated default limit if we ever need it (we will)
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-31 09:24:52 +02:00
William Casarin
e6efad025f
timeline: don't hide on resize
...
It doesn't seem to flicker so why not
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-31 09:24:52 +02:00
William Casarin
6e69407224
cleanups
2024-05-31 01:08:45 -05:00
William Casarin
2305f1e50a
mobile: make mobile flag runtime-configurable
...
we need to pass a few more things around but it's not that bad. This
will allow you to launch damus with --mobile for mobile testing without
recompilation.
2024-05-31 01:05:53 -05:00
William Casarin
83eab71148
Merge remote-tracking branch 'pr/80'
2024-05-31 01:01:05 -05:00
William Casarin
92ce718e8b
side_panel: return more detailed side panel responses
...
We should be treating all ui widgets as pure functions that do not
mutate anything. This will make testing easier, as well as avoiding
shared mutable references.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-28 15:09:19 -07:00
William Casarin
31b2b5c950
initial refactor in preparation for routing
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-28 15:09:01 -07:00
William Casarin
2af44641db
cap size of remote filter limits
...
I noticed the responses are a bit slow without this. Local query limits
are not capped.
Fixes: https://github.com/damus-io/notedeck/issues/98
Changelog-Changed: Restrict remote filter sizes to 250 (for now)
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-27 11:50:45 -07:00
William Casarin
c1cf7ea324
bump timeline filter limit
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-27 11:50:09 -07:00
William Casarin
194f41d39c
integrate sidebar into main view
...
buttons don't do anything yet
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-27 10:48:28 -07:00
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
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
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
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
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
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
William Casarin
5b7b47aaf5
style: less bubbly
2024-05-04 11:32:34 -05:00
William Casarin
029bbf0e77
nix: add openssl dep for reqwest
2024-05-02 19:31:20 +02:00
William Casarin
5396085d96
textmode: adjust name sizing so it doesn't bump the column
2024-05-02 18:51:05 +02:00
William Casarin
f3f8d4ecb4
textmode: no previews in textmore for now
...
Ideally these would just be angle bracket quotes or something. would be
cool.
2024-05-02 18:50:25 +02:00
William Casarin
d9f1582ee7
since filter optimization
...
This is an optimization that allows us to modify our network filter to
include since-information based off of our local relay. The idea is to
look at the latest note in a given view, and add that to the since
filter for the remote query.
Fixes: https://github.com/damus-io/notedeck/issues/36
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-29 14:06:20 -07:00
William Casarin
f4d496012b
log relay subscriptions
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-29 14:06:20 -07:00
William Casarin
632e5b89d1
mobile: don't add hover on mobile
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-29 12:48:26 -07:00
William Casarin
a173e38141
slightly larger pfpfs
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-29 12:47:29 -07:00
William Casarin
ca58b831b6
queries: set reasonable initial query sizes
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-29 11:01:28 -07:00
William Casarin
0a6a441041
simplify is_mobile check
...
Just base it on the current compile target
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-29 11:00:56 -07:00
William Casarin
28e2e7edd5
Merge remote-tracking branch 'github/virtual-list'
2024-04-28 17:55:29 -07:00
William Casarin
26128c3456
use egui_virtual_list for rendering
...
absolutely insane performance increase
Fixes: https://github.com/damus-io/notedeck/issues/32
Suggested-by: @lucasmerlin
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-28 11:03:47 -07:00
William Casarin
69054d71ca
nip10: show initial reply information on notes
...
Using the newly merged nip10 code, we can show replies on notes!
This is not final, and it's actually different than how we do it in
Damus iOS. Not sure if I like it yet. We will likely have to put pubkey
information back in somewhere soon.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-27 01:58:35 -07:00
William Casarin
afb0e5fe65
github: remove pages workflow
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-27 01:53:08 -07:00
William Casarin
d0cfeee79f
readme: make it clear that nix is optional for non-android dev
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-26 11:11:06 -07:00
William Casarin
f12ccc69a4
add hover to profile map demo
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-24 12:49:06 -07:00
William Casarin
7ec31d0eae
fun large profile grid preview
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-24 12:49:06 -07:00
William Casarin
e8168b0004
ui: add profile picture hover animation
...
I wanted to practice doing animation in egui, so here is a simple
profile picture hover affect. When you mouse over a profile picture, it
get slightly bigger.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-24 12:49:06 -07:00
William Casarin
61deeb03e1
note: support nprofile mentions
...
realized we were missing this bit
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-24 12:49:06 -07:00
William Casarin
32923abfc2
perf: profiling note content rendering
...
Made some small speed improvements
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-22 08:58:30 -07:00
William Casarin
c944cac810
style: realtime hover interactions
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 17:57:32 -07:00
William Casarin
1d44b08f13
ui: make pixel sizes correct, use more of the figma
...
I noticed the pixel sizes were off which made it harder to match the
pixel dimensions of rob's figma designs. This restores the pixel size
and adjust the font sizes so that things look somewhat ok with the
default pixel settings.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 17:45:09 -07:00
William Casarin
24633b84bb
ui: introduce profile picture widget
...
We are starting to use profile pics in different places, let's make it a
widget. We'll also probably need to have adjustable sizes and such soon.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 16:49:49 -07:00
William Casarin
863ccd866b
render_pfp: only depend on imgcache
...
This will allow us to build previews a bit nicer
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 16:36:14 -07:00
William Casarin
ee94f27987
profile: add about and username to profile previews
...
Also adjust colors to match design
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 16:28:12 -07:00
William Casarin
893fd582dc
profiles: introduce DisplayNames
...
This is exactly the same as the DisplayName enum in Damus iOS. Due to
the various inconsistencies in `name` and `display_name` between
clients, we have to generalize DisplayName into two variants: one name
or two names.
If we have two names, we treat it in the standard way of display_name is
the real name, and `name` is the username.
If only one is set, then it is considered both the username and "real name".
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 15:55:47 -07:00
William Casarin
2edba9942c
ui: add banners to profile previews
...
profile previews still need lots of work, but this was a challenge to
get an aspectRatio: fill mechanism for images which the banner takes
advantage of.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 15:03:05 -07:00
William Casarin
2f6f92e62c
style: set 0 duration tooltip delay
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 15:03:05 -07:00
William Casarin
7f61d9aeb7
images: add aspect_fill
...
This is similar to SwiftUI's .aspectRatio(contentMode: .fill) so that
we can get a filling banner image
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 15:03:05 -07:00
William Casarin
55111b8b25
test: update test profile with a banner
...
I need this to test profile preview banners
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 15:03:05 -07:00
William Casarin
a408c96d91
ui: remove some old note ui comments
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 15:03:05 -07:00
William Casarin
54bf2a0767
previews: remove central panel frame
...
This was adding padding we don't want
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 13:42:49 -07:00
William Casarin
bf7775467d
readme: document previews
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-19 22:16:54 -07:00
William Casarin
05fe164a49
ui: add initial Profile hover previews
...
The idea with these is that on notedeck you can just hover your cursor
over a profile link to see the profile. I just have a stub for now, but
full design coming soon after.
Also simplify the preview system even further with a macro. In the
future I imagine we can grep every preview in the codebase, and then
include this as a string inside this macro. This is some kind of
template metaprogramming insanity but in theory it could work.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-19 22:00:19 -07:00
William Casarin
2d566cc637
ui: move RelayView into ui module
...
Trying to keep all UI stuff in there
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-19 21:53:47 -07:00
William Casarin
51c25b88cc
timeline: use strips instead of panels
...
panels grow when their childs a larger than its container. strips do not
do this, which is better for timelines
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-19 19:55:02 -07:00
William Casarin
9642b9243d
a quick note about the View trait
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-19 17:38:47 -07:00
William Casarin
22e4b72729
check: remove duplicate and disable wasm checks
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-19 17:37:41 -07:00
William Casarin
73f54d1c4f
ci: disable wasm builds for now
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-19 14:32:51 -07:00
William Casarin
99ac578ebd
fix clippy warnings
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-19 14:30:08 -07:00
William Casarin
a71e8206fb
introduce View and Previews traits
...
In this commit we refactor the preview mechanism, and switch to
responsive views by default.
To create a preview, your view now has to implement the Preview trait.
This is very similar to SwiftUI's preview mechanism.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-19 14:13:11 -07:00
William Casarin
ff5e5ed74a
make notedeck front and center
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-17 14:37:11 -07:00
William Casarin
6e939a414f
readme: show notedeck preview
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-17 14:33:19 -07:00