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

Discretionary Hyphen (00AD) not respected #1383

Closed
LinqLover opened this issue Dec 2, 2020 · 8 comments
Closed

Discretionary Hyphen (00AD) not respected #1383

LinqLover opened this issue Dec 2, 2020 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@LinqLover
Copy link

Describe the Bug

When rendering a BPMN element, such as an activity, discretionary hyphens (code point 00AD; on Windows, they can be typed using ALT + 0173) are not respected. As a result, long words cannot be wrapped correctly.

Steps to Reproduce

  1. Create an activity
  2. Name it:
    Fight Hippopoto­monstro­sesquippe­daliophobia
    
    (Note that most web browsers will not even show the discretionary hyphens in the code box, but still you can copy them into another application.)
  3. During editing, the hyphens are used for word-wrapping correctly:
    image|40%
  4. But after accepting the label, the word-wrapping disappears and the hyphens are no longer respected:
    image|40%

Expected Behavior

Discretionary hyphens should be respected correctly for word-wrapping.

Environment

@LinqLover LinqLover added the bug Something isn't working label Dec 2, 2020
@azeghers
Copy link
Contributor

azeghers commented Dec 4, 2020

Hey Linq,

First of all, thank you for this issue, I've learned about a character I didn't know before 😄
I'm posting a screenshot of a tool that shows special/invisible characters because it isn't clear in your step 2 that you're adding those hyphens to the word.

shy

I have a couple of questions for you regarding this topic :

  • Have you considered using regular hyphens and line-breaks for those cases?
  • How often are you confronted to the usage of words too long to visually fit in bpmn task elements? Would you consider this problem a blocker for your purposes?

@LinqLover
Copy link
Author

Thanks for the reply! :D

Have you considered using regular hyphens and line-breaks for those cases?

Yes, I could do that, but I think this is a suboptimal solution in terms of maintenance. :-)

Would you consider this problem a blocker for your purposes?

No, it's just about convenience.

How often are you confronted to the usage of words too long to visually fit in bpmn task elements?

I'm using German terms for my models, and in German, compound words are not separated by a space, e.g. "Modellierungsrichtlinie" rather than "modeling guideline". So yes, actually, I miss a proper word-wrapping quite frequently. Automatic word-wrapping would be best, of course, but I see this would be a major effort ...

@azeghers
Copy link
Contributor

azeghers commented Dec 4, 2020

I will look into how labels are formatted and get back to you. 🙂

@nikku nikku added the ready Ready to be worked on label Dec 10, 2020
nikku added a commit to bpmn-io/diagram-js that referenced this issue Dec 10, 2020
@azeghers azeghers added in progress Currently worked on and removed ready Ready to be worked on labels Dec 14, 2020 — with bpmn-io-tasks
nikku added a commit to bpmn-io/diagram-js that referenced this issue Dec 14, 2020
* soft breaks ("discretionary hyphens") are taken into
  account during word splitting
* a hyphen is rendered, IF a softbreak becomes an actual
  break

Related to bpmn-io/bpmn-js#1383
nikku added a commit to bpmn-io/diagram-js that referenced this issue Dec 14, 2020
* soft breaks ("discretionary hyphens") are taken into
  account during word splitting
* a hyphen is rendered, IF a softbreak becomes an actual
  break

Related to bpmn-io/bpmn-js#1383
fake-join bot pushed a commit to bpmn-io/diagram-js that referenced this issue Dec 14, 2020
* soft breaks ("discretionary hyphens") are taken into
  account during word splitting
* a hyphen is rendered, IF a softbreak becomes an actual
  break

Related to bpmn-io/bpmn-js#1383
@azeghers azeghers added fixed upstream Requires integration of upstream change and removed in progress Currently worked on labels Dec 14, 2020 — with bpmn-io-tasks
nikku added a commit that referenced this issue Dec 17, 2020
@fake-join fake-join bot closed this as completed in 2cb18c9 Dec 17, 2020
@bpmn-io-tasks bpmn-io-tasks bot removed the fixed upstream Requires integration of upstream change label Dec 17, 2020
@LinqLover
Copy link
Author

Great, thanks for implementing! Looking forward to the next release :-)

@fml2
Copy link

fml2 commented Dec 17, 2020

Will these chars be supported and interpreted correctly both in the camunda modeler and in the cockpit when displaying process models and process instances?

@nikku
Copy link
Member

nikku commented Dec 17, 2020

Will these chars be supported and interpreted correctly both in the camunda modeler and in the cockpit when displaying process models and process instances?

Nope.

@fml2
Copy link

fml2 commented Dec 17, 2020

Where will they be supported then? Isn't the bpmn.js library used in both products? Thank you.

@nikku
Copy link
Member

nikku commented Dec 17, 2020

The feature will first land in the Camunda Modeler, likely with the next modeler release. The feature may end up in the next version of Cockpit, once the Camunda Platform team decides to update the dependency.

I am afraid there does not exist an automatic update step here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants