Skip to content
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 new module script to use geo-compose toolkit component #148

Merged
merged 10 commits into from
Dec 14, 2023

Conversation

prupani-7
Copy link

Description

PR to update the new module script to spin up new samples using the geo-compose toolkit module by default.

Links and Data

Sample Epic: runtime/kotlin/issues/3370

What To Review

  • Review script files

How to Test

  • Test if the JAR creates a new sample as expected.
  • To run the script and create a new sample:
    java -jar tools/NewModuleScript.jar
    The .jar file will prompt you to type in the name of the new sample.

@prupani-7 prupani-7 changed the title Pri/update new module script update new module script to use geo-compose toolkit component Dec 7, 2023
@shubham7109 shubham7109 self-requested a review December 7, 2023 22:40
@shubham7109 shubham7109 added the enhancement New feature or request label Dec 7, 2023
@prupani-7 prupani-7 changed the base branch from v.next to feature-branch/geo-compose December 7, 2023 23:06
Copy link
Collaborator

@shubham7109 shubham7109 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor change requests. The script runs well, and the sample works using geo-compose.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the new module created when the script is used, but I don't think it should require any sample changes. The DisplayComposableMapView sample should be a basic implementation of the DisplayMap sample, i.e. render a map with a basemap style.

The module script can spin up a sample with touch event implementation, but let's keep this sample similar to DisplayMap with the geo-compose module.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with this change. Although with the previous version of display-composable-mapview sample, we did have the touch event implementation in addition to displaying the map with a particular basemap style. Not sure if there was any particular intention of doing it that way back then? But I too feel it should be similar to the display map sample.

@@ -45,4 +45,7 @@ dependencies {
implementation "androidx.compose.ui:ui-tooling"
implementation "androidx.compose.ui:ui-tooling-preview"
implementation project(path: ':samples-lib')
// Toolkit dependencies
implementation(platform("com.esri:arcgis-maps-kotlin-toolkit-bom:200.3.0-1"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update this sample with the flag arcgisToolkitVersion and update the versions.gradle with the build tag of geo-compose:

Suggested change
implementation(platform("com.esri:arcgis-maps-kotlin-toolkit-bom:200.3.0-1"))
implementation(platform("com.esri:arcgis-maps-kotlin-toolkit-bom:$arcgisToolkitVersion"))

@prupani-7
Copy link
Author

@shubham7109 Thanks, please re-review?

Copy link
Collaborator

@shubham7109 shubham7109 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor change request, PR looks good 👍

…ample/displaycomposablemapview/MainActivity.kt

Co-authored-by: Shubham Sharma <shubhamsharma@esri.com>
@shubham7109
Copy link
Collaborator

Could you update the snippets tag in the metada.json here as well? I'll update the tasks to mention this step.

@shubham7109 shubham7109 changed the base branch from feature-branch/geo-compose to v.next December 13, 2023 22:00
@shubham7109 shubham7109 changed the base branch from v.next to feature-branch/geo-compose December 13, 2023 22:00
@puneet-pdx puneet-pdx self-requested a review December 13, 2023 23:44
@@ -2,7 +2,7 @@ ext {
// ArcGIS Maps SDK for Kotlin version
arcgisVersion = '200.3.0-4075'
// ArcGIS Maps SDK for Kotlin Toolkit version
arcgisToolkitVersion = '200.3.0-4075'
arcgisToolkitVersion = '200.3.0-1'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be 200.3.0 ?

Copy link
Author

@prupani-7 prupani-7 Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

200.3.0-1 is the published toolkit version where the geo-compose MapView is available
https://devtopia.esri.com/runtime/kotlin/issues/3358#issuecomment-4463774

* Wraps the MapView in a Composable function.
*/
@Composable
fun ComposeMapView(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this sample showcoordinatesinmultipleformats is still referring to this fun and has a compilation error because of this removal.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got falsely committed, reverted.

@@ -111,9 +110,6 @@ private void createFilesAndFolders() {

File composeComponentsDir = new File(packageDirectory + "/components");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be renamed to componentsDir ?

@prupani-7
Copy link
Author

prupani-7 commented Dec 14, 2023

@puneet-pdx There might be some merge issues, as Shubham recently merged main into the feature-branch/geo-compose. I will merge my branch with the latest feature-branch/geo-compose, which should resolve some errors.
[DONE]

@prupani-7 prupani-7 requested a review from puneet-pdx December 14, 2023 00:22
@prupani-7
Copy link
Author

prupani-7 commented Dec 14, 2023

@puneet-pdx thank you, a re-review?
Also note, I have updated version.gradle file with arcGISVersion changes, in this PR

Once this PR is merged, I will merge the subsequent PR's I have open with the feature branch.

@prupani-7 prupani-7 merged commit f19b6f6 into feature-branch/geo-compose Dec 14, 2023
1 check passed
@prupani-7 prupani-7 deleted the pri/updateNewModuleScript branch December 14, 2023 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants