Conversation
|
@bugaevc quick question, would this have any impact on hitting the fast path? FadeBin is HEIGHT_FOR_WIDTH unless there's a child, which then uses the child's mode. In statuses, there's always a child, the markupview. The rest is mainly setting the min (<=) and nat (vertical) sizes to 300. Allocation passes to the child. |
bugaevc
left a comment
There was a problem hiding this comment.
Done a quick review, will do a second round when you fix these 🙂
Layout wise, yes, this shouldn't break the fast paths.
I'd expect the fade/size to animate when expanded, like Gtk.Revealer does. Do you not want that?
|
Thanks for the reviews! If you conclude that this is not feasible in a performant way, I'm okay with dropping it. |
|
I do think it is both feasible and interesting, please keep going 🙂 |
Co-authored-by: Sergey Bugaev <[email protected]>
Co-authored-by: Sergey Bugaev <[email protected]>
It might be too much for very long posts but I'll see about it. If we go for it, I'd probably guess:
|
It's a lot more complex than that. Basically, you want to animate the height limit from |
👍 This PR is not done anyway, it was an initial implementation. I still need to add settings and polish the UI, strings etc. |
osd adds a lot of padding, maybe we should replace it
|
Here's a working sketch of the animation |
|
Thanks! Is there a specific reason on doing the animation manually instead of using AdwTimedAnimation? |
|
Ah, sure, feel free to use that. I was focusing on the implementation of measure & size allocate, not on everything else. |
Co-authored-by: Sergey Bugaev <[email protected]>
|
I don't think I skipped anything, but the main difference is that FadeBin's API needs a way to expand without animation for cases like users having collapsing long posts off and pre-expanding them when opening a thread, so there's the Screencast.From.2025-03-17.21-17-17.mp4 |
|
|
I see, cool 😄 |
I wonder if extreme edge cases will have any impact (100k+ character long posts) 🤔 Will test it out later. Thanks again for everything! 🙇 |
One of these days I'll make libgeopjr or something because it's a shame for all these custom widgets to not be used in other apps.
Anyway, faded view. Not sure if we should go forward with this but it's configurable enough to be able to auto-reveal with a setting or similar.
Screencast.From.2025-03-07.16-58-05.mp4
It could also come with a configurable max-height but for now it's a constant.