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

Feature/shuffle targets #96

Merged
merged 5 commits into from
Nov 20, 2024
Merged

Feature/shuffle targets #96

merged 5 commits into from
Nov 20, 2024

Conversation

capetillo
Copy link
Collaborator

FEATURE: Shuffle and load more targets

Background:
When users would request a scheduled observation, selected beginner mode, and then selected an object category (e.g. supernova), only 3 targets would load and they could only select from those 3. Now, there is the option to shuffle targets and to load more targets (within the same object category).

The next task is to add a Go Back and Start Over buttons.

Implementation:

  • handleObjectSelection: now populates allCategoryTargets and initializes displayedTargets with the first 3 targets
  • shuffleTargets: randomly selects 3 targets from the full list of targets in the current category. The new targets have the key:value pairs as the first 3 targets that load so that the filters, ra, and dec are saved.
    loadMoreTargets: adds up to 3 more targets to displayedTargets and does not exceed 15 targets (arbitrary number, can get rid of this) or the number of available targets.

VISUALS

Screen recording of shuffling targets and loading more targets

Screen.Recording.2024-11-20.at.11.45.51.AM.mov

Copy link
Contributor

@mgdaily mgdaily left a comment

Choose a reason for hiding this comment

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

Very cool!

@capetillo capetillo merged commit f57a219 into main Nov 20, 2024
1 check passed
@capetillo capetillo deleted the feature/shuffle-targets branch November 20, 2024 20:55
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.

2 participants