Skip to content

feat: DrawerSection hook in SyncHooks, rendered in FolderDrawer - #76

Merged
MaxDac merged 2 commits into
mainfrom
feat/drawer-section
Nov 5, 2026
Merged

MaxDac merged 2 commits into
mainfrom
feat/drawer-section

Conversation

@MaxDac

@MaxDac MaxDac commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Part of the GitHub Issues integration; closes #74.

What

  • SyncHooks gets a generic hook with an empty default:
    @Composable fun ColumnScope.DrawerSection(navController: NavController) {}
    (app-shared/.../sync/SyncHooks.kt). NoSyncHooks does not override it, so Libre shows nothing.
  • FolderDrawer renders drawerSection() after the notes tree, inside the ModalDrawerSheet column. The tree's LazyColumn now has Modifier.weight(1f, fill = false) so it keeps its natural height (identical layout when the section is empty) and a long tree scrolls above the section instead of pushing it off screen.
  • BrowserScreen gets a trailing parameter drawerSection: @Composable ColumnScope.() -> Unit = {} (default: source compatible); MainActivity passes { with(container.syncHooks) { DrawerSection(navController) } }.
  • Tests: app-shared androidTest FolderDrawerSectionTest (default hook renders nothing; a fake hook renders in the drawer). Adds the ui-test-junit4 / ui-test-manifest test deps (already in the catalog) to :app-shared.

For the Pro session

Override in the SyncHooks implementation:

@Composable
override fun ColumnScope.DrawerSection(navController: NavController) { /* Issues accordion */ }

The change is additive (interface default method plus a defaulted parameter); no Pro source change is required to compile. FolderDrawer became internal (was private). No new runtime dependencies, nothing network-related; F-Droid build unaffected.

Verified locally

ktlintCheck detekt lintDebug testDebugUnitTest :app-shared:compileDebugAndroidTestKotlin :app:compileDebugKotlin pass. Instrumented tests were not run locally (no emulator); they run in CI.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@MaxDac
MaxDac merged commit 23e38fc into main Nov 5, 2026
13 checks passed
@MaxDac
MaxDac deleted the feat/drawer-section branch November 5, 2026 19:51
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.

Drawer hook: DrawerSection in SyncHooks, rendered in FolderDrawer

1 participant