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

Dracula plugin sets the color of labels #10

Open
t1 opened this issue Apr 26, 2024 · 4 comments
Open

Dracula plugin sets the color of labels #10

t1 opened this issue Apr 26, 2024 · 4 comments

Comments

@t1
Copy link

t1 commented Apr 26, 2024

(moved from camunda/camunda-modeler-plugins#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

  • OS: MacOS 14.4.1
  • Camunda Modeler Version: 5.21.0
codygulley added a commit to codygulley/camunda-modeler-plugin-dracula that referenced this issue Jun 3, 2024
@codygulley
Copy link

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

codygulley added a commit to codygulley/camunda-modeler-plugin-dracula that referenced this issue Jun 3, 2024
@t1
Copy link
Author

t1 commented Jun 3, 2024

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
Copy link

codygulley commented Jun 3, 2024

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
Copy link
Author

t1 commented Jun 3, 2024

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.

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

No branches or pull requests

2 participants