malliaridis commented on code in PR #4281:
URL: https://github.com/apache/solr/pull/4281#discussion_r3075321695
##########
solr/ui/src/commonMain/kotlin/org/apache/solr/ui/components/start/store/StartStoreProvider.kt:
##########
@@ -82,9 +81,7 @@ internal class StartStoreProvider(
when (intent) {
is Intent.UpdateSolrUrl ->
dispatch(Message.UrlUpdated(intent.url))
is Intent.Connect -> {
- var urlValue = state().url
- if (urlValue == "") urlValue = DEFAULT_SOLR_URL // use
placeholder value if empty
-
+ val urlValue = state().url
Review Comment:
If we consider not using the default URL as fallback on empty strings, we
should disable the connect button when the field is empty for better user
experience.
In my opinion it may be better to keep the placeholder logic like before,
and simply replace
```kotlin
if (urlValue == "") urlValue = DEFAULT_SOLR_URL
```
with
```kotlin
if (urlValue == "") urlValue = getDefaultUrl()
```
But feel free to choose whatever resolution you prefer, your changes are
also fine by me the way they are. :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]