Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add readOnly mode to PianoRoll #6

Merged
merged 5 commits into from
Oct 28, 2022
Merged

Conversation

josephktcheung
Copy link
Contributor

@josephktcheung josephktcheung commented Oct 23, 2022

This PR adds readOnly mode to PianoRoll, which disable adding / editing / removing any note.
User can change black vertical line's opacity using PianoRoll's noteLineOpacity.

simulator_screenshot_1B435FBF-3550-4F79-A9A4-DFBAFFA4ED2C

@josephktcheung
Copy link
Contributor Author

@aure @wtholliday please review thanks

Copy link
Member

@wtholliday wtholliday left a comment

Choose a reason for hiding this comment

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

Please make the line opacity a setting instead of a function of readOnly.

@aure
Copy link
Member

aure commented Oct 26, 2022

Please make the line opacity a setting instead of a function of readOnly.

I agree that readOnly seems to be an implementation detail. Someone else might readonly to do something quite different to the UI.

@aure
Copy link
Member

aure commented Oct 28, 2022

I'm sorry I think there's some confusion about variable naming and you were actually closer before the addition of note line opacity. I think removing the "handle" when you can't edit is an okay side effect. But I don't like the term "readOnly" for a boolean. I'd prefer "isEditable" or "editable" and its also a positive relationship can the user do something rather than can the user not do something.

@josephktcheung
Copy link
Contributor Author

josephktcheung commented Oct 28, 2022

I'm sorry I think there's some confusion about variable naming and you were actually closer before the addition of note line opacity. I think removing the "handle" when you can't edit is an okay side effect. But I don't like the term "readOnly" for a boolean. I'd prefer "isEditable" or "editable" and its also a positive relationship can the user do something rather than can the user not do something.

Renamed readOnly to editable, please take a look again.

@aure aure merged commit a7b3aac into AudioKit:main Oct 28, 2022
@josephktcheung josephktcheung deleted the read-only branch October 29, 2022 14:45
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.

3 participants