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

Improve action UX and state storage #26

Merged
merged 5 commits into from
Sep 26, 2024
Merged

Improve action UX and state storage #26

merged 5 commits into from
Sep 26, 2024

Conversation

kflorence
Copy link
Owner

@kflorence kflorence commented Sep 25, 2024

Leave actions centered and ensure that they will wrap as needed on smaller devices. Also ensure that they are listed in the toolbar in the order they are defined in configuration (global first, then tile level), and that the order sticks even when ownership changes.

As part of this change, the concept of 'moves' has been added to the cached state which allows explicitly defining when a user has made a move, instead of just counting each state update as a move (or throwing it out entirely). This also allows the puzzle to assign IDs to everything the first time it starts up and re-use those IDs from cache. That ensures IDs will not change between page loads, which can make it easier to debug and also allows for logic related to IDs (such as sorting) to be persistent.

This allows tracking moves seperately from deltas, since sometimes
multiple deltas belong to a single move. This also allows IDs for all
items that are stored in state to be generated and persisted without
interfering with moves. This was necessary to ensure that modifiers
always show up in the same place in the toolbar since they are sorted by
their persisted IDs.
Modifiers will always show up in the order defined in configuration now
and will retain their place even if ownership changes.
@kflorence kflorence changed the title Fix some styling for modifiers on small screens Improve modifier UX and state storage Sep 26, 2024
@kflorence kflorence changed the title Improve modifier UX and state storage Improve action UX and state storage Sep 26, 2024
@kflorence kflorence merged commit bd7951a into main Sep 26, 2024
1 check passed
@kflorence kflorence deleted the minor-updates branch September 26, 2024 22:54
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.

1 participant