Skip to content

docs: Enhance documentation for pie menu functions in piemenus.js#5628

Merged
walterbender merged 4 commits intosugarlabs:masterfrom
Siddharth-732:docs
Feb 22, 2026
Merged

docs: Enhance documentation for pie menu functions in piemenus.js#5628
walterbender merged 4 commits intosugarlabs:masterfrom
Siddharth-732:docs

Conversation

@Siddharth-732
Copy link
Contributor

@Siddharth-732 Siddharth-732 commented Feb 8, 2026

fixes #5563
(accidently closed the last PR)

Summary

This PR adds comprehensive JSDoc documentation to key pie menu–related functions in js/piemenus.js.
These functions implement complex UI and musical logic but previously lacked clear inline documentation, making them harder to understand and maintain.

The added JSDoc comments describe each function’s purpose, parameters, return values, and usage context.


Changes Made

Added structured JSDoc documentation to 16 pie menu functions, including:

Helper Functions

  • setWheelSize() – Responsive pie menu sizing
  • getPieMenuSize() – Calculates optimal menu size based on canvas
  • enableWheelScroll() – Enables scroll-based rotation for pie menus

Musical Selection Menus

  • piemenuPitches() – Pitch and accidental selection
  • piemenuCustomNotes() – Custom note set selection
  • piemenuNthModalPitch() – Scale degree selection
  • piemenuAccidentals() – Sharp / flat / natural selection
  • piemenuNoteValue() – Note duration selection
  • piemenuChords() – Chord selection menu
  • piemenuIntervals() – Interval selection
  • piemenuModes() – Musical mode selection
  • piemenuVoices() – Voice / instrument selection

Utility Menus

  • piemenuNumber() – Numeric value selection
  • piemenuColor() – Color picker pie menu
  • piemenuBasic() – Generic pie menu builder
  • piemenuBoolean() – Boolean selection menu

Why This Change Is Needed

  • Improves readability and maintainability of complex UI logic
  • Makes onboarding easier for new contributors
  • Reduces ambiguity in musical and interaction logic
  • Aligns the codebase with JSDoc best practices

Testing

  • No functional changes were made
  • Documentation-only update
  • Existing behavior remains unchanged

Checklist

  • Documentation follows JSDoc standards
  • No functional logic was modified
  • Code formatting and style remain consistent
  • Ready for review

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

✅ All Jest tests passed! This PR is ready to merge.

@Siddharth-732
Copy link
Contributor Author

Siddharth-732 commented Feb 17, 2026

@omsuneri can you please review this ?

@vanshika2720
Copy link
Contributor

@Siddharth-732 please solve merge conflicts...!

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@Siddharth-732
Copy link
Contributor Author

@walterbender i have resolve the merge conflict, kindly review this
@vanshika2720 thanks for pointing out.

@vanshika2720
Copy link
Contributor

@Siddharth-732 . Please double-check consistency in type annotations and @returns usage across all functions.
Once updated, this will be good to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@Siddharth-732
Copy link
Contributor Author

@vanshika2720,I checked for consistency throughout my changes, also added @return for all functions. I hope this resolves the issue.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@walterbender walterbender merged commit 26de911 into sugarlabs:master Feb 22, 2026
7 checks passed
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.

[Docs] Add Comprehensive JSDoc Documentation to Pie Menu Functions

3 participants