Skip to content

Commit 2add85b

Browse files
committed
Sync documentation of main branch
1 parent 1d3d2cb commit 2add85b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

_versions/main/guides/dev-ui.adoc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,21 @@ Dev UI uses https://lit.dev/[Lit] to make building these web components easier.
380380
- https://www.webcomponents.org/introduction[Web components Getting started]
381381
- https://lit.dev/docs/[Lit documentation]
382382

383+
Most of the JavaScript code in Dev UI is written using Lit, so look for the available operations in the Lit documentation. For instance, for each cycle can be done like this:
384+
385+
[source,javascript]
386+
----
387+
render() {
388+
return html`
389+
<ul>
390+
${this.colors.map((color) =>
391+
html`<li style="color: ${color}">${color}</li>`
392+
)}
393+
</ul>
394+
`;
395+
}
396+
----
397+
383398
===== Basic structure of a Web component page
384399

385400
A Web component page is just a JavaScript Class that creates a new HTML Element:
@@ -1028,6 +1043,23 @@ JsonRPCProvidersBuildItem createJokesJsonRPCService() {// <1>
10281043
<1> Produce or return a `JsonRPCProvidersBuildItem`
10291044
<2> Define the class in your runtime or runtime-dev module that will contain methods that make data available in the UI
10301045

1046+
If you are creating a new runtime-dev module, you must also add the conditional Dev dependency in
1047+
the *runtime* module `pom.xml`:
1048+
1049+
[source,xml]
1050+
----
1051+
<plugin>
1052+
<groupId>io.quarkus</groupId>
1053+
<artifactId>quarkus-extension-maven-plugin</artifactId>
1054+
<configuration>
1055+
<conditionalDevDependencies>
1056+
<artifact>${project.groupId}:${project.artifactId}-dev:${project.version}</artifact>
1057+
</conditionalDevDependencies>
1058+
...
1059+
</configuration>
1060+
</plugin>
1061+
----
1062+
10311063
==== JsonRPC against the Deployment classpath
10321064

10331065
In certain cases you might need to execute methods and/or get data against the deployment classpath. This also happens over JsonRPC communication, but in this case you do not create a JsonRPC Service in the runtime module,

0 commit comments

Comments
 (0)