Commit Graph

65 Commits

Author SHA1 Message Date
William Casarin
c4e0c710c9 actionbar: remove border on reply button, add expand animation
Signed-off-by: William Casarin <jb55@jb55.com>
2024-06-13 09:36:53 -07:00
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
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
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
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
kernelkind
df0377cb89 Pfp integration to side panel
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-27 10:48:28 -07:00
kernelkind
7ebd694f11 refactor account switcher & management previews
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-27 10:48:28 -07:00
kernelkind
22264e70f5 Integrate account switcher to side panel
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-27 10:48:28 -07:00
kernelkind
c0b1a01b5d Account switcher
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-27 10:48:28 -07:00
kernelkind
f489ed3b9e Migrate to new AccountManagementView conception
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-27 10:48:28 -07:00
kernelkind
2ca47edf4d AccountManager: add ability to make a selection
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-27 10:48:28 -07:00
kernelkind
bdf6156fff Move preview controller out of account_manager.rs
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-27 10:48:28 -07:00
kernelkind
11b3effa51 Add AccountManager to app
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-05-27 10:48:28 -07:00
kernelkind
f071d59dae Rename PersistState -> StateInMemory
also use IdTypeMap::insert_temp instead of insert_persisted.
The whole conception of using egui memory to share state is probably
going to be changed to a more robust solution in the future.

Signed-off-by: kernelkind <kernelkind@gmail.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
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
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
6fc5eb27fc working notes + notes&replies
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-23 15:31:24 -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
0e0e5d0eaa fix clippy issues
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-15 20:53:17 -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
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
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
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
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
a173e38141 slightly larger pfpfs
Signed-off-by: William Casarin <jb55@jb55.com>
2024-04-29 12:47:29 -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
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
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
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