Skip to content

Allow selecting of multiple maxweight signs#6589

Merged
westnordost merged 18 commits into
streetcomplete:masterfrom
paulklie:maxweight_4
Nov 14, 2025
Merged

Allow selecting of multiple maxweight signs#6589
westnordost merged 18 commits into
streetcomplete:masterfrom
paulklie:maxweight_4

Conversation

@paulklie

Copy link
Copy Markdown
Collaborator

fixes #5803

@westnordost

Copy link
Copy Markdown
Member

Could you add a video/screenshot? I think a openening-hours-form-like UI would make sense, with an 🗑️ icon button to the right, no? (After all, the sign is so big.)

Maybe, the signs themselves could also be made smaller (again). The current size is due to in Material Design / Compose, the content paddings of all text inputs are so huge. Not sure if that default can be changed (to zero content padding, after all, the sign is already content padding enough).

@westnordost

westnordost commented Oct 31, 2025

Copy link
Copy Markdown
Member

First steps in Compose, very nice! 👍

Note that Compose suffers somewhat from that it is very easy to over-indent the code. To mitigate this, one needs to deliberately think about what composables should go into a new composable function. For specific composables that shouldn't be public, well, they can be private in that file.

Anyway, the structure should be the following:

  • MaxWeightForm should be the topmost composable, containing a column of MaxWeightSignForms each with a delete-button in its row and an add-new-sign-button at the bottom(?)
  • the (old) AddMaxWeightForm should do little more than to call MaxWeightForm, like it is now. Remember that AddMaxWeightForm is going away in the mid term

@paulklie

paulklie commented Nov 2, 2025

Copy link
Copy Markdown
Collaborator Author

Very much wip for now
image

@paulklie

paulklie commented Nov 2, 2025

Copy link
Copy Markdown
Collaborator Author

Could you add a video/screenshot? I think a openening-hours-form-like UI would make sense, with an 🗑️ icon button to the right, no? (After all, the sign is so big.)

I feel like having a list of potentially five, full sized signs would be very long. Though I guess such a case would be very rare.

@paulklie

paulklie commented Nov 5, 2025

Copy link
Copy Markdown
Collaborator Author

Some further work:
**
image
**

@paulklie paulklie marked this pull request as ready for review November 5, 2025 16:16
@paulklie paulklie requested a review from westnordost November 5, 2025 16:16
@paulklie

paulklie commented Nov 5, 2025

Copy link
Copy Markdown
Collaborator Author

US:
image

@westnordost

Copy link
Copy Markdown
Member

Screenshots look good! Although, maybe the signs really need to be made smaller again (by removing the content padding of the text fields, if possible).

Also, note my previous comment. I see you haven't changed anything in this regard.

@paulklie

paulklie commented Nov 6, 2025

Copy link
Copy Markdown
Collaborator Author

Also, note my previous comment. I see you haven't changed anything in this regard.

My bad, missread the similar file names, should be good now?

@paulklie

paulklie commented Nov 6, 2025

Copy link
Copy Markdown
Collaborator Author

(by removing the content padding of the text fields, if possible).

From my understanding that seems to be defined globaly (for all text fields) so this would modify many other forms.

However I also think that more than 2 signs is exceptionally rare, so its probably ok if this rare case would use a bit more space right? Might be better if the more common case (single sign) stays easily readable.

@westnordost

Copy link
Copy Markdown
Member

I can see you struggled with this one. On the other hand, it's your first dip into compose code. Anyway, there were too many things wrong with it, so I basically rewrote the whole thing. Would you kindly review the state the PR is in now?

@westnordost

Copy link
Copy Markdown
Member

From my understanding that seems to be defined globaly (for all text fields) so this would modify many other forms.

It's true, this is one of the reasons I created the TextField2 composable.

@westnordost

Copy link
Copy Markdown
Member

Anyway, it's good to merge from my point of view, but please have a look at the PR before that.

@paulklie

Copy link
Copy Markdown
Collaborator Author

LGTM, cannot approve my own PR

@westnordost westnordost merged commit 065e9cc into streetcomplete:master Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to select multiple weight limit signs

2 participants