Repository navigation
Pre-select current item in go-to dialogs; add import/export for entry name presets - #108
Merged
Merged
Conversation
… name presets Go-to-entry/subproject dialogs (trello dMRzfaep): Re-key NavigatorListState selection off the action rather than search-bar focus. The dialogs auto-focus their search bar on open, so the old `hasFocus` branch always selected the first row and the "select current item" branch was dead. `updateSearch(selectFirst)` now selects the first result only while the user is actively typing, and the current entry/module on open and navigation, giving the requested pre-selection. Entry name presets import/export (trello UFNZv4zB): Add Import/Export icon buttons to the reusable string-list preference widget, gated by a new `importExportEnabled` flag enabled only for the entry name presets setting. Files are plain text, one item per line; import trims blanks and de-duplicates. Reuses the existing file-dialog + snackbar pattern. Add NavigatorListStateTest covering the pre-selection logic and new localized strings across all four languages. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements two TODO feature cards.
Pre-select current entry/subproject in the go-to dialogs
The Go to Entry and Go to Subproject dialogs share
NavigatorListState.updateSearch(), whose selection branched onhasFocus(focused → first row, else → current item). But these dialogs auto-focus their search bar on open, sohasFocuswas alreadytruewhen the list was first built — the "select current item" branch was dead and the dialogs always opened on the first item.Selection is now keyed off the action instead of focus:
onTextChange→selectFirst = true), so Enter still jumps to the top match;hasFocusis retained (it still drives the search-bar divider styling).Blast radius: the pinned in-editor entry list shares this code. The only behavioral change there is that the filter-toggle buttons keep the current entry highlighted instead of jumping to row 0 when the search bar happened to be focused — a minor improvement, not a navigation regression.
Import/export for entry name presets
Added Import (
FileDownload) / Export (FileUpload) icon buttons to the reusable string-list preference widget, gated by a newimportExportEnabledflag turned on only for the Entry name presets setting. Files are plain text, one item per line (\n-separated); import trims blanks and de-duplicates, export writes the list as-is. Reuses the existingSaveFileDialog/OpenFileDialog+ snackbar pattern.Note: import replaces the preset list (matching export round-trip and the existing config-import precedent) rather than appending.
Tests
New
ui/common/NavigatorListStateTest.ktcovers the pre-selection logic: current-on-open, current-even-when-focused (the regression), first-result-while-typing, and the filtered-out / empty-result cases. 8 new localized strings added across all four languages../gradlew jvmTestandktlintCheckpass.🤖 Generated with Claude Code