Skip to content

Commit c2986af

Browse files
committed
Fix navigation of spec
1 parent 8e1fed4 commit c2986af

File tree

6 files changed

+301
-187
lines changed

6 files changed

+301
-187
lines changed

packages/host/app/components/operator-mode/code-submode.gts

+4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import type { FileView } from '@cardstack/host/services/operator-mode-state-serv
6363
import type OperatorModeStateService from '@cardstack/host/services/operator-mode-state-service';
6464
import type RealmService from '@cardstack/host/services/realm';
6565
import type RecentFilesService from '@cardstack/host/services/recent-files-service';
66+
import type SpecPanelService from '@cardstack/host/services/spec-panel-service';
6667

6768
import type { CardDef, Format } from 'https://cardstack.com/base/card-api';
6869
import { type SpecType } from 'https://cardstack.com/base/spec';
@@ -154,6 +155,7 @@ export default class CodeSubmode extends Component<Signature> {
154155
@service private declare environmentService: EnvironmentService;
155156
@service private declare realm: RealmService;
156157
@service private declare loaderService: LoaderService;
158+
@service private declare specPanelService: SpecPanelService;
157159

158160
@tracked private loadFileError: string | null = null;
159161
@tracked private userHasDismissedURLError = false;
@@ -530,6 +532,7 @@ export default class CodeSubmode extends Component<Signature> {
530532
fieldName,
531533
onLocalSelection: this.updateCursorByName,
532534
});
535+
this.specPanelService.setSelection(null);
533536
}
534537

535538
private loadScopedCSS = restartableTask(async () => {
@@ -1034,6 +1037,7 @@ export default class CodeSubmode extends Component<Signature> {
10341037
{{#if this.showSpecPreview}}
10351038
<SpecPreview
10361039
@selectedDeclaration={{this.selectedDeclaration}}
1040+
@isLoadingNewModule={{this.moduleContentsResource.isLoadingNewModule}}
10371041
@onPlaygroundAccordionToggle={{fn
10381042
this.selectAccordionItem
10391043
'playground'

0 commit comments

Comments
 (0)