Tuba
Tuba copied to clipboard
Compose button in direct messages
This is a draft implementation of the feature requested by #612. Some considerations:
- I'm not sure if adding another action is the most desirable way to achieve this, but it plays nicely with the existing codebase
- What button icon to use
- Not specifically related to this issue, but maybe add a scroll-to-top button to the messages tab in the future Of course, if this feature isn't thought to be necessary or make sense within Tuba at the moment, feel free to close this.
Thanks for this PR!
From a quick look the main concern is the floating button. It's a bit more complex than that:
- It has to play nice with the scroll to top button (on Home, the scroll to top button moves above it)
- On narrow mode (/ mobile), it has to disappear when scrolling down and re-appear when scrolling up, but not instantly, you have to scroll up a bit more (following android's behavior)
- On narrow mode it has to be visible when near the top
- It needs to be inside a revealer so there's an animation when it (dis)appears
- There needs to be an animation when the scroll to top button is also visible (https://github.com/GeopJr/Tuba/issues/548#issuecomment-1732684520)
Depending on how the discussion on #612 goes, ideally, the code from the Home view should move either to the Timeline view (visible in all timelines) or to a new FloatingButtonView so both Home and Conversations can inherit from it instead of having to duplicate the same complex logic for each one