feat: add revolutions prop to control wheel spin count#8
Open
feat: add revolutions prop to control wheel spin count#8
Conversation
Add a new 'revolutions' property that allows users to customize how many full rotations the wheel makes before stopping at the selected item. This enhances animation control and user experience by providing more customization options. - Add revolutions prop to Roulette component with default value of 3 - Update wheel spinning logic to use the new property - Add UI control in WheelManager for adjusting revolutions - Update documentation in README.md - Implement in compression/decompression system for config sharing
c561229 to
a363e2d
Compare
There was a problem hiding this comment.
Pull Request Overview
This pull request adds a new revolutions prop to control the wheel spin count and updates the wheel spinning logic, UI controls, data defaults, configuration serialization, and documentation to support this feature.
- Added revolutions property (default 3) to the Roulette component with validation.
- Updated wheel spinning logic to multiply 360 by the revolutions value.
- Modified configuration serialization in the custom view and updated docs/README accordingly.
Reviewed Changes
Copilot reviewed 10 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/Roulette.vue | Added the revolutions prop and updated the rotation calculation. |
| pages/views/Home.vue | Passed the new revolutions prop to the Roulette component. |
| pages/views/Custom.vue | Updated configuration shorthand mapping for revolutions and resultVariation. |
| pages/data/homeData.js & examplesData.js | Added default revolutions field in data objects. |
| pages/components/WheelManager.vue & Example.vue | Added UI bindings for the revolutions prop. |
| README.md | Updated the props table to include the revolutions property. |
Files not reviewed (3)
- docs/assets/index.019fedf3.css: Language not supported
- docs/assets/index.86b04ced.css: Language not supported
- docs/index.html: Language not supported
Comments suppressed due to low confidence (2)
pages/views/Custom.vue:428
- The shorthand mapping for the revolutions property (using s.r) has been updated to now represent revolutions instead of resultVariation. Please verify that this change is compatible with existing saved configurations and update any related documentation or migration logic if necessary.
if (settings.revolutions !== defaultSettings.revolutions) s.r = settings.revolutions;
pages/views/Custom.vue:497
- The configuration serialization now assigns s.r to revolutions and s.rv to resultVariation. Ensure that this new mapping is clearly documented and that it does not break backward compatibility with previously saved configurations.
if (s.r !== undefined) config.wheelSettings.revolutions = s.r; if (s.rv !== undefined) config.wheelSettings.resultVariation = s.rv;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add a new 'revolutions' property that allows users to customize how many full rotations the wheel makes before stopping at the selected item. This enhances animation control and user experience by providing more customization options.