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

Custom background color of novel chapter/scene based on tag #1576

Open
Tracked by #1710
xahodo opened this issue Nov 5, 2023 · 7 comments
Open
Tracked by #1710

Custom background color of novel chapter/scene based on tag #1576

xahodo opened this issue Nov 5, 2023 · 7 comments
Labels
enhancement Request: New feature or improvement potential feature Request: May be considered later project management Component: Project or Project Tree

Comments

@xahodo
Copy link

xahodo commented Nov 5, 2023

I have two main characters, each has their own thread in the story, so I'd like to quickly see which chapters/scenes belongs to which character. It would be useful if I were able to change the background color of the project tree chapter/scene item based on POV.

I guess someone would love to use other tags for this. I imagine the custom color can be set with the tagged items, and then the user could select which tag type would be displayed.

Something along the lines of the following:

  • Objects
    • Magic Staff

Then in Magic Staff:

@tag: Magic Staff
@color: #880000 (hexadecimal, for example, possibly right click the @color to get a color-picker window)

Then, in the project settings, the user could select the type of tag (in this case objects) to use the background color of and, lo and behold the background color of the chapter/scene in the project tree would change in accordance to the relevant object in the chapter/scene.

Come to think of this, perhaps it would only be useful with tags of which you'd be guaranteed only one would occur in a project scene/chapter item, such as POV and focus. Otherwise if multiple items are relevant in a scene/chapter things would become unnecessarily complicated.

Why the "status" square does not work for this:
I use this to keep track how far along I am with a particular scene/chapter, so that one is already in use.

Another option would be to define and name background colors manually (in, for example, project settings), and hide them under the right click menu in the project tree, but this is prone to error. This is, however, the way scrivener implements this.

@xahodo xahodo added the enhancement Request: New feature or improvement label Nov 5, 2023
@vkbo
Copy link
Owner

vkbo commented Nov 5, 2023

This would have to be in the Novel Tree or Outline, or both, but I think something can be achieved. The "Importance" flag was designed to indicate the status of for instance your characters, so the means to colour code them is already there. Maybe there's a solution here to add a colour indicator for it in the Novel Tree.

I agree it should only be applied to certain categories. I think tying it into the last column of the Novel Tree makes most sense. It could colour code the row based on the Importance flag of the content of the last column?

image

It doesn't make much sense to do this in the Project Tree as the file structure does not at all have to match your novel structure. That's part of the freedom fo novelWriter projects. That's why the Novel Tree is there as an alternate view in the first place. I'm happy to add features to make it more useful.

@vkbo vkbo added discussion Meta: Feature discussions project management Component: Project or Project Tree potential feature Request: May be considered later and removed discussion Meta: Feature discussions labels Nov 5, 2023
@vkbo vkbo changed the title Set custom background color of novel chapter/scene based on some specific tag Custom background color of novel chapter/scene based on tag Nov 5, 2023
@xahodo
Copy link
Author

xahodo commented Nov 5, 2023

The reason I brought this up is that color-coding stuff would help with overview. Interpreting a lot of symbols is a lot harder than interpreting a single item (in this case the color). Also, the color coding would allow for more information in the project tree/novel tree/outline view to be deduced at a glance. For example: are enough scenes about my second main character? Does this plot item occur as often as I want it to occur?

@vkbo
Copy link
Owner

vkbo commented Nov 5, 2023

Yes, I understand the reason. But the question is if my proposed solution will solve it.

@xahodo
Copy link
Author

xahodo commented Nov 7, 2023

Color coding based on the last column (as you showed) would be nice.

The reason I would like this in the project tree, is so that I can see with one look which f.e. pov is most prevalent in everything I already typed up, without switching views. It's all about clarity for me. This is independent whether I want it in the final output or not. I guess it would be helpful to have that color coding in all views (if possible).

@vkbo
Copy link
Owner

vkbo commented Nov 7, 2023

The problem in the Project Tree is that it won't work unless you structure your documents in a specific way. That's why the meta data isn't displayed there, and why the Novel Tree exists in the first place.

@tmarplatt
Copy link
Contributor

Can I suggest another solution to setting the tag color?

As a prerrequisite, consider a Tags Palette: a color palette for tags, which you can customize somewhere in the Project Settings. This is matter for a new issue. Regardless, to novelWriter the Tags Palette is simply a list of color codes, defaulting to a sensible list of background colors.

Once a new tag name has been entered in the Editor, novelWriter then renders a floating box next to the tag name filled with the first unused color, as in “not already assigned to another tag”, from the Tags Palette. The box is a clickable: it opens a small color swatches window (ideally non modal: the user needs not really dwell on this action) showing a rendered Tags Palette and offering the ability to click and set another color for the accompanying tag.

Pros:

  • Setting immediately available to the user
  • Frees mental resources otherwise used in remembering the appropriate syntax
  • Intuitive to use

Cons:

  • More complex to code, higher maintenance load
  • Is it feasible with Qt? I may be asking for too much 😁

The tag name itself should also rendered with the chosen color as background. This should be part of the new feature regardless.

@vkbo
Copy link
Owner

vkbo commented Feb 29, 2024

Feasible, possibly. But a very complex widget and functionality to design. Setting a colour palette in Project Settings makes more sense. In either case, whether this is needed or not depends on the implementation we end up with.

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 potential feature Request: May be considered later project management Component: Project or Project Tree
Projects
None yet
Development

No branches or pull requests

3 participants