Refactor: rename variables and improve MetadataInitializationUI#71
Merged
ehennestad merged 31 commits intodevfrom Mar 17, 2026
Merged
Conversation
…folders to build session id from
- Extract combineFolderNamesFromPath and applyExtractionPattern as Static Hidden methods on DataLocationModel - Move getSubstringFromFolder to Static Hidden; remove unused obj param, replace dataLocationIndex with dataLocationName - MetadataInitializationUI.getFolderSubString and getCombinedFolderName now delegate to the model methods instead of duplicating logic Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…anged (name matches what the callback actually does) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…x with setStringSearchMode) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ive name) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Position (replace cryptic layout variables) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ield/StringDetectResultField (expand abbreviations, align with data field names) Also rename hInputEditbox/hComp → inputField (consistent, descriptive local variable name) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…abbreviation, conventional type-suffix ordering) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…what it holds) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ts/lastSequenceIndex in simplifyIndices Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…bbreviation) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…and abbreviations) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…mIndex/rowNumber/dataLocationIndex/folderPath/arrowIndicator (expand abbreviations) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Spell out completely
Fixed code issues removed stale code
…dataInitializationUI Unifies three inconsistent naming variants for the same UI concept. Model field names (StringDetectMode, StringDetectInput) preserved for backward compatibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…I to DataLocationModel Adds DataLocationModel.getDefaultSubfolderLevelForVariable() as a public static method, encoding the mapping between metadata variable names and subfolder types. Removes the private initFolderSelectionItemIndex() from MetadataInitializationUI and updates the call site to use the model method, passing variableName from metadataDefinitions instead of reading from a UI control label. Also fixes a latent bug where find(isMatched) without a limit returned multiple indices when duplicate subfolder types existed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update docstring Fix bug with uninitialized boolean
Fixed static method calls
DataLocationModel.getSubstringFromFolder now throws a typed error (NANSEN:DataLocationModel:FunctionNotFound) instead of propagating the raw MATLAB:UndefinedFunction when a func-mode extraction function is missing. MetadataInitializationUI catches this error in getFolderSubstring and delegates to a new private alertFunctionNotFound method, which also replaces the inline alert in onRunFunctionButtonClicked. The alert now includes the variable name (e.g. "Subject ID") for clearer user feedback. Also fixes an uninitialized functionExists variable in onRunFunctionButtonClicked. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…or showing modal alerts - applyExtractionPattern now throws meaningful errors (InvalidIndexPattern, IndexOutOfRange, InvalidRegexPattern) instead of silently returning '' - Add refreshStringResult for passive/programmatic updates: errors shown inline in the result field (no modal alert) - Passive callers in onModelSet and onDataLocationModified now use refreshStringResult instead of onStringInputValueChanged, avoiding spurious IsDirty=true and out-of-context uialert popups - User-driven callbacks (onStringInputValueChanged and updateStringResult call sites) retain uialert behaviour Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Call updateFolderSelectorButtonText after shifting folder selector controls so the FolderMultiSelector button displays the correct text based on its UserData (FolderItems and SelectedIndices). This ensures the UI label stays in sync after layout changes.
Test Results112 tests 112 ✅ 14s ⏱️ Results for commit d47c1db. |
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.
Summary
dlIdx→dataLocationIndex,strInd→inputValue,hBtnGroup→buttonGroup)MetadataInitializationUIintoDataLocationModelFolderMultiSelectorbutton with truncated label and tooltipFolderMultiSelectorbutton text when button width changes (e.g. toggling advanced view)Test plan
FolderMultiSelectorlabel truncates correctly at the new width🤖 Generated with Claude Code