-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Quickstart Apps with New Init flow #46
Conversation
added Kotlin support - ran locally and app still works after changes. |
Updated to include Android Java and Rust |
…it breaks Javascript which reads in the file and assumes Ditto is the prefix for all environment values
Update: I've updated the Swift and Sample file because Javascript needs the prefix DITTO in front of all values in the env file in order to read them. This will make all values in the .env file consistent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small nits.
...oid-kotlin/QuickStartTasks/app/src/main/java/live/ditto/quickstart/tasks/TasksApplication.kt
Outdated
Show resolved
Hide resolved
...oid-kotlin/QuickStartTasks/app/src/main/java/live/ditto/quickstart/tasks/TasksApplication.kt
Outdated
Show resolved
Hide resolved
…ickstart/tasks/TasksApplication.kt Co-authored-by: Skyler Jokiel <skjokiel@microsoft.com>
Co-authored-by: Skyler Jokiel <skjokiel@microsoft.com>
Co-authored-by: Skyler Jokiel <skjokiel@microsoft.com>
Co-authored-by: Skyler Jokiel <skjokiel@microsoft.com>
Cleaned up. |
Updated .NET to 4.10 and customUrl |
Updated Android CPP and CPP Tui. |
This is now ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't try building anything, but I did a visual check of the following quickstarts and they all look good to me ✅
- android-java
- flutter_app
- javscript-tui
- javascript-web
- react-native
- rust-tui
I'd recommend somebody else check on the others:
- android-cpp
- android-kotlin
- cpp-tui
- dotnet-maui
- dotnet-tui
- swift
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Added some nits.
Co-authored-by: Skyler Jokiel <skjokiel@microsoft.com>
All comments were resolved - comments were added to explain disabling cloud sync. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made comments about a couple of nits, but didn't see anything that should prevent merging.
For the C++ code, I've been using clang-format
to provide consistent formatting for all the C++ files. There is a make format
target in each of the Makefiles
for C++ projects that will apply it. Arguably, clang-format
's default style is not easily readable for tutorial-style code, so maybe we could tweak the style for this repo, but I'd like to keep auto-formatting code in this repo if we can.
...oid-kotlin/QuickStartTasks/app/src/main/java/live/ditto/quickstart/tasks/TasksApplication.kt
Outdated
Show resolved
Hide resolved
const transportConfig = new TransportConfig(); | ||
transportConfig.connect.websocketURLs.push(websocketURL); | ||
transportConfig.setAllPeerToPeerEnabled(true); | ||
ditto.setTransportConfig(transportConfig); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this not using ditto.updateTransportConfig()
? This has some implications because TransportConfig
has different defaults than Ditto.transportConfig
and I thought our guidance had been to use updateTransportConfig()
in general. @skylerjokiel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, always use updateTransportConfig()
.
// Set the Ditto Websocket URL | ||
var config = DittoTransportConfig() | ||
config.connect.webSocketURLs.insert(Env.DITTO_WEBSOCKET_URL) | ||
|
||
// Enable all P2P transports | ||
config.enableAllPeerToPeer() | ||
ditto.transportConfig = config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As pointed out by @pvditto, this should be using updateTransportConfig()
:
// Set the Ditto Websocket URL | |
var config = DittoTransportConfig() | |
config.connect.webSocketURLs.insert(Env.DITTO_WEBSOCKET_URL) | |
// Enable all P2P transports | |
config.enableAllPeerToPeer() | |
ditto.transportConfig = config | |
// Add the Ditto Websocket URL | |
ditto.updateTransportConfig { transportConfig in | |
transportConfig.connect.webSocketURLs.insert(Env.DITTO_WEBSOCKET_URL) | |
} |
This more complex flow is required for our new Self-hosted model on the BP side.
Apps