Commit Graph

40 Commits

Author SHA1 Message Date
William Casarin
32caaee642 Revert "introduce decks_cache"
This was causing a crash when switching accounts

This reverts commit 69e93b0ebf.
2024-12-09 09:05:05 -08:00
William Casarin
323d1bcd2c Migrate to egui v0.29.1
Not too many breaking changes. I updated egui-nav and egui-tabs as well.

Fixes: https://github.com/damus-io/notedeck/issues/315
Changelog-Fixed: Fixed crash when navigating in debug mode
Changelog-Changed: Migrated to egui v0.29.1
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-07 16:40:43 -08:00
kernelkind
69e93b0ebf introduce decks_cache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-12-06 10:46:20 -08:00
William Casarin
8444047aa6 column: switch to profile pictures in header
We also switch away from manual layout to centered cross-alignment.

Changelog-Changed: Show profile pictures in column headers
Fixes: https://github.com/damus-io/notedeck/issues/12
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-05 12:51:02 -08:00
William Casarin
713d9d7bb5 column: use simplified column string titles for now
even though we will replace this soon, it is still technically
more correct than Timeline(1), etc
2024-12-05 10:59:23 -08:00
William Casarin
be3edc02a4 nav: refactor title rendering for flexibility
Updated navigation to use a custom title renderer for more flexible
rendering of navigation titles. This change decouples the rendering
logic from predefined formats, enabling dynamic title compositions
based on application context and data.

This includes:
- Refactoring `NavResponse` to introduce `NotedeckNavResponse` for
  handling unified navigation response data.
- Adding `NavTitle` in `ui/column/header.rs` to handle rendering
  of navigation titles and profile images dynamically.
- Updating route and timeline logic to support new rendering pipeline.
- Replacing hardcoded title rendering with data-driven approaches.

Benefits:
- Simplifies navigation handling by consolidating title and action
  management.
- Improves scalability for new navigation features without modifying
  core logic.
- Enhances visual customization capabilities.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-05 10:58:59 -08:00
William Casarin
cf773a90fd anim: smoothly animate delete button from 0 size
This is a much cleaner animation

Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-05 10:57:21 -08:00
Ken Sedgwick
84838478b3 Skip muted content 2024-12-02 13:14:54 -08:00
kernelkind
b581501620 add missing light mode icons
Closes: #502
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-29 12:10:46 -08:00
kernelkind
d15aa65bd7 don't try to use other accounts to post
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-21 15:34:27 -05: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
22e67c95cc refactor: rename AccountsManager to Accounts
plz stop with the managers
2024-11-18 18:03:57 -08:00
William Casarin
6545e1ddee thread: ensure thread unknowns are handled 2024-11-18 17:28:55 -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
3fb78ae01e nav: use id_source instead of show argument
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 16:14:56 -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
kernelkind
529b76094c init external notifs column
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-02 22:18:23 -04:00
kernelkind
56dd88b3a2 initial column storage
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-30 13:40:31 -04:00
kernelkind
309477dca4 support view
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-25 15:23:35 -04:00
kernelkind
0a077ae797 fix unnecessary copy every frame
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-15 11:45:13 -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
8e6a982843 profile unsub
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-11 17:47:03 -04:00
kernelkind
ce3f24abcd add profile preview and implement scrolling
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-11 16:37:17 -04:00
kernelkind
44948fdff0 init profile routing
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-11 16:37:17 -04:00
kernelkind
a2fc754e1b updated back arrow
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-08 21:38:43 -04:00
kernelkind
0d994172a0 unsubscribe timeline on deletion
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-07 14:02:37 -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
kernelkind
731f206424 basic add column impl
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-09-30 10:27:48 -04:00
kernelkind
7d9a23c87d route back after clicking 'post' button
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-09-26 13:51:04 -07:00
William Casarin
7fe3d5e99f Merge side panel update #327
A few merge conflicts resolved, and changes the image to svg

kernelkind (7):
      initial compose note view
      change side panel width to 64.0
      Add AnimationHelper
      update sidebar to match new design
      remove app from sidebar
      remove profile_preview_controller
      add logo to side panel

Closes: https://github.com/damus-io/notedeck/pull/327
2024-09-26 13:21:11 -07:00
kernelkind
fd75e93605 initial compose note view
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-09-24 16:52:58 -04:00
William Casarin
fce82b2b6d nav: fix accounts nav animations
also make nav go backward when clicking the account switch button if we
already are navigating to accounts

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-16 16:54:29 -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