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

save on cookies #50

Closed
sugizo opened this issue Sep 6, 2020 · 7 comments
Closed

save on cookies #50

sugizo opened this issue Sep 6, 2020 · 7 comments

Comments

@sugizo
Copy link

sugizo commented Sep 6, 2020

because of user behaviour (different for each person) better to save on cookies for :

  • left handed fretboard (settings)
  • flip nut (settings)
  • set c to noon (settings)
  • tunings
  • scale

thanks

@mikehadlow
Copy link
Owner

Agreed. The cookie saving implementation is really broken. I need to have a better idea about how to implement this. I'd also like to have a way of saving the current state in the URL, so that a teacher could send a link to their students with the scale, chords, and notes already selected, and a single scheme to store all of this would be ideal.

@sugizo
Copy link
Author

sugizo commented Sep 7, 2020

brilliant to put some on URL :

  • scale
  • root note
  • tuning
  • chord selected

but some data need to save on cookies too, because not everybody is same :

  • left handed option
  • flip nut
  • set c to noon

@mikehadlow
Copy link
Owner

Good point. Although 'c to noon' would probably be an instructors choice, no?

@sugizo
Copy link
Author

sugizo commented Sep 8, 2020

trying to modify cookie-module.ts but not success (no error occured, but the result is not expected

    export function init(): void {
        events.scaleChange.subscribe(bakeCookie);
        events.tuningChange.subscribe(bakeCookie);
    }

    function bakeCookie(scaleChange: events.ScaleChangedEvent, tuningChange: events.TuningChangedEvent): void {

when put it solely just it can work to store the value (tuningChange)

    export function init(): void {
        events.tuningChange.subscribe(bakeCookie);
    }

    function bakeCookie(tuningChange: events.TuningChangedEvent): void {

not sure where is my mistake, perhaps you can give a pointer, thanks

after rethink again, not everyone is a student, some is autodidact that need guitardashboard.com to enlarge their knowledge in music
put some on URL (for assigned or topic discussed from instructor to their student) :

  • scale
  • root note
  • tuning
  • chord selected

and save everything on cookies too for autodidact :

  • left handed (settings)
  • flip nut (settings)
  • set c to noon (settings)
  • scale
  • root note
  • tuning
  • chord selected

what do you think ?

@mikehadlow
Copy link
Owner

The argument to subscribe is a function that takes the event as its argument. So you'd need two different bakeCookie functions, one for ScaleChangedEvent, and another for TuningChangedEvent. I'm surprised that even compiled to be honest.

I'm a firm believer in 'keep it simple'. 90% of people don't read manuals or investigate features. I would go for re-creating the entire state rather than having some complicated scheme for storing a subset of settings.

@amiika
Copy link

amiika commented Sep 15, 2020

Awesome tool! Thanks for this! Was going to ask about the share link function that saves the current state ... some sort of "Share this" button that displays and copies shareable link with the state would be nice.

@mikehadlow
Copy link
Owner

Thanks @amiika, yes, that's something I'd like to implement. I think it'd be useful for teachers especially.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants