hlucasfranca / camunda-modeler-plugin-dracula

Camunda Modeler Dracula Theme Plugin
MIT License
14 stars 3 forks source link

Dracula plugin sets the color of labels #10

Open t1 opened 5 months ago

t1 commented 5 months ago

(moved from https://github.com/camunda/camunda-modeler-plugins/issues/108)

Describe the Bug

When I edit a BPMN model with the Dracula plugin installed, it changes the color of all labels from:

<bpmndi:BPMNLabel>

to:

<bpmndi:BPMNLabel color:color="rgb(207, 205, 205)">

Steps to Reproduce

  1. install Dracula plugin
  2. open the Modeller
  3. open a BPMN
  4. change something
  5. save
  6. examine the updated BPMN

Expected Behavior

It should never change the color in the BPMN.

Environment

codygulley commented 4 months ago

Hi all, I've implemented a fix for this but it means that readability of a model suffers as you can see in the before and after with and without the fix. (likely why @hlucasfranca purposely chose to overwrite the label text for readability).

Example model without the plugin:

Screenshot 2024-06-02 at 9 57 27 PM

Example model with the plugin (without this fix):

Screenshot 2024-06-02 at 10 25 36 PM

Example model with the plugin (with this fix):

Screenshot 2024-06-02 at 10 08 13 PM

I think it is important to main the colorization of labels as those are generally set to provide some contextual meaning in the model - highlight NIGO routes as an example; however, the Camunda Modeler's chose of dark colors for labels does not play nicely with the dark backgrounds.

Off the top of my head I think of a couple of solutions to this:

  1. Provide a toggle feature for the dark theme plugin -- Might be difficult to replace Camunda default css in situ -- Doesn't solve the problem , just a workaround instead of uninstalling the plugin completely.
  2. Create logic to map the colors to a lighter variant -- Would be brittle if Camunda Modeler application makes any changes to colors -- If new colors were added to the pallete, they would not have a mapped value to replace to.

Open to brainstorming and ideas @hlucasfranca @t1

t1 commented 4 months ago

If there is no direct way to change the color of labels in Camunda Modeller, I'd say this plugin is doomed. I don't think that either option is acceptable. Changing to dark-mode must be a viewer-only decision.

So IIUC, we require a PR to the Modeller itself?

codygulley commented 4 months ago

I don't see why you would say this plugin is "doomed". This plugin is only changing how the model is visually displayed. It is in now way changing the XML of the BPMN model.

You can change the colors of labels in the model from a choice of 6 colors in the modeler . This is functionality provided by the modeler app. The question I've proposed is regarding what is the best way to visually display the colors in a way that coalesces with a dark theme for readability since those provided 6 colors are rather dark and aren't easily visible on a dark background.

We don't need an update from the modeler to achieve any of this just a decision on which direction to take.

t1 commented 4 months ago

Sorry. Maybe I go you wrong. Can we just provide 6 alternate Dracula colors? They should have a similar hue, so "yellow" is still "yellow". And IIUC these color don't only apply to labels.