Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: render profile pics in column headers #539

Merged
merged 8 commits into from
Dec 5, 2024
Merged

ui: render profile pics in column headers #539

merged 8 commits into from
Dec 5, 2024

Conversation

jb55
Copy link
Contributor

@jb55 jb55 commented Dec 4, 2024

Render profile pics in column headers!

better-nav.mp4

@jb55 jb55 force-pushed the profile-header branch 2 times, most recently from c1f2547 to 2ae023b Compare December 5, 2024 00:07
@jb55 jb55 changed the title feat: update nav to use custom title renderer via trait ui: render profile pics in column headers Dec 5, 2024
@jb55 jb55 linked an issue Dec 5, 2024 that may be closed by this pull request
@jb55
Copy link
Contributor Author

jb55 commented Dec 5, 2024

The hardcoded positioning in the header is making it hard to change, was there a reason you did that @kernelkind ?

@jb55 jb55 force-pushed the profile-header branch 2 times, most recently from 9bd13c9 to 3909fb8 Compare December 5, 2024 18:48
jb55 added 4 commits December 5, 2024 10:57
This is a much cleaner animation

Signed-off-by: William Casarin <[email protected]>
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 <[email protected]>
This uses less allocations, and once we switch to profile pictures in
the header the old way won't be needed

Signed-off-by: William Casarin <[email protected]>
even though we will replace this soon, it is still technically
more correct than Timeline(1), etc
jb55 added 2 commits December 5, 2024 12:51
We also switch away from manual layout to centered cross-alignment.

Changelog-Changed: Show profile pictures in column headers
Fixes: #12
Signed-off-by: William Casarin <[email protected]>
Show back label, switch back to chevron design

Signed-off-by: William Casarin <[email protected]>
@jb55 jb55 linked an issue Dec 5, 2024 that may be closed by this pull request
This is pretty confusing otherwise

Changelog-Changed: Only show column delete button when not navigating
Fixes: #548
Signed-off-by: William Casarin <[email protected]>
Also right align profile pics when navigating

Signed-off-by: William Casarin <[email protected]>
@jb55 jb55 marked this pull request as ready for review December 5, 2024 22:08
@jb55 jb55 merged commit cea433f into master Dec 5, 2024
7 checks passed
@jb55
Copy link
Contributor Author

jb55 commented Dec 6, 2024

The hardcoded positioning in the header is making it hard to change, was there a reason you did that @kernelkind ?

switched everything over to using centered CrossAlignment egui layout instead of fixed positioning. Everything in the title should be center aligned by default now using a child ui

you can see this here:

8444047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only show delete button when not navigating Profile pictures in column header
1 participant