-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: remove background for non-resizable textboxes #39
Conversation
We could consider using an outline when you activate direct editing via keyboard (e.g. via |
You could also use |
@marstamm Did you look into why there is a slight difference between the text while editing and when it's rendered? |
No, I did not look into that yet |
A proposal from within the team discussion:
This allows us to apply consistent styling (#39 (comment)) as we see fit in user land. We'd otherwise depend on internals (border style in this library) when adding borders for, i.e. external labels. Release the whole package as a major version. |
This is basically what this PR already does. How to add background is documented in the Changelog as well: https://github.com/bpmn-io/diagram-js-direct-editing/blob/main/CHANGELOG.md#300 |
I don't think so 😸, let me elaborate:
We could take the stance that border and background application concerns (theming) and make this library style agnostic. The current route complicates the situation as parts of the styling (resizable) are direct-editing managed, while others are not (non-resizable labels). Hence a simpler story for 3.0 could be:
|
|
||
### Breaking Changes | ||
|
||
* By default, no background is shown when editing a static sized element. To restore old behavior, add a style config when activating direct editing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be changed to
Styling of the direct editing box (background, border) is out of scope for this library. Inject your styles depending on your use using the following mechanisms:
* customize css classes
* pass via direct editing provider: ...
I think the library should offer a sensible default that works out of the box. In the case of resizable labels, this does not work without a border, since we have the "resize corner". |
This sounds like a reasonable approach for me, too. |
Then let's revert the changes and implement it in bpmn-js then. Unfortunately, I published |
This PR removes the background for non-resizable textboxes. This ensures we do not overlap with other UI elements, such as task icons or the new context pad entries.
Try it out with
closes #23
related to https://github.com/camunda/web-modeler/issues/8477