Skip to content

Conversation

@Ercalvez
Copy link
Contributor

I've migrated the following widgets to Jetpack Compose:

  • StepCountForm
  • BikeParkingCapacityForm

I've added Preview for these two Forms.

Let me know if there is any other count input I forgot to migrate to Compose.

Copy link
Member

@westnordost westnordost left a comment

Choose a reason for hiding this comment

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

Very nice!

There's furthermore with the identical UI (with each different icon):

  • Charging station capacity
  • Motorcycle parking capacity

# Conflicts:
#	app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_parking_capacity/BikeParkingCapacityForm.kt
#	app/src/androidMain/kotlin/de/westnordost/streetcomplete/ui/common/CountInput.kt
#	app/src/androidMain/res/layout/compose_view.xml
#	app/src/androidMain/res/layout/quest_step_count.xml
@westnordost
Copy link
Member

westnordost commented May 27, 2025

So, seems almost done, only

Charging station capacity
Motorcycle parking capacity

are missing.

@westnordost westnordost moved this to In Progress in iOS Port May 27, 2025
@Ercalvez
Copy link
Contributor Author

So, seems almost done, only

Charging station capacity

Motorcycle parking capacity

are missing.

They are done now

Copy link
Member

@westnordost westnordost left a comment

Choose a reason for hiding this comment

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

I like how it is now less lines of code than before. :-)

I fixed some things:

  • Dark mode was wrong (missing surface, missing application of app theme)
  • also, it just crashed when trying to open the form. It would be good if you tested your work before requesting a review.
  • public @Composables should always have a Modifier as parameter
  • Naming convention for Abstract quest forms is to have that start with (another) A
  • parametrized the text style
  • after all, I defined a new text style to better describe what it should be used for (-> input fields that are alone in the quest forms, i.e. the only input field. So, they can be very very large)
  • finally, what really bugged me during final test, was, that the input fields all started out with a pre-filled "0". So, to input a number, one would think one needs to first delete the 0, then add the number. But this doesn't even work, as the input only accepted ints, not even an empty string. So I changed that. Empty string is fine, too (but doesn't count as "form is filled in")

@westnordost
Copy link
Member

From my side, this could be merged. Would you like to have another look at the changes I made before I merge it?

@Ercalvez
Copy link
Contributor Author

Yes, I've looked it up and it seems fairly complete now! For testing, the emulator was extremely laggy and I couldn't manage to open a quest. Do you use any settings to improve emulation performance?

@westnordost
Copy link
Member

Yeah, that's a MapLibre problem. The map is super laggy, but you should be able to open the menu -> settings -> show quest forms. No need to deal with the map.

@westnordost
Copy link
Member

Also, what might help is to set to Graphics Acceleration -> Hardware in the Additional Settings tag when you edit the emulated device.

@westnordost westnordost merged commit 1136315 into streetcomplete:master May 31, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done (unreleased) in iOS Port May 31, 2025
@westnordost westnordost moved this from Done (unreleased) to Released in iOS Port Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

3 participants