feat: improve session method help UX#92
Merged
Merged
Conversation
Plus minor fixes and updates of docstrings
Add guide-style help text for two-photon session methods and render it as structured HTML in the help popup. Also add accelerator keys for queue, edit, restart, and help modes in the session task mode menu.
|
|
||
| [idx, functions] = regexp(functionContentStr, 'classdef.*?end', 'start', 'match'); | ||
| if isempty(idx) | ||
| [idx, functions] = regexp(functionContentStr, 'function.*?end', 'start', 'match'); |
|
|
||
| options = [obj.PresetOptions_, obj.CustomOptions_]; | ||
|
|
||
| if numel(options) == 1 |
| subStringA = strsplit(subStringB{1}, '='); % Split first part @ = | ||
|
|
||
| thisLineDivided = [subStringA, subStringB{2}]; | ||
| if numel(subStringB) == 1 |
| return | ||
| end | ||
| itemText = strjoin(listItemLines, " "); | ||
| htmlLines(end+1, 1) = "<li>" + formatInlineGuideText(itemText) + "</li>"; %#ok<AGROW> |
| if isstruct(value) | ||
| % Recurse into nested structs | ||
| nestedFlatStruct = flattenNestedStruct(value, fullName); | ||
| flatStruct = [flatStruct, nestedFlatStruct]; |
| end | ||
|
|
||
| % Add field to flatStruct | ||
| flatStruct(end + 1).name = fullName; |
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.
Fix #37
Summary
Context
Addresses #37 by making session method help more useful from the session task menu, and by making mode switching faster from the menu.