Skip to content

Commit

Permalink
Update feature documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ctjdr committed Jan 28, 2024
1 parent 6913e20 commit 51144fc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
20 changes: 12 additions & 8 deletions docs/features/bundle-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ nav_order: 20
Features provided by the extension that help you work with bundles:

- [Quick-open bundle](#quick-open-bundle)
- [Go to component implementation](#go-to-component-implementation)
- [Go to component implementation code lens](#go-to-component-implementation-code-lens)
- [Go to component definition (module file)](#go-to-component-definition-module-file)
- [Jump to manifest.json or README.md](#jump-to-manifestjson-or-readmemd)

## Quick-open bundle
Expand All @@ -27,16 +28,19 @@ The property `apprtbundles.bundles.reveal.goal.type` lets you select if
* the bundle folder is highlighted and expanded, or
* the manifest.json file of the bundle folder is highlighted, which obviously requires to expand the folder. :smirk:

## Go to component implementation
## Go to component implementation code lens

In `manifest.json` files, execute the *> Go to Definition* command on the name or `"impl"` property value of a component to open the corresponding implementation file.
This is equivalent to a <kbd>Ctrl</kbd>+<kbd>Click</kbd> or pressing <kbd>F12</kbd>.
In a bundle manifest, click the *> Go to implementation* code lens above the `name` property of a component to open the corresponding implementation file.

!["Go to Definition" for components](../images/feature_component_goto_declaration.gif)
![&quot;Go to implementation&quot; for components](../images/feature_component_goto_implementation.gif)

This works for components where the `"name"` or `"impl"` property matches the file name of a `.js` or `.ts` file inside the bundle folder.
But sometimes the component is mapped to another source file in the `module.js`.
In that case executing the command has no effect.
## Go to component definition (module file)

In a bundle manifest, <kbd>Ctrl</kbd>+<kbd>Click</kbd> the `name` or `impl` property value of a component to open the `module.js` or `.ts` file, where it is imported or exported.

This is equivalent to pressing <kbd>F12</kbd> or executing the *> Go to Definition* command.

![&quot;Go to Definition&quot; for components](../images/feature_component_goto_definition.gif)

## Jump to manifest.json or README.md

Expand Down
4 changes: 2 additions & 2 deletions docs/updates/v0.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Version 0.5 improves already existing features making them easier to use.

You will now see the "Go to implementation" code lens above the component name, which will take you to the the location inside the implementation file where the component is defined.

!["Go to implementation" for components](../images/feature_component_goto_implementation.gif)
![&quot;Go to implementation&quot; for components](../images/feature_component_goto_implementation.gif)

In previous versions you could already use <kbd>Ctrl</kbd>+<kbd>Click</kbd> (or hit <kbd>F12</kbd>, "Go to Definition") on a component `impl` property in the manifest to jump to its implementation file.
This was implemented based on guessing the implementation file name from the information available in the manifest.
Expand All @@ -26,7 +26,7 @@ This is done by analyzing the `export`'s and `import`'s of the `module.{js,ts}`

Other than in previous releases, pressing <kbd>Ctrl</kbd>+<kbd>Click</kbd> (or hitting <kbd>F12</kbd>, "Go to Definition") will now take you to the `module.{js,ts}` file, where the component is exported or imported.

![&quot;Go to Definition&quot; for components](../images/feature_component_goto_declaration-2.gif)
![&quot;Go to Definition&quot; for components](../images/feature_component_goto_definition.gif)

## Go to bundle keybinding

Expand Down

0 comments on commit 51144fc

Please sign in to comment.