Commit Graph

18 Commits

Author SHA1 Message Date
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
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
5396085d96 textmode: adjust name sizing so it doesn't bump the column 2024-05-02 18:51:05 +02: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
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
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
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
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
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
99ac578ebd fix clippy warnings
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-19 14:30:08 -07:00
William Casarin
a8185d9a75 note: don't allow nested note previews
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-14 17:36:05 -07:00
William Casarin
402a1337f2 ui: switch to flags for note options
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-14 16:23:59 -07:00
William Casarin
2b20f73974 initial inline note previews
still needs a border and options to remove actionbar

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-12 18:58:36 -07:00
William Casarin
5e45e4a2e5 ui: simplify note widget
pass just a note pointer to the note ui widget. We currently don't
support non-db notes but we can add support for that later.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-12 16:49:18 -07:00
William Casarin
4e7d168d22 refactor: rename widgets to ui
consolidate ui related things like widgets into our ui module

Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-12 16:16:19 -07:00