Android: Configuration Tab #272
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The configuration tab became really full and too long to handle for larger files.
Can you split up the different types (like Dimension, Tag, FileType, Command) into tabs in the Configuration screen?
And while you're at it, can you sort the Tags alphabetically, and add a scroll bar with the name (like with the title on the stream screen)?
Plan
Android only (
android/app). The core and the bindings are not touched: the screen already gets everything it needs fromConfigOutline.Decisions (clarified)
PrimaryScrollableTabRowand aHorizontalPager, the same pattern asStateListScreen(StateList.kt).Tags 3) so you can see where the hits are.FastScroller, and its label is the name of the first visible entry. Dimensions and commands keep the order of the file.1. Pure logic:
ui/ConfigList.ktconfigSections(outline, query): sorttagsandfileTypeswithcompareBy(String.CASE_INSENSITIVE_ORDER) { it.name }.thenBy { it.name }, and fix its KDoc ("each part in the order of the file" no longer holds for these two).enum class ConfigTab { DIMENSIONS, TAGS, FILE_TYPES, COMMANDS, GENERAL }andConfigSections.count(tab), which gives the number of matches per tab. General counts 1 when there is no query and 0 when there is one, because the general settings are not searchable today.entryLabel(...), a pure helper for the scroller: the name of the entry at a lazy-list index, given how many leading rows come before it (header, unplaced chips). It is written likedayAtinFastScroll.kt. For the File types tab the label is_name.ConfigListTest.kt:apple,Banana,cherry) and dimensions and commands keep their order;entryLabelgives the right name at an index, including indices on the leading rows.2. Screen:
ui/Config.ktConfigContentkeeps the app bar (pin, edit as text, search) and theSearchField. Below them come the issues banner, which stays above the tabs for all tabs, then the tab row and the pager. The unreadable case (outline == null) andConfigured.Failedstill show only the banner, without tabs.rememberSaveableinConfigScreenand pass it intoConfigContentastab/onTab. The content stays free of effects so the screenshot tests can render it. The pager syncs with the tab row the same way as inStateList.kt.LazyColumn:Sectionheader and its add button. The Commands page keeps the dropdown of command types, and the General page has no add button.OutlinedCard, and the scroller needs one row per entry. Keep the card look by giving each row the shape of its place in the group (top corners on the first row, bottom corners on the last, dividers in between). Alternatively, drop the card on these pages and use plainListItems with dividers. Pick whichever looks right in the screenshots.FlowRowofTagChips) move to the top of the Tags page, shown only when there is no query.config_no_matchtext.FastScroller(state, label = { entryLabel(...) })sits over the list in aBox, as inStream.kt.res/values/strings.xml. Reuseconfig_dimensions,config_tags,config_file_types,config_commandsandconfig_generalwhere they fit.3. Screenshot tests:
screenshotTest/.../ConfigScreenshots.ktConfigScreenshotbecomes one scene per tab:ConfigDimensionsTabScreenshot,ConfigTagsTabScreenshot(with unplaced tags),ConfigFileTypesTabScreenshot,ConfigCommandsTabScreenshotandConfigGeneralTabScreenshot. Also addConfigSearchScreenshot, which shows the counts in the tab row. KeepConfigUnreadableScreenshot.updateDebugScreenshotTest, look at every changed image and commit them. Delete the old reference ofConfigScreenshot.4. Docs
AGENTS.md: update theConfig.ktandConfigList.ktentries in the Android section (tabs, sorted tags and file types,FastScrollernow also used by the configuration,ConfigTab,entryLabel). Update theFastScroller.ktline ("the Stream tab uses it"), and the screenshot list if needed.README.md: in the app section on the configuration screen, describe the tabs, the sorting and the scroller.REQUIREMENTS.md: update the requirement of the app's configuration screen (R35, its sub-item on the configuration list) to match.Verification
nix build .#streamd-app, which runs the unit tests andvalidateDebugScreenshotTest.nix flake check. Nothing outsideandroid/changes, but per AGENTS.md this runs anyway.feat(android): …for the code and screenshots,docs: …for the docs.Implementation note
Implemented in PR #273 (branch
272_config-tabs).nix flake check.Findings
OutlinedCardper section was replaced. Each entry is now its own row, grouped by shape: rounded at the ends of a group and slightly rounded between rows. In the screenshots this looks clean in light and dark.entryLabeltreats the header row (which holds the unplaced tags on the Tags tab) as a single leading row, so the label stays correct whether or not the unplaced tags are shown.entry:<name>). Without this, a tag namedheaderornothingwould clash with the keys of the header or the empty-search row.ConfigUnreadableScreenshotchanged slightly because the banner is now padded on its own instead of sitting inside the list.nix build .#streamd-app(unit tests and screenshot validation) andnix flake check; both pass.