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

Prevent indenting/outdenting a field node #116

Closed
taramk opened this issue Apr 27, 2023 · 2 comments
Closed

Prevent indenting/outdenting a field node #116

taramk opened this issue Apr 27, 2023 · 2 comments
Assignees
Milestone

Comments

@taramk
Copy link
Contributor

taramk commented Apr 27, 2023

This irreversibly breaks your workspace.

@taramk taramk added this to the 0.3.0 milestone Apr 27, 2023
@progrium progrium changed the title Prevent indenting a field node Prevent indenting/outdenting a field node May 2, 2023
@progrium progrium assigned ArcaTech and unassigned progrium May 2, 2023
@progrium
Copy link
Contributor

progrium commented May 2, 2023

Since this needs to be reproduced, to fix your workspace once you've done this, you have to get the field ID, search your workspace.json for the node with that ID and remove the ID from any nodes that reference it (there can be more than one). In short, use the ID to nuke it from your workspace doc.

To get the ID, you can perform a command (like Cmd+K for pick-commands, which does nothing but shows command palette) and the console will log the command and params, including the node it was done on.

@progrium
Copy link
Contributor

progrium commented May 3, 2023

This should be as simple as returning early in the command if the node is a field. Currently, easiest way to tell if a node is a field is node.raw.Rel === "Fields"

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

No branches or pull requests

3 participants