Commit Graph

268 Commits

Author SHA1 Message Date
Ken Sedgwick
84838478b3 Skip muted content 2024-12-02 13:14:54 -08:00
Ken Sedgwick
f00a67ab2c Update user relay-list via polling 2024-12-02 13:14:50 -08:00
William Casarin
65537b28fd ui: remove top panel
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 11:59:36 -08:00
kernelkind
0855186a8a misc fixes
- add notedeck version number to support view & email body
- add milestone name below Damus logo in side panel
- remove search button in side panel
- remove fps counter & text mode in top bar
- remove 'add relay' button in settings view

Closes: #505
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-29 11:37:56 -08:00
William Casarin
42c0f02072 onboarding: add introductions hashtag column
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 10:35:15 -08:00
William Casarin
f8d6fbf153 refactor: simplify demo timeline if statement
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 10:34:56 -08:00
William Casarin
2e9a00ee57 demo: ensure we have a base column
This allows you to set your first column as your own home timeline
without having to re-arrange anything

Fixes: 62a85d921c1f ("use demo config when no accs")
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 10:04:57 -08:00
kernelkind
c2bdae1dcb onboarding: use demo config when no accounts
Closes: #487
Fixes: https://github.com/damus-io/notedeck/issues/446
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-29 09:55:11 -08:00
William Casarin
69eaccdd8f windows: cap dbsize to 16GiB for now
because windows is horrible
2024-11-28 16:52:00 -08:00
William Casarin
8d59260935 windows: handle large mapsizes gracefully
Update nostrdb to gracefully handle mapsizes that
are too large and fail to create nostrdb files.

We now keep shrinking the mapsize until database creation
succeeds. We still use the default mapsize of 32GiB on
windows, which is a bit annoying until we have nostrdb
resizing like monero.

Fixes: https://github.com/damus-io/notedeck/issues/491
2024-11-28 16:52:00 -08:00
William Casarin
e2a2db8ac2 refactor: move save_cols closer
why you so far away little guy?

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-22 11:28:33 -08:00
William Casarin
679a5afdeb nav: only save columns once
Before we would save columns for each rendered nav. Now we only do it
once.
2024-11-19 18:52:42 -08:00
William Casarin
7f234935cc refactor: unify note, post and nav actions
There was a bunch of redundant responses. Let's unify them under
the RenderNavAction enum. We unify all action processing under this
type.

This also centralizes all of our side effects into a single function
instead of scattering them everywhere
2024-11-19 18:43:09 -08:00
William Casarin
63d0a622f1 onboarding: show account login route on first open
Instead of only new columns, show login route on first open.

We will also add a demo column.

Changelog-Changed: Show login column on first open
Fixes: https://github.com/damus-io/notedeck/issues/440
2024-11-18 18:22:08 -08:00
William Casarin
22e67c95cc refactor: rename AccountsManager to Accounts
plz stop with the managers
2024-11-18 18:03:57 -08:00
William Casarin
19933c84f1 onboarding: lookup profile after accounts are added
To reduce the side effects of this change, we introduce a new UnknownId
action type:

  - SingleUnkIdAction

This can be returned from functions to signal that we need to do some
work to look for things. We add a `must_use` directive to this type
to ensure callers handle it.

Changelog-Fixed: Fix missing profiles when new accounts are added
Fixes: https://github.com/damus-io/notedeck/issues/356
2024-11-18 17:11:58 -08:00
William Casarin
de8029d60f fix crash when removing non-last columns
Fixes: https://github.com/damus-io/notedeck/issues/445
2024-11-17 17:12:59 -08:00
William Casarin
8043d86bf2 arg: fix broken dbpath argument, add test
I broke dbpath, lets fix that and add a test so it doesn't happen again

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-15 12:30:45 -08:00
William Casarin
4d124c05fa remove unnecessary crash
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-15 10:11:00 -08:00
William Casarin
01bedac710 Fix filter states when adding columns
This fixes various issues with filter states when adding columns. We now
maintain multiple states per relay so that we don't lose track of
anything.

Fixes: https://github.com/damus-io/notedeck/issues/431
Fixes: https://github.com/damus-io/notedeck/issues/359
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-14 15:25:08 -08:00
William Casarin
845f745dca remove NewTimelineSub
New timelines should be handled in the standard timeline codepaths

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-14 10:36:16 -08:00
William Casarin
4c458727a9 fix: save columns on removal
Fixes: https://github.com/damus-io/notedeck/issues/432
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 15:51:46 -08:00
William Casarin
91016facc7 Merge Persist Columns #390
Fixed a few merge conflicts

kernelkind (2):
      initial column storage
      tmp remove DeckAuthor columns
2024-11-13 13:13:55 -08:00
William Casarin
2f20e8253e app: simplify Damus::new constructor
Just take an egui::Context instead of an eframe::CreationContext.
This should make it easier to test the app via egui::Context::default();

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 10:53:29 -08:00
William Casarin
fab1257f6e paths: remove hardcoded basepath
Before we were hardcoding the basepath with dirs, which isn't that
useful for testing, previews, or for android. Let's fix that.

This also moves the db and cache directories into our root DataPaths.
This is a breaking change, we don't have a migration step. sorry.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 09:55:56 -08:00
kernelkind
56dd88b3a2 initial column storage
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-30 13:40:31 -04:00
William Casarin
1476be48cc Merge 'Support view, key storage'
kernelkind (5):
      file storage
      write log files to disk daily and on panic
      app window size persists on app close
      support view
      fix cmd line args bug
2024-10-28 13:30:16 -07:00
kernelkind
0c7b5e7e59 fix cmd line args bug
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-28 15:30:44 -04:00
kernelkind
309477dca4 support view
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-25 15:23:35 -04:00
kernelkind
03bfb34172 app window size persists on app close
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-25 15:23:35 -04:00
kernelkind
4f86e9604f file storage
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-25 15:23:35 -04:00
kernelkind
dcb6620ddd proper timelineTabs
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-14 17:39:10 -04:00
kernelkind
6ffe33e924 integrate profile view caching
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-14 13:29:36 -04:00
kernelkind
780fba3093 generify Threads
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-14 13:29:31 -04:00
kernelkind
44948fdff0 init profile routing
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-11 16:37:17 -04:00
kernelkind
1bf9d5d934 title bar
add title bar to columns with title specific to the column type.
also add column deletion button

Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-07 14:02:33 -04:00
kernelkind
57069ff7c0 push column picker immediately to new column
instead of pushing to temporary column first

Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-01 12:51:14 -04:00
kernelkind
e2dd1b3298 remote sub new timeline
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-09-30 10:27:48 -04:00
Ken Sedgwick
a17b2dcb17 Untangle zoom when in TextEdit
Addresses ([#140])

I don't think the zoom code in handle_key_events was necessary because
gui zooming already appears to be handled by egui::gui_zoom.

Description of keybindings:
59d71831fd/crates/egui/src/gui_zoom.rs (L5-L26)

Zooming using the described keybindings works fine with a textedit
focused.

This PR removes the ContextAction::SetPixelsPerPoint aggressively;
maybe it should remain for other future uses?
2024-09-27 12:44:42 -07:00
kernelkind
2832def161 remove app from sidebar
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-09-24 16:52:58 -04:00
kernelkind
c66cf6a98c change side panel width to 64.0
matches figma design

Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-09-24 16:52:58 -04:00
kernelkind
fd75e93605 initial compose note view
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-09-24 16:52:58 -04:00
William Casarin
945ccde818 ui: hook up relay management view
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-16 17:15:07 -07:00
William Casarin
79a447239a cleanup: remove account switcher widget
we don't need this anymore

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-16 16:37:04 -07:00
William Casarin
52a7ed53ec accounts: use column nav for account management
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-16 16:36:38 -07:00
William Casarin
36c0971fd9 Flexible routing
Another massive refactor to change the way routing works. Now any
column can route anywhere.

Also things are generally just much better and more modular via the
new struct split borrowing technique.

I didn't even try to split this into smaller commits for my sanity.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-16 14:50:20 -07:00
kernelkind
dda7256f51 add LoginState to app
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-09-11 16:13:16 -07:00
kernelkind
ee0029268f add RoutableWidgetState conception
holds the routes for an arbitrary widget

Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-09-11 16:12:57 -07:00
kernelkind
52604e65c6 remove global popup conception
can be added later if we need it again

Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-09-11 16:11:10 -07:00
William Casarin
00091c5088 Switch to Columns
Also refactor damus app usage to only pass in things that we need in views.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-11 15:49:34 -07:00