Account list dropdown in drawer anchors to the bottom left roughly instead of directly below where it is located near the top #147

Closed
opened 2026-07-02 19:58:14 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-02 19:58:14 +00:00 (Migrated from github.com)

Context

AccountSwitcher in ui/mailbox/FolderDrawer.kt (~lines 121-157) renders a TextButton (the
trigger, showing the current account's email) and a DropdownMenu (~lines 141-156) as siblings
inside the drawer's outer Column — they are not wrapped together in their own Box. Compose
Material3's DropdownMenu is a Popup that anchors relative to the layout node it's composed
within; without a shared Box scoping it to the TextButton specifically, it ends up anchored to
the enclosing Column — the full-height drawer sheet — instead of the button itself. That matches
exactly what the ticket describes: the dropdown appears "at the bottom left roughly" instead of
directly below the account switcher near the top.

Scope

  • Wrap the TextButton and its DropdownMenu in AccountSwitcher (FolderDrawer.kt, ~lines
    121-157) in a shared Box, the standard Compose pattern for anchoring a DropdownMenu to a
    specific trigger rather than its whole parent.
  • Verify the dropdown now opens directly below the account-switcher row regardless of how many
    folders are listed below it or the drawer's scroll position.

Acceptance criteria

  • Tapping the account switcher opens the dropdown anchored immediately below/near the switcher
    row, not at the bottom of the drawer.
  • No change to the switcher's own appearance or the folder list below it.

Relevant files

  • ui/mailbox/FolderDrawer.kt (~lines 121-157).
## Context `AccountSwitcher` in `ui/mailbox/FolderDrawer.kt` (~lines 121-157) renders a `TextButton` (the trigger, showing the current account's email) and a `DropdownMenu` (~lines 141-156) as **siblings** inside the drawer's outer `Column` — they are not wrapped together in their own `Box`. Compose Material3's `DropdownMenu` is a `Popup` that anchors relative to the layout node it's composed within; without a shared `Box` scoping it to the `TextButton` specifically, it ends up anchored to the enclosing `Column` — the full-height drawer sheet — instead of the button itself. That matches exactly what the ticket describes: the dropdown appears "at the bottom left roughly" instead of directly below the account switcher near the top. ## Scope - [ ] Wrap the `TextButton` and its `DropdownMenu` in `AccountSwitcher` (`FolderDrawer.kt`, ~lines 121-157) in a shared `Box`, the standard Compose pattern for anchoring a `DropdownMenu` to a specific trigger rather than its whole parent. - [ ] Verify the dropdown now opens directly below the account-switcher row regardless of how many folders are listed below it or the drawer's scroll position. ## Acceptance criteria - Tapping the account switcher opens the dropdown anchored immediately below/near the switcher row, not at the bottom of the drawer. - No change to the switcher's own appearance or the folder list below it. ## Relevant files - `ui/mailbox/FolderDrawer.kt` (~lines 121-157).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#147