Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andStart Over
buttons.Implementation:
handleObjectSelection
: now populatesallCategoryTargets
and initializesdisplayedTargets
with the first 3 targetsshuffleTargets
: 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 thefilters
,ra
, anddec
are saved.loadMoreTargets
: adds up to 3 more targets todisplayedTargets
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