Skip to content

Commit

Permalink
Remove "compose" from packages, paths and names
Browse files Browse the repository at this point in the history
  • Loading branch information
malliaridis committed Feb 4, 2025
1 parent b8be6c2 commit 23e53d2
Show file tree
Hide file tree
Showing 79 changed files with 205 additions and 205 deletions.
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ admin-ui:
- changed-files:
- any-glob-to-any-file:
- solr/webapp/**
- solr/compose-ui/**
- solr/ui/**

# Add 'prometheus-exporter' label
prometheus-exporter:
Expand Down
2 changes: 1 addition & 1 deletion dev-docs/ui/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ the documentation is covering the following topics for new and experienced devel
== Notes

All the references to files and directories in the UI documentation are from within
the `solr/compose-ui` module, if not otherwise stated.
the `solr/ui` module, if not otherwise stated.
6 changes: 3 additions & 3 deletions dev-docs/ui/module-structure.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

== Module Structure

The UI module `compose-ui` follows a quite simple structure. It is split in
The `ui` module follows a quite simple structure. It is split in

- *components*, which covers the logic part of the frontend and therefore contains
the interfaces and implementations of them,
Expand All @@ -14,7 +14,7 @@ if not the same, structure and files.

== Components (Logic)

The logical part of a simple component (`org/apache/solr/composeui/components`) usually consists of:
The logical part of a simple component (`org/apache/solr/ui/components`) usually consists of:

- **The component interface** (`[ComponentName]Component.kt`), that defines the UI state and the
interaction options,
Expand Down Expand Up @@ -48,7 +48,7 @@ This structure is strongly inspired by Decompose's https://arkivanov.github.io/D
== User Interface (UI)

Similar to the logical part, the UI classes are also separated in components under
`org.apache.solr.composeui.ui`.
`org.apache.solr.ui.views`.

Components may consist of one or multiple composables that make up a screen, section or
element. The composables may also be reused, which is why they may be moved at some point
Expand Down
24 changes: 12 additions & 12 deletions dev-docs/ui/testing-and-deployment.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ To launch the JVM client, you can use:

[source,bash]
----
./gradlew :solr:compose-ui:run
./gradlew :solr:ui:run
----

To run the app on the web, you can launch the web target with:

[source,bash]
----
# not recommended for the above reasons
./gradlew :solr:compose-ui:wasmJsBrowserRun
./gradlew :solr:ui:wasmJsBrowserRun
----

Build times may be a bit longer than with the standalone JVM build.

=== Integration Tests

The integration tests of the module focus on testing the implementation found in
`org.apache.solr.composeui.ui`. That includes all UI elements / composables. Integration tests
`org.apache.solr.ui.views`. That includes all UI elements / composables. Integration tests
may test entire flows as well, but require a suitable testing environment.

Since UI tests require a more complex and platform-specific testing environment, they are disabled
Expand All @@ -57,7 +57,7 @@ UI tests and a suitable testing environment for them, we may run these tests in

=== Unit Tests

Unit tests test the implementation found in `org.apache.solr.compose.components`. That package
Unit tests test the implementation found in `org.apache.solr.ui.components`. That package
includes the logical part of the new UI and does not have any constraints to the UI part.
Therefore, they can be executed in the automation pipelines easily.

Expand All @@ -66,28 +66,28 @@ components to confirm correct component state transitions with specific inputs.

== Deployment

The `compose-ui` module is configured to build artifacts for `WebAssembly` and `JVM`.
The `ui` module is configured to build artifacts for `WebAssembly` and `JVM`.

=== Packaging

The module `compose-ui` can be built and packaged for two targets (wasmJs / JVM) with two
The module `ui` can be built and packaged for two targets (wasmJs / JVM) with two
variants each, development and production.

To package the JVM target for development and generate a distribution (DEB, MSI or DMG file),
you can use:

[source,bash]
----
./gradlew :solr:compose-ui:packageDistributionForCurrentOS
./gradlew :solr:ui:packageDistributionForCurrentOS
----

The distribution can be found at `solr/compose-ui/build/compose/binaries/main/[deb|msi|dmg]/`.
The distribution can be found at `solr/ui/build/compose/binaries/main/[deb|msi|dmg]/`.

To build the JVM target for production, you can use:

[source,bash]
----
./gradlew :solr:compose-ui:packageReleaseDistributionForCurrentOS
./gradlew :solr:ui:packageReleaseDistributionForCurrentOS
----

Platform-specific gradle tasks exist as well, but you cannot build for a
Expand All @@ -98,10 +98,10 @@ If the client machine has Java installed, you can also generate an UberJar:
[source,bash]
----
# for development
./gradlew :solr:compose-ui:packageUberJarForCurrentOs
./gradlew :solr:ui:packageUberJarForCurrentOs
# for production
./gradlew :solr:compose-ui:packageReleaseUberJarForCurrentOs
./gradlew :solr:ui:packageReleaseUberJarForCurrentOs
----

When building the entire Solr project, the wasmJs target is included in the build artifacts.
Expand All @@ -116,7 +116,7 @@ To tell the build process to use the production variant instead, you have ot pas

The WebAssembly (wasmJs) target is used to generate artifacts that can be hosted together
with our current webapp. The `server` that hosts the webapp is configured to host the new UI
as a module that is available under the URL path `/solr/compose`.
as a module that is available under the URL path `/solr/ui`.

For that, two configuration files are added, one for development (`jetty-new-ui-dev.xml`) and
one for production (`jetty-new-ui.xml`). The module configuration for development is less strict,
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ include "solr:modules:s3-repository"
include "solr:modules:scripting"
include "solr:modules:sql"
include "solr:webapp"
include "solr:ui"
include "solr:benchmark"
include "solr:test-framework"
include "solr:solr-ref-guide"
Expand All @@ -67,7 +68,6 @@ include "solr:packaging"
include "solr:distribution"
include "solr:docker"
include "solr:prometheus-exporter"
include "solr:compose-ui"

// Configures development for joint Lucene/ Solr composite build.
apply from: file('gradle/lucene-dev/lucene-dev-repo-composite.gradle')
4 changes: 2 additions & 2 deletions solr/server/etc/jetty-new-ui-dev.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<!-- =============================================================== -->
<!-- Configure the Jetty Server to respond with different CSP header -->
<!-- for new Admin UI endpoint /compose/*. -->
<!-- for new Admin UI endpoint /solr/ui/*. -->
<!-- This configuration overrides jetty-new-ui.xml during -->
<!-- development and is excluded from released otherwise. -->
<!-- =============================================================== -->
Expand All @@ -30,7 +30,7 @@
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
<Set name="pattern">/solr/compose/*</Set>
<Set name="pattern">/solr/ui/*</Set>
<Set name="name">Content-Security-Policy</Set>
<Set name="value">default-src 'none'; base-uri 'none'; connect-src 'self'; form-action 'self'; font-src 'self'; frame-ancestors 'none'; img-src 'self' data:; media-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval'; worker-src 'self';</Set>
</New>
Expand Down
4 changes: 2 additions & 2 deletions solr/server/etc/jetty-new-ui-prod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<!-- =============================================================== -->
<!-- Configure the Jetty Server to respond with different CSP header -->
<!-- for new Admin UI endpoint /compose/*. -->
<!-- for new Admin UI endpoint /solr/ui/*. -->
<!-- This configuration is used for release builds and has a -->
<!-- stricter security configuration compared to development. -->
<!-- Note that this configuration does not work with development -->
Expand All @@ -17,7 +17,7 @@
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
<Set name="pattern">/solr/compose/*</Set>
<Set name="pattern">/solr/ui/*</Set>
<Set name="name">Content-Security-Policy</Set>
<Set name="value">default-src 'none'; base-uri 'none'; connect-src 'self'; form-action 'self'; font-src 'self'; frame-ancestors 'none'; img-src 'self' data:; media-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'wasm-unsafe-eval'; worker-src 'self';</Set>
</New>
Expand Down
4 changes: 2 additions & 2 deletions solr/compose-ui/README.md → solr/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The module is available for desktop / JVM targets and web (WebAssembly).
> reflect the module's configuration requirements. Review the differences between your file and
> `gradle/template.gradle.properties` and update accordingly.
To build and run the desktop client simply run `./gradlew :solr:compose-ui:run`.
To build and run the desktop client simply run `./gradlew :solr:ui:run`.

Make sure that you have a Solr development instance running on `localhost:8983`, as the current
implementation uses hardcoded values.
Expand All @@ -48,7 +48,7 @@ you can build the project as usual (see [Quickstart](../../README.md#quickstart)
Various references are included in the webapp for already migrated pages.

> Note that the standalone WebAssembly app executed via
> `./gradlew :solr:compose-ui:wasmJsBrowserRun` runs on port `8080` and will run
> `./gradlew :solr:ui:wasmJsBrowserRun` runs on port `8080` and will run
> into CORS exceptions. Therefore, the usage of it for development is
> discouraged.
>
Expand Down
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ configurations {

compose.desktop {
application {
mainClass = "org.apache.solr.composeui.MainKt"
mainClass = "org.apache.solr.ui.MainKt"

nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment
package org.apache.solr.ui.components.environment

import kotlinx.coroutines.flow.StateFlow
import org.apache.solr.composeui.components.environment.data.JavaProperty
import org.apache.solr.composeui.components.environment.data.JvmData
import org.apache.solr.composeui.components.environment.data.Versions
import org.apache.solr.ui.components.environment.data.JavaProperty
import org.apache.solr.ui.components.environment.data.JvmData
import org.apache.solr.ui.components.environment.data.Versions

/**
* Component interface that represents the environment section.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.data
package org.apache.solr.ui.components.environment.data

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.data
package org.apache.solr.ui.components.environment.data

/**
* Typealias of JavaProperty, which are simple key-value pairs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.data
package org.apache.solr.ui.components.environment.data

import kotlinx.serialization.Serializable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.data
package org.apache.solr.ui.components.environment.data

import kotlinx.serialization.Serializable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.data
package org.apache.solr.ui.components.environment.data

import kotlinx.serialization.Serializable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.data
package org.apache.solr.ui.components.environment.data

import kotlinx.serialization.Serializable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.data
package org.apache.solr.ui.components.environment.data

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.data
package org.apache.solr.ui.components.environment.data

import kotlinx.serialization.Serializable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.data
package org.apache.solr.ui.components.environment.data

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.data
package org.apache.solr.ui.components.environment.data

import kotlinx.serialization.Serializable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.data
package org.apache.solr.ui.components.environment.data

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.data
package org.apache.solr.ui.components.environment.data

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.integration
package org.apache.solr.ui.components.environment.integration

import com.arkivanov.mvikotlin.core.instancekeeper.getStore
import com.arkivanov.mvikotlin.core.store.StoreFactory
import com.arkivanov.mvikotlin.extensions.coroutines.stateFlow
import io.ktor.client.HttpClient
import kotlinx.coroutines.ExperimentalCoroutinesApi
import org.apache.solr.composeui.components.environment.EnvironmentComponent
import org.apache.solr.composeui.components.environment.store.EnvironmentStoreProvider
import org.apache.solr.composeui.utils.AppComponentContext
import org.apache.solr.composeui.utils.coroutineScope
import org.apache.solr.composeui.utils.map
import org.apache.solr.ui.components.environment.EnvironmentComponent
import org.apache.solr.ui.components.environment.store.EnvironmentStoreProvider
import org.apache.solr.ui.utils.AppComponentContext
import org.apache.solr.ui.utils.coroutineScope
import org.apache.solr.ui.utils.map

/**
* Default implementation of the [EnvironmentComponent].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
* limitations under the License.
*/

package org.apache.solr.composeui.components.environment.integration
package org.apache.solr.ui.components.environment.integration

import io.ktor.client.HttpClient
import io.ktor.client.call.body
import io.ktor.client.request.get
import io.ktor.http.isSuccess
import org.apache.solr.composeui.components.environment.data.JavaPropertiesResponse
import org.apache.solr.composeui.components.environment.data.JavaProperty
import org.apache.solr.composeui.components.environment.data.SystemData
import org.apache.solr.composeui.components.environment.store.EnvironmentStoreProvider
import org.apache.solr.ui.components.environment.data.JavaPropertiesResponse
import org.apache.solr.ui.components.environment.data.JavaProperty
import org.apache.solr.ui.components.environment.data.SystemData
import org.apache.solr.ui.components.environment.store.EnvironmentStoreProvider

/**
* Client implementation of the [EnvironmentStoreProvider.Client] that makes use
Expand Down
Loading

0 comments on commit 23e53d2

Please sign in to comment.