Skip to content

Conversation

nitocode
Copy link
Owner

@nitocode nitocode commented Apr 1, 2025

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

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
@nitocode nitocode force-pushed the feat/custom-wheel-revolutions branch from c561229 to a363e2d Compare April 1, 2025 23:05
@nitocode nitocode requested a review from Copilot April 1, 2025 23:10
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

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;

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