-
Notifications
You must be signed in to change notification settings - Fork 4
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 rename variable feature #733
Conversation
Renaming variables is generally working well for me! There were just a few places that editing the variable name was allowed, but it did not trigger a save for the stage so didn't take:
And there are a few places that variables cannot be renamed but maybe could be:
Editing from the codebook worked for all the variables, though! When navigating to the codebook, I saw these three warnings:
This showed up when navigating to a name generator stage and an ego stage, and an alter form stage. So probably unrelated?
|
Thanks for this feedback!
This was an interesting one, as normally that's controlled by the form "dirty" state, but variable names are edited directly in the protocol. I updated it to detect when the Additionally in working on this feature I discovered quite a big bug in the history/rewind feature (a redux enhancer). It was considering any action as a change to snapshot instead of only changes to the protocol (the intent), that means the entire protocol state was being duplicated multiple times for any redux-form actions (which there are quite a lot of!). Performance has been improved, and the history object is much slimmer. I am concerned that there could be other knock on effects, but there is no reason for that to be the case unless there is some unusual behaviour somewhere that I've forgotten about.
I've added this feature to the narrative group variable. I might be misunderstanding, but the edge selection doesn't involve variables (though the UI is very similar so it does seem like a similar feature would fit here). |
I agree that it looks a bit weird when the "finished editing" button pops up while still having the prompt open. More than once I clicked on "finished editing" instead of the "save and close". Sounds like a tricky issue though! It definitely needs to trigger a save, but it'd be nice not to do so until the prompt closes, like the other prompt edits would. Is there a way to do that, or is that too involved? Good find with the history/rewind bug! I'll let you know if I come across any oddities. I haven't yet, so fingers crossed. Good point about how the edge selection is different from variables...at the level of the node type. The UI similarities made me forget that distinction. It sounds to me like a separate issue if we decide we want that also. |
Any thoughts, @wwqrd? |
This change has also retrospectively impacted some other features - like inline variable creation (also seen as a change in protocol) I'd be tempted to find a way to disable those controls until the sub window is closed. |
I'm working on something for this, so please don't merge for now. |
Superseded by: #738 |
Updates codebook and inline variable selection to include a rename variable dialog.
Delete button in codebook has been changed to an icon to create more room for the rename button.
Rename dialog

Codebook view

Inline view

Resolves #732