epiccoleman / react-circle-of-fifths

An interactive Circle of Fifths component for React
https://www.npmjs.com/package/react-circle-of-fifths
MIT License
9 stars 0 forks source link

Planned Feature: Indicate Currently Selected Key #2

Open epiccoleman opened 1 year ago

epiccoleman commented 1 year ago

Currently, the only way that a user of the component can know which key is selected is by managing state in some parent component. (For example, see the current approach in the demo app.)

The CircleOfFifths component should have an internal notion of which key is currently selected. It should also indicate the current selection in some way.

A couple thoughts:

This is going to require some work because the current rendering logic is blissfully unaware of any internal state like that. We'll need to add IDs to each wedge and write some logic around deciding which wedges should be styled based on the current selection.

epiccoleman commented 1 year ago

The 1.0.0 Release contains a first-pass implementation of selection management. Leaving this issue open for now, as I'd still like to explore some of the more interesting ideas here like indicating the selection with an outline and recoloring diatonic notes in the circle.