Skip to content

Commit

Permalink
docs: add instructions to disable component tracker (#3095) (#3119)
Browse files Browse the repository at this point in the history
* docs: add instructions to disable component tracker

Part of vaadin/flow#18130

* Apply suggestions from code review



* apply review suggestions

* First pass at editing touched files.

* Second pass at editing touched files.

---------

Co-authored-by: Tarek Oraby <42799254+tarekoraby@users.noreply.github.com>
Co-authored-by: russelljtdyer <6652767+russelljtdyer@users.noreply.github.com>
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
  • Loading branch information
4 people committed Jan 12, 2024
1 parent d76aaa0 commit ebafbe9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
title: Component Locator
description: Use Component Locator to identify components in views and find their source code in your IDE.
description: Use Component Locator to identify components in views and find their source code in an IDE.
order: 1
---


= [since:com.vaadin:vaadin@V24]#Component Locator#

You can use the component locator to identify components and to find their code when running applications in <<../#,development mode>>. The component locator opens the corresponding source code in your IDE when you click a component (for example, a Button in a view).
You can use the component locator to identify components, and to find their code when running applications in <<../#,development mode>>. The component locator opens the corresponding source code in your IDE when you click a component (e.g., a Button in a view).


== Enabling Component Locator

Start by running your Vaadin application project in development mode. Click on the Vaadin symbol [guilabel]*}>* at the bottom right-hand corner of your browser window -- as indicated in the screenshot here.
Start by running your Vaadin Flow application project in development mode. Click on the Vaadin symbol [guilabel]*}>* at the bottom right-hand corner of your browser window -- as indicated in the screenshot here.

[.device]
image::/images/dev-tools-location.png[The Vaadin symbol location in development mode.]
Expand All @@ -25,7 +25,7 @@ image::/images/code-menu.png[The Code tab viewed in the Dev tools menu.]

== Using Component Locator

Now that the Component Locator has been enabled, you're ready to use it. To highlight a component in red and identify it, hover your pointer over one in the view. The component names appear in a list at the bottom right-hand corner of your browser window. You can use the arrow keys to navigate that list.
Now that the Component Locator has been enabled, it's ready to be used. To highlight a component in red and identify it, hover your pointer over one in the view. The component names appear in a list at the bottom right-hand corner of your browser window. You can use the arrow keys to navigate that list.

[.device]
image::/images/component-locator.png[Component Locator highlighting and identifying the Button component.]
Expand All @@ -39,3 +39,17 @@ image::/images/code-view.png[The Button component and corresponding source code.
[class^=PageHeader-module--descriptionContainer] {display: none;}
</style>
++++


[since:com.vaadin:vaadin@V24.4]
== Disable Component Tracking

Component tracking isn't an expensive operation, but it may at times be useful to disable it. Be aware that with component tracking disabled, the Component Locator tool cannot identify any components. To disable tracking, set the `vaadin.devmode.componentTracker.enabled` configuration parameter to `false`.
See <<{articles}/configuration/properties#,Configuration Properties>> for more information about setting configuration parameters.


++++
<style>
[class^=PageHeader-module--descriptionContainer] {display: none;}
</style>
++++
7 changes: 5 additions & 2 deletions articles/flow/configuration/properties.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ order: 10

= Configuration Properties

You can change the behavior of Vaadin applications by setting the configuration properties. You can use either system properties, or servlet initialization parameters to set them. See the <<properties,full list of properties>> for details.
You can change the behavior of Vaadin applications by setting the configuration properties. You can set them either through the system properties, or the servlet initialization parameters. See the <<properties,full list of properties>> for details.

See also the <<{articles}/flow/integrations/spring/configuration#, Spring-specific instructions>> for Spring-based applications.

Expand Down Expand Up @@ -96,7 +96,6 @@ When a system property and a servlet parameter have the same name, the system pr

The following table contains the properties that are defined in the [classname]`com.vaadin.server.DeploymentConfiguration` and [classname]`com.vaadin.server.Constants` classes. They're listed in alphabetical order. If you use Spring Boot, you should add the `vaadin.` prefix to them (e.g., change `brotli` to `vaadin.brotli`).


[cols="1,1,4"]
|===
|Property Name |Default Value |Description
Expand Down Expand Up @@ -125,6 +124,10 @@ The following table contains the properties that are defined in the [classname]`
|`false`
|Enables session serialization. When session serialization is enabled, [classname]`UI` instances and registered [classname]`StreamResource` instances are serialized or deserialized when restarting the development server. When set to `true`, for example, access control information can be preserved during development so that you don't need to log in for each change. This applies only to development mode.

|`devmode.componentTracker.enabled`
|`true`
|Enables the <<development-mode/dev-tools/component-locator#, Component Locator>> tracker utility. Set to `false` to disable. With it disabled, the Component Locator tool cannot identify any components. This applies only to development mode.

|`devmode.usageStatistics.enabled`
|`true`
|Enables Vaadin to collect usage statistics that can guide further development. Statistics are collected based on features that are used in the application. No data is collected in production mode. Some usage statistics are collected through the web browser. See the https://github.com/vaadin/vaadin-usage-statistics[client-side collector repository] for instructions on how to opt out. This applies only to development mode.
Expand Down

0 comments on commit ebafbe9

Please sign in to comment.