Fix #7442: REST collections, ResourceEditor, Clear response#88
Merged
Conversation
Collections sidebar (issue #7442): - Add a top-level "Create" button to create a new collection (copying the active tab). - Save now resolves the snippet by tab.historyId ?? tab.id, then binds the editor tab to that snippet so subsequent edits update the same sidebar entry instead of creating a new one. - Rename via the row menu: defer startRenaming via setTimeout(0) so the dropdown finishes closing before focus moves into the input; stopPropagation on the menu item click; force-expand folders before rename so the children stay visible during editing. - Rename input: onBlur commits non-empty values via tree.completeRenaming and reverts empty input via tree.abortRenaming instead of always aborting. - Restore TreeView remount on data update so saved edits (e.g. method change) are reflected immediately; carry collapsed folder ids over to the new title on folder rename so closed folders stay closed. ResourceEditor: - Propagate resourceType down to HSComp.CodeEditor as resourceTypeHint through EditTabContent and EditorTab so the FHIR validator can resolve the StructureDefinition and stops marking valid properties (e.g. nested extension) as "Unknown property". REST response pane: - Add a Clear response button (X) that deletes the stored response for the current tab; pane falls back to the empty "No response yet" state.
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.
Addresses items from HealthSamurai/sansara#7442.
Summary
Collections sidebar
tab.historyId ?? tab.idand binds the editor tab to the snippet id, so subsequent edits update the existing sidebar entry (the sidebar method/path now updates after Save, no more orphaned duplicates).startRenaming(the dropdown no longer steals focus and aborts the rename); folders are force-expanded before rename so children stay visible;stopPropagationon the menu item click.onBlurcommits non-empty values viatree.completeRenaming()and reverts empty input viatree.abortRenaming()(instead of always aborting on click-outside).ResourceEditor
resourceTypetoHSComp.CodeEditorasresourceTypeHintthroughEditTabContent→EditorTab. FHIR validator now resolves the StructureDefinition correctly and stops marking valid properties (e.g. nestedextension) as "Unknown property".REST response panel
Out of scope
total") — to be addressed separately.Test plan
extensionnested inside a backbone (e.g.identifier[].extension) → no "Unknown property" diagnostic.