-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add keybind for cycling grid type #26303
Conversation
1.3k line diffstat moves this even lower on review priority list than it already was. Did everything here need to be in a single pull? |
Right I forgot to split it up to make review more palatable. |
What's with the history here? Please force-push that away because whatever that diffstat is, it's not worth 50 commits. If you chain PRs correctly the commits from previous PRs in the chain should go away when merging master into PRs later down the chain; and here it appears they didn't. So I'd rather this was fixed up, even if by squashing, because I don't want to see all that stuff in blame. |
I'm struggling with git here to fix this history |
I dunno what's going on with the new commits but this should be fixed by squashing down to a single commit. |
I somehow missed this test when splitting up PRs so here it is now
The "display mode" is easy to confuse with grid type, so I renamed it to literally the grid property it affects.
Ok its fixed |
I guess cycling is okay and saves on used hotkeys, but I'd bet the first thing we get asked for next is per-grid hotkeys rather than a cycle. Any thoughts on this? |
idk per-grid hotkeys seems overkill for something with 3 options because you're only ever at most 2 keypresses away from the grid type you want with cycling |
AddUntilStep("rectangular grid visible", () => this.ChildrenOfType<RectangularPositionSnapGrid>().Any()); | ||
gridActive<RectangularPositionSnapGrid>(true); | ||
|
||
nextGridTypeIs<TriangularPositionSnapGrid>(); |
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.
this generic test logic is shoddy. a failure results in invalid operation exception on a linq call. tests should fail on the asserts, not random link.
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've added an assert to explicitly assert the specific grid type. Now it should fail on the assert if it has the wrong grid type.
Not sure why inspectcode is quiet about this?
Requires:
Using the tool boxes on the right frequently is quite annoying, so I also added a keybind for cycling the grid type (H). I chose this key because its right next to the grid spacing cycle hotkey (G) and unused. It makes sense to group the grid property changing hotkeys physically close on the keyboard. An alternative hotkey could be like Shift+G or Shift+G, Ctrl+G is taken.
There's also a test for the grid placement tool in here which apparently got left behind when I was splitting up this PR into parts. I guess it can't hurt to have it so here it is.
2023-12-31.21-07-56.mp4