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

Add the ability to create nested Tags via parents #49

Merged
merged 11 commits into from
Dec 13, 2023

Conversation

clayrosenthal
Copy link
Contributor

Adds the ability to specify a parent or parent-uuid when creating a tag, which then creates a nested tag underneath the specified parent tag.

ex:

sn add tag --title nested --parent root

which then shows:

sn get tag --title 'root,nested'
{
  "tags": [
    {
        "uuid": "62909229-17ec-4d01-ad6d-bec554ca73e8",
        "content": {
            "title": "nested",
            "references": [
                {
                    "uuid": "811a20f3-a130-41f8-9fdc-599c08379efe",
                    "content_type": "Tag",
                    "reference_type": "TagToParentTag"
                }
            ],
            "appData": {
                "org.standardnotes.sn": {
                    "client_updated_at": "2023-12-11T05:58:28.727Z",
                    "prefersPlainEditor": false,
                    "pinned": false
                }
            }
        },
        "content_type": "Tag",
        "created_at": "2023-12-11T05:58:28.727Z",
        "updated_at": "2023-12-11T05:58:29.265Z"
    },
    {
        "uuid": "811a20f3-a130-41f8-9fdc-599c08379efe",
        "content": {
            "title": "root",
            "references": null,
            "appData": {
                "org.standardnotes.sn": {
                    "client_updated_at": "2023-12-11T05:58:15.720Z",
                    "prefersPlainEditor": false,
                    "pinned": false
                }
            }
        },
        "content_type": "Tag",
        "created_at": "2023-12-11T05:58:15.720Z",
        "updated_at": "2023-12-11T05:58:16.387Z"
    }
]
}

Needs to be merged after related gosn PR

@jonhadfield
Copy link
Owner

Thanks. Will take a look tomorrow.

@jonhadfield jonhadfield merged commit ea9396c into jonhadfield:main Dec 13, 2023
2 of 5 checks passed
@clayrosenthal clayrosenthal deleted the tag-parents branch December 13, 2023 20:52
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

Successfully merging this pull request may close these issues.

2 participants