TeamOfOne / guitarjs

Interactive creating, editing, playing and sharing guitar scores in the browser
https://teamofone.github.io/guitarjs/#/app/playlists/1/noname
Other
7 stars 2 forks source link

Erase the note when the note name is erased #2

Open waldyrious opened 8 years ago

PedroGomes commented 8 years ago

Should be easy

PedroGomes commented 8 years ago

I can do this In fact, due to my limited skill, this in fact one of the only things I can do :)

waldyrious commented 8 years ago

You underestimate the power of your own skill

darth vader

PedroGomes commented 8 years ago

I implemented this in 5 minutes, the question is: I place 3 notes, and I quit and start writing a chord name, then I delete it. What happens?

A) It deletes the 3 notes on the score B) It doesn't delete anything, it only works if a valid note is there and I deleted it?

B needs a little more dust but is more user friendly right?

waldyrious commented 8 years ago

By "quit" you mean the user simply deciding to give up on inserting the chord note by note, and write its name instead? I mean, there's only a goal change in the user's mind, not an actual "quit" action in the interface, right?

Anyway, writing the chord by itself should delete the notes as soon as a chord is recognized. So the deletion of the note shouldn't be a factor. We could make it recover the previous notes, but IMO that's an extra -- the user explicitly chose to overwrite the existing chord by typing in the name.

I believe this is close to what you were going for in B?

And a final note: this whole question becomes way less important once we implement undo/redo (#3) :)

PedroGomes commented 8 years ago

Yes quit, as in the user mind.

"Anyway, writing the chord by itself should delete the notes as soon as a chord is recognized." -> That is already there with the current implementation.

Recover old notes -> no, keep it simple.

My situation is simpler: 1 You are searching for a chord, you put some notes trying to guess. 2 You write something in the text field, but you stop and delete it before you write a correct chord 3 You go back to editing the score manually searching for the chord.

Between 2 and 3, if you chose A, the user will have to start from scratch, on B, the notes will still be there.

Maybe I'm overthinking it, I guess I will go with A for simplicity

waldyrious commented 8 years ago

I see. Well, I stand by what I said before: "writing the chord [name] should delete the notes as soon as a chord is recognized" -- but not sooner. So If I'm reading you correctly, that's the B approach, which I think makes more sense than A, otherwise the chord isn't replaced, but effectively erased, which surely isn't the user's intent.

PedroGomes commented 8 years ago

Ok. I will have to add state to know if we already have a recognized chord or not. But I'm dead tired now, I will look into it tomorrow or so