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 folders to tags tool #58

Merged
merged 10 commits into from
Apr 27, 2024
Merged

Conversation

Creepler13
Copy link
Contributor

Adds a new button to the tools menu that creates tags based on the folder structure and applies them to entries

Copy link
Member

@CyanVoxel CyanVoxel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A very nice feature! I've just got a few requested changes after testing it out:

  • Move the feature from the “Tools” menu to the “Macros” menu. This feature is similar to how Macros will function in the future, so it’ll make more sense to have it there.
  • Change the default Tag color to be none ("") instead of black.
  • Add a confirmation dialog before performing the action. Something that explains to the user what is about to happen to their library, and gives them the option to cancel if they don’t want it performed. Ideally it could preview how many and which tags are about to be created, but that’s not strictly necessary.
  • Instead of having a tag with no name for the root folder, instead either give it the same name as the root folder or allow the option to omit this root tag entirely.
    • Also I’m not sure what the intended behavior for this empty tag is supposed to be, since the other subfolder tags inherit from each other but not this one. If this tag was never intended, then that’s fine as well.

Feel free to keep the PR open or convert it to a draft, either way just please don't close it and re-open it with the same PR number :)

@Creepler13 Creepler13 marked this pull request as draft April 26, 2024 21:39
@Creepler13 Creepler13 marked this pull request as ready for review April 27, 2024 19:15
@Creepler13
Copy link
Contributor Author

I made it more complicated that needed but its a good visualisation of what happening

  • Moved the feature from the “Tools” menu to the “Macros” menu
  • Changed the default Tag color to be none ("") instead of black
  • Added a confirmation dialog before performing the action. That displays what is going to happen (might need a makeover, i'm not good with UI)
  • Fixed the empty Tag for the root folder

@Creepler13 Creepler13 requested a review from CyanVoxel April 27, 2024 19:37
Copy link
Member

@CyanVoxel CyanVoxel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes! Great work on this feature, and don't worry about the UI - the whole app needs a pass to make the UI more usable and consistent. I really appreciate the time and effort, and having a full preview of the tags being created is awesome! 👍

I'll go ahead and pull this, but for the future just make sure that variable names (the Apply_button specifically) are using snake_case, although from the rest of your code it looks like that was just a one-off that slipped though.

@CyanVoxel CyanVoxel merged commit 15de97c into TagStudioDev:main Apr 27, 2024
@Creepler13 Creepler13 deleted the Folders-to-Tags branch April 28, 2024 20:14
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