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

FAB / compose button blocks content at bottom of feeds. #590

Open
tinsukE opened this issue Apr 4, 2024 · 2 comments
Open

FAB / compose button blocks content at bottom of feeds. #590

tinsukE opened this issue Apr 4, 2024 · 2 comments

Comments

@tinsukE
Copy link
Contributor

tinsukE commented Apr 4, 2024

Describe the bug
When at the bottom of a feed, the FAB / compose button blocks the last item (content, actions, ...).

To Reproduce
Steps to reproduce the behavior:

  1. Go to a short feed on a screen with FAB / compose button (ex:"Trending Posts" when on MainActivity)
  2. Scroll down to the bottom of the feed
  3. See that the FAB / compose button is preventing the user to completely see and act on the last item

Expected behavior
At the end of such feeds, the user can scroll a bit further down than the content, just enough to have the last item end atop the FAB / compose button.

Screenshots or video

Current Expected

Versions

Pachli Current 2.4.0+38ba7b18

Device:

Google sdk_gphone_x86
Android version: 11
SDK level: 30

Account:

@nephilas@mastodon.social
Version: 4.3.0-nightly.2024-03-27

Affirmation
I have checked other issues for this project (open and closed) and I cannot find one that matches the problem I am reporting.

@tinsukE
Copy link
Contributor Author

tinsukE commented Apr 4, 2024

The "Expected" screenshot above was created by adding paddingBottom=Xdp and clipToPadding=false to the feed's RecyclerView and is the solution I'd go for.

Preferably, I'd like to have paddingBottom="@dimen/fabContentBottomPadding" and clipToPadding added to scrollable views alongside FloatingActionButtons, so it is clearer that one is there because of the other.

But the code situation is a bit different, ex: MainActivitys FloatingActionButton is defined in activity_main.xml and the scrollable views are defined inside many fragments, like fragment_timeline.xml. So the FAB and the padding added because of it would live in different places; and not all screens that show feeds have the FAB (ex: "Posts" in TrendingActivity), but if we add padding to fragment_timeline.xml, it would appear on those screens as well, even if it would be unnecessary.

Even with those drawbacks (related code split apart and adding padding to screens that don't need it), I think this would still be a good solution. Would you agree?

If so, I could work on a PR with that. And I might need a knowing eye to point out scrollable views I might miss.

@nikclayton
Copy link
Contributor

Good point.

Have you looked at moving the responsibility for the FAB to each fragment that needs one? I.e., including it in the fragment's layout, not MainActivity (and similar)?

Architecturally that's probably cleaner.

If you haven't got the time to experiment with that let me know and I'll take a crack at it.

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

No branches or pull requests

2 participants