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

Status icon settings & multiple projects #1847

Open
awqk opened this issue May 2, 2024 · 5 comments
Open

Status icon settings & multiple projects #1847

awqk opened this issue May 2, 2024 · 5 comments
Labels
enhancement Request: New feature or improvement project management Component: Project or Project Tree

Comments

@awqk
Copy link

awqk commented May 2, 2024

Just noticed the status icon config is part of the project settings. Especially with the upcoming new features #1810, I would want to do the setup only once, and use the same setting for all my projects.

Please consider making this a global setting, or allow import/export, or copy from other project. Maybe it is as simple as storing the settings in a separate file in the meta subdirectory, to allow manual copy between projects, and have "Rebuild Index" update the usage statistics.

@vkbo
Copy link
Owner

vkbo commented May 2, 2024

The already provided solution for this is to create a template project. You can create new projects from a template from the new Welcome dialog.

I'll update the documentation on this, since it is not mentioned.

@vkbo vkbo added the documentation Request: Changes to documentation label May 2, 2024
@vkbo vkbo added this to the Release 2.4.1 milestone May 2, 2024
@vkbo
Copy link
Owner

vkbo commented May 2, 2024

Also, they cannot be global. Each status/importance label is associated with a unique key. The user interface ensures you cannot delete a key that is in use. If they were global, there would be no way to check this and you will risk erasing information from other projects when you make changes.

The only safe way to handle this would be to allow for import/export. However, this too is non-trivial since you cannot clear existing status labels on import, since they are in use. How do you then consolidate the imported changes? The only option is to append them, and you have to manually go through all your documents and switch to the new ones, before you delete the old. There is no easy way to automate this, so it would require a merge tool that is a medium sized feature task and a fair bit of effort to implement. A larger feature task is not likely to be implemented any time soon as there are a lot of higher impact features in the pipeline.

The only clean way is to use templates.

@awqk
Copy link
Author

awqk commented May 2, 2024

It would all be so easy, if it weren't for the details 😄. Looking at two projects, I see the keys are different every time, even if the colours and label are the same. That's probably bad news for importing and copying.

  • templates are clean-ish, but template updates don't propagate into older projects.
  • with a global set, if you can't find a status, display something like unknown status <key> in the tool tip. The info is still there, it's only ugly.
  • likewise, copying a status configuration: In all likelihood, the user knows what he is doing, and can replace unknown status <key> immediately with something he wants instead.
  • likewise, import/export: I'm not sure if this needs to work smoothly. Issue a warning to backup the project first, and off we go, unknown status <key> is your friend.
  • alternatively, import/export: change the existing labels to something like Draft (old), and import the new ones to live alongside the old ones. It's the user's job to clean up this mess. Chances are it's not so big.

But I agree, making this setting global feels a bit dangerous, and having templates is better than nothing. It's not like the status labels change a lot, and if I want I can still hack the .nwx file.

@vkbo
Copy link
Owner

vkbo commented May 2, 2024

Hacking the .nwx file is never the solution, but always a workaround, sure 😄

Anyway, I can convert this to a feature request as an import/export implementation. But as I said, it will not be implemented in a while. There are a lot of more impactful features to work on, and I don't seem to be able to make much of a dent in the number of requests as new ones come in all the time,

I did think a bit more about how a merge tool could work. It could compare the label text and update the colour and icon settings for those that have the same name (and ignore the unique key), and add the ones that do not. It is a lot simpler, and the user can simply cancel the Project Settings dialog if it ends up a mess. The changes are not applied directly.

Incidentally, the original implementation only used the status label text as the key. But that got a bit clunky when the user renamed them as all documents using it had to be updated. That's why I switched to a random generated key in version 2.0. It's the same logic used for document file names. Disconnecting the label from the actual entry makes a lot of things easier in the code, and a lot more robust against code errors.

@vkbo vkbo added enhancement Request: New feature or improvement project management Component: Project or Project Tree and removed documentation Request: Changes to documentation labels May 2, 2024
@vkbo vkbo modified the milestones: Release 2.4.1, Future Release May 2, 2024
@awqk
Copy link
Author

awqk commented May 2, 2024

I don't seem to be able to make much of a dent in the number of requests as new ones come in all the time

I will try to slow down a bit 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request: New feature or improvement project management Component: Project or Project Tree
Projects
None yet
Development

No branches or pull requests

2 participants