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

Add home and end behavior to counting objects #64

Closed
8 tasks done
catherinecarter opened this issue Jan 14, 2025 · 7 comments
Closed
8 tasks done

Add home and end behavior to counting objects #64

catherinecarter opened this issue Jan 14, 2025 · 7 comments

Comments

@catherinecarter
Copy link

catherinecarter commented Jan 14, 2025

For each representation, add page-up, page-down,home, and end behavior. I'm not knowledgeable about whether the page up/down can move objects a different number of regular arrow clicks, so if that's not possible, we'll revisit.

Location-based

  • page-up: move in larger steps to the right the equivalent of 5 regular right arrow moves

  • page-down: move in larger steps to the left the equivalent of 5 regular left arrow moves

  • home

    • move an object from the right area to the left area, or
    • move an object already in the left area to the left edge
  • end

    • move an object from the left area to the right area, or
    • move an object already in the right area to the right edge

Beads

  • page-up: move the chosen bead in larger steps to the right the equivalent of 3 regular right arrow moves

  • page-down: move the chosen bead in larger steps to the left the equivalent of 3 regular left arrow moves

  • home

    • move the chosen blue bead all the way to the left side of the pink beads, if possible, I'm trying to think of what would make sense visually to the user, but this is merely a suggestion. If this is not possible or seems like strange behavior, maybe moving the chosen blue bead to the right-end of the pink beads would make more sense (?)
    • move the chosen pink bead to the left side of the pink group (or do nothing)
  • end

    • move the chosen pink bead all the way to the right side of the blue beads, if possible, or move the chosen pink bead to the left-end of the blue beads would make more sense (?)
    • move the chosen blue bead to the right side of the pink group (or do nothing)

Kittens

  • I need a thought partner on this one

Number Line

  • Looks like this is already complete
@catherinecarter
Copy link
Author

Adding additional asks for kittens and beads that I had forgotten about until @terracoda and I were walking through the sim.

Kittens

  • home and end can act as hotkeys to skip to the first and last kitten respectively. That way, if there are many kittens in the counting area, users don't have to tab up to 20 times.

Number Line

  • home and end are already implemented, so ✅
  • page up and page down could be "move in larger steps" like moving every 3 tick marks, but I feel like we talked about this but I am not remembering the full conversation. Did we?

marlitas added a commit that referenced this issue Feb 4, 2025
marlitas added a commit that referenced this issue Feb 4, 2025
@marlitas marlitas mentioned this issue Feb 5, 2025
3 tasks
@marlitas
Copy link
Contributor

marlitas commented Feb 5, 2025

@catherinecarter beads and location counting objects are done. A couple of notes:

  • I have not added in page up or page down behavior yet. I don't think we should add that to the beads and I wasn't sure if you wanted it to be consistent with the apples (this will also come into play when we create the keyboard help dialog later as well). I also wasn't sure if that note was made before or after keyboard dragging speed had been adjusted with the arrows. That may be where we want to start adjustments first and then use page up or page down if it still doesn't feel like enough.
  • The beads will do nothing if you hit home or end and they're already on the proper side.
  • The beads will move to the furthest inside position along the wire, and will also drag any beads along with it that may have been in front of it. This allows us to keep the "physics" of the beads consistent. You can't pass one over the other while dragging. Doing it differently might also get us into problems in the code.

Let me know what you think. I will look at the kittens and number line next!

@marlitas
Copy link
Contributor

marlitas commented Feb 7, 2025

Okay this is also done for kittens and number line. Over to @catherinecarter to review.

@marlitas marlitas removed their assignment Feb 7, 2025
@catherinecarter
Copy link
Author

catherinecarter commented Feb 7, 2025

Here are my initial thoughts the behavior.

Location-Based

  • The home and end feels strange (even though it's exactly what I described. Sometimes you don't know how it will look as described until it's implemented). Perhaps these changes would help the interaction feel less strange.

    • Remove the intermediate step where pressing home or end doesn't move the object to the left/right edge of the objects' current location. Instead:
    • Mirror the object's location when home or end is pressed so the object changes sides
      • If an object is on the left and home is pressed, do nothing
      • If an object is on the right and end is pressed, do nothing
  • I'd still like to explore page up and page down, or at least ideate about it to come up with consistent behavior on other representations

  • I noticed that with alt-input, the apples can be stacked (I know I didn't drop the apple in the video, but even when I did, the apples stayed stacked, see photo showing two apples). Image
Screen.Recording.2025-02-07.at.12.49.31.PM.mov

Beads (ugh, the beads!)

  • I am very happy that whatever bead you're on, even if it's in the middle, also drags the beads closest to the center dot to the other side. I agree that jumping over beads makes no sense.
  • I'm not sure the behavior is acting correctly. A video is below.
Screen.Recording.2025-02-07.at.11.02.59.AM.mov
  • After a few home and end presses, the sim freezes on me
  • I didn't capture the freezing in the video below, but it did capture the behavior of the left addend beads jumping to 'meet' the bead being moved. It would be amazing if the left addend beads already there would stay put and just the one being moved would jump to the other side (like the right addend beads do).
  • Also in the video below, at about the 19 second mark (the video is longer since I was trying to capture the freeze), I'm pressing and holding the right arrow. The movement is quite slow.
Screen.Recording.2025-02-07.at.12.42.02.PM.mov

Kittens and Number Line

  • Looks really good
  • I need to remember to put the home and end behavior in the keyboard help dialog for the kittens since there's no way to know what's happening when those keys are activated just by looking.

@marlitas
Copy link
Contributor

I noticed that with alt-input, the apples can be stacked (I know I didn't drop the apple in the video, but even when I did, the apples stayed stacked, see photo showing two apples).

Fixed above.

@marlitas
Copy link
Contributor

marlitas commented Feb 12, 2025

Location Counting Objects:

  • Home and End behavior has been updated.
  • I looked into page up and page down a bit more. The behavior you're requesting would be a significant lift. I would basically be rebuilding the keyboardDragListener which doesn't seem worth it. There are a couple of options we can discuss that are more feasible (and would be location representation specific unfortunately)
    • We can have the objects move to pre-determined grid spots. This would adjust both the horizontal and vertical axis. There are a number of ways this could manifest.
    • We can have the objects move quarter spaces across the counting area (left edge, center of left area, just left/right of center, center of right area, right edge)
    • Also open to other suggestions. Essentially our restriction is that keyboardDragListener does not give me access to what position it recommends during a key press. So for example, that means I can't calculate "3 right arrow keys" without doing all that math myself. Which at that point rebuilds the keyboardDragListener. I also would be curious as to why page up and page down weren't included in keyboardDragListener originally. That same situation may apply here as well. We're not really doing anything unique with that and the home and end buttons are acting more as hot keys.

Beads:

  • The bead recordings you provided look outdated and do not match with what I'm seeing locally.
  • There is a quirk that the left beads are jumping over to a bead that was just crossed past the separator. I don't know what's going on there, so I will open a new issue for it: Left Addend beads jump to moving bead #84

@marlitas
Copy link
Contributor

@catherinecarter and I talked through everything in this issue and we both feel like it's in a good spot to close. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants