-
Notifications
You must be signed in to change notification settings - Fork 3
Node/Edge Option Type Editor #200
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
Conversation
…o hide/enable features.
… just makes sure file can be read as TOML)
…nsparencies were being ignored/not properly restored.
…template. Otherwise, fall back to _default.template.toml.
…e any errant `id` field in JSON templates.
@jdanish @kalanicraig One more question about Node Type and Edge Type Option editing: Currently the fancy tools that handle dataset remapping when editing types (e.g. using "Change To" map from an old type to a new type), are only available in the Node Type Option and Edge Type Option editors. They are NOT available in the main "Edit Current Template" view. That view just provides a flat list of options to edit without the data conversion tools. While it is possible, it will be messy to add the conversion tools to the "Edit Current Template" tool. Also it makes the workflow very convoluted. So here are some assumptions I'm making:
Any thoughts? Ideas? |
I like / agree with 1 and 2. I think long-long-term we’ll wanna just make all custom editors, but for the short term this works great.
Joshua
…----
Joshua A. Danish (he, him, his) (https://www.mypronouns.org/ <https://www.mypronouns.org/>)
***@***.***
http://www.joshuadanish.com
On Feb 8, 2022, at 4:36 PM, benloh ***@***.***> wrote:
@jdanish <https://github.com/jdanish> @kalanicraig <https://github.com/kalanicraig> One more question about Node Type and Edge Type Option editing: Currently the fancy tools that handle dataset remapping when editing types (e.g. using "Change To" map from an old type to a new type), are only available in the Node Type Option and Edge Type Option editors. They are NOT available in the main "Edit Current Template" view. That view just provides a flat list of options to edit without the data conversion tools.
While it is possible, it will be messy to add the conversion tools to the "Edit Current Template" tool. Also it makes the workflow very convoluted. So here are some assumptions I'm making:
Assume that it's OK that the "Edit Current Template" is focused on the raw template editing and does not provide the data conversion tools.
We could add instructional text to the "Edit Current Template" view informing users to use to use the "Node Type Option" and "Edge Type Option" editors if they need to convert data.
Or, we could remove the Node Type Option and Edge Type Option from the Edit Current Template view altogether (though I don't like this solution as much as it can be more confusing to have it missing).
Any thoughts? Ideas?
—
Reply to this email directly, view it on GitHub <#200 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABKGCKXICA6G2M6KFB36ZGLU2GEHTANCNFSM5NIIXDWA>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.
|
Standalone mode should work now. In addition, the "Edit Node" and "Edit Edge" buttons are now hidden in standalone mode. |
…ge Types" rather than "Edit Current Template" for type options.
Looks like nc-multiplex works fine. |
@jdanish @kalanicraig Alright, I think the Node/Edge Type Option editors is now completed: locking template editing across the network now works, along with standalone mode fixes, and a confirmation that nc-multiplex still works. Once you confirm the last few fixes starting with "New Feature: Network Locking" above, we can merge this into The next step will be to work on importing data. |
I noticed that the "NOTE: We recommend using the "Edit Node Types" feature to edit Node Types. It provides additional dataset migration tools." warning appears in both the edit not type editor, and the edit template editor. The first is a bit confusing since you are already there. Is that something that can be turned on only when it is part of the full editor? Same with edges. Otherwise, my minimal testing all looks good. Kalani can speak to more extensive testing / when it is ready, though. |
I think I have to remove the "NOTE: We recommend..." manually. It should be doable. Also there's still an issue with Template edits propagating across the network: #204 |
Also the key updating (I think I filed an issue?). |
Weird. I didn't get a notification. It's #206. BTW, if you add a "Project" and select "Version 1.4" it should show up in the main work board I'm using: https://github.com/netcreateorg/netcreate-2018/projects/3 |
…editing the Current Full Template, not when editing type options directly.
…et objects to simple ids.
@jdanish Three fixes:
This should complete all the features needed for this merge request. |
Awesome. One thing I noticed by accident (I can file an issue if you need): If you go to edit a template, then navigate away in some way (e.g., reloading the page), then the network remains locked and there is no way to unlock it without a restart. Can we use the navigate away to trigger the unlock in one manner? |
Issue created in #219. |
hotfix-comment-zindex: Keep comments visible on top of comment status…
Merge after #198!
Branch:
dev-bl/typeedit
This hacks the json-editor interface so that we can add some additional functionality around:
In addition to updating the template, the editor will now also update the existing dataset's type options if necessary.
To Test
We recommend making a backup of your dataset and template because these tests will change both template and dataset content.
git fetch && git checkout dev-bl/typeedit
npm run dev
http://localhost:3000
Test Rename
To rename a label, you just type the new name in the "Change To" field. The nice thing about this UI is that the original label is still visible if you're making decisions about naming while reviewing the whole list.
ctrl-c
quit NetCreate and start it again.Test Delete
You can simply remove a type option by deleting it. However, deleting a type option will make it an unknown type -- this means that any node that is set to that type will be displayed as black because it will have an unknown type. We expect that most of the time when you want to delete a label, you would also want to remap it (see the next section "Test Delete and Remap").
Test Delete and Remap
Instead of simply deleting a type option, you can tell the system to change any node with the deleted type to a new type.
Test Adding
You can add new options.
Technically we should probably hide the "Change To" field when adding a new field, but having it actually adds another handy feature. Read on...
Remap Inadvertent "Feature"
Another handy power user feature for managing type options is you can use the "Add Row" feature to both add a type AND rename it at the same time. This is handy if you find that you have a node with a stray type that hasn't been added. For example, let's say you found three black nodes set to a type "Race", but you do not currently have "Race" as a type option. And you don't want the type option to be "Race", you want it to be "Ethnicity". You can Add it and change it in one action:
Under the hood what happens is:
The UI is a little quirky, especially for someone who is not used to managing lists of items in this way. But the nice thing is we don't need to build a custom UI with a ton of actions to take for every single label.
Wiki
Edit Template
Locking Templates
While editing templates, you cannot edit nodes or edges. This is because changes to the Template can affect how Nodes and Edges behave and are displayed. Changes to the template can also result in changes to the dataset (e.g. one node type is remapped to another node type).
Conversely, when you are editing a node or edge, you are not allowed to edit templates.
There is a warning message displayed on the Node/Edge if this occurs.
Edit Node Types / Edit Edge Types
When editing node types or edge types, if you use the "Change To" field, Net.Create will automatically update your dataset for you: any nodes and edges using the original "Label" type will be updated to use the new "Change To" type. This change is executed as soon as you click "Save Changes". Your dataset file on disk will be updated immediately.
NOTES