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

Zoning UI cleanup 2 #179

Merged
merged 15 commits into from
Mar 11, 2025
Merged

Zoning UI cleanup 2 #179

merged 15 commits into from
Mar 11, 2025

Conversation

PeenScreeker
Copy link
Member

@PeenScreeker PeenScreeker commented Feb 5, 2025

Closes:
momentum-mod/game/issues/2122
momentum-mod/game/issues/2225

This PR changes the UX around point placement while zoning and updates the UI accordingly. The region menu has been updated to remove tabs for points, properties, and teleport.

  • Edit points in world space
  • Click a corner to reposition it
  • Click an edge midpoint to insert a corner
  • Press backspace or delete to remove the last corner
  • Change corner mode with middle click
  • Creating zones now requires fewer clicks

Checks

  • I have thoroughly tested all of the code I have modified/added/removed to ensure something else did not break
  • I have followed semantic commit messages e.g. feat: Add foo, chore: Update bar, etc...
  • My branch has a clear history of changes that can be easy to follow when being reviewed commit-by-commit
  • My branch is functionally complete; the only changes to be done will be those potentially requested in code review
  • All changes requested in review have been fixuped into my original commits.
  • Fully tokenized all my strings (no hardcoded English strings!!) and supplied bulk JSON strings below

@PeenScreeker PeenScreeker self-assigned this Feb 5, 2025
Copy link
Member

@tsa96 tsa96 left a comment

Choose a reason for hiding this comment

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

I know this is still a draft but figured I'd have a quick skim over this. If you're having issues with null/undefined stuff I'd be happy to go over best practices more, they can be a real bastard to work with.

Could also enable TS strict mode specifically for this file, which will yell at you like crazy at first, but once you fix all the strict null check issues it can make getting null-checking
right much easier.

@PeenScreeker PeenScreeker force-pushed the feat/zoning-ui-cleanup-2 branch 3 times, most recently from 1948641 to e62df75 Compare March 1, 2025 18:57
@tsa96 tsa96 force-pushed the feat/zoning-ui-cleanup-2 branch from e62df75 to 3faf905 Compare March 1, 2025 19:03
@Panzerhandschuh
Copy link
Member

Panzerhandschuh commented Mar 8, 2025

You should reduce the right padding on the TextEntry's. I think the css class is zoning__textentry.
image

@PeenScreeker PeenScreeker force-pushed the feat/zoning-ui-cleanup-2 branch from 4e2102a to a951ffa Compare March 8, 2025 04:26
@PeenScreeker PeenScreeker marked this pull request as ready for review March 8, 2025 04:26
@PeenScreeker PeenScreeker force-pushed the feat/zoning-ui-cleanup-2 branch 2 times, most recently from 681bd34 to e842ebe Compare March 8, 2025 04:44
@PeenScreeker PeenScreeker force-pushed the feat/zoning-ui-cleanup-2 branch 2 times, most recently from c3cfae8 to d5e6ef2 Compare March 8, 2025 05:35
@PeenScreeker PeenScreeker force-pushed the feat/zoning-ui-cleanup-2 branch from d5e6ef2 to 4b87e68 Compare March 8, 2025 13:45
@PeenScreeker PeenScreeker force-pushed the feat/zoning-ui-cleanup-2 branch 2 times, most recently from 8f81b35 to ebaab78 Compare March 8, 2025 21:41
Copy link
Member

@Panzerhandschuh Panzerhandschuh left a comment

Choose a reason for hiding this comment

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

I haven't reviewed all of the code but this looks fine in game.

@PeenScreeker PeenScreeker requested a review from tsa96 March 10, 2025 20:01
@PeenScreeker PeenScreeker force-pushed the feat/zoning-ui-cleanup-2 branch from 078e0f0 to babf3c4 Compare March 10, 2025 23:12
@tsa96 tsa96 merged commit a04293f into feat/mom-0.10 Mar 11, 2025
1 check passed
@tsa96 tsa96 deleted the feat/zoning-ui-cleanup-2 branch March 11, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants