-
Notifications
You must be signed in to change notification settings - Fork 496
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
Provide sensible integration of Carbon into the app #4511
Comments
Moving this to the backlog as we are not deriving any value from this right now. It will be useful once we introduce more Carbon components to the app. |
Related to bpmn-io/variable-outline#4 (that can possible be closed if we decide to tract this problem here) |
Moving this to backlog for now. To be picked up whenever we work on the next Carbon-heavy topic. |
This continues to cause issues, i.e. when integrating the improved search (#4711). The core issue is that these styles, being inlined to To go carbon first I suggest the following strategy:
This way we accomplish the following:
|
Discussed with @marstamm today that the approach sketched earlier would work for plug-in development, too:
|
Moving to |
Results of my work with @abdul99ahad:
// This is good
@use '@carbon/colors';
@use '@carbon/react/scss/components/button';
// This is bad
@use '@carbon/styles';
@use '@carbon/react';
@import '@carbon/styles/css/styles.css'
All of that can be tested on carbon-hacking branch of Desktop Modeler. Test Carbon plugin is available from the status bar.
![]() Considerations:
Next steps:
|
@jarekdanielak @abdul99ahad this looks great.
What is the benefit of adding "carbon component styles" within the packages, if we could just provide all styles? Sooner than later the styles will start to clash, right, especially as component styles are integrated after our customizations ("theming")? |
Thanks @nikku. I agree that the intermediate step of providing just basic styles doesn't bring much benefit, so we can skip it and try to provide themed components. We had this idea of bundling our themed Carbon stuff into some package - let's call it
Do you think this is the way to go? If so, who's gonna drive it as a DRI? 😊 |
Yea. As we discussed, plug-in authors should provide guidance on which styles are needed to run the plug-ins, however we are probably well off to simply host all styles (with our customization), so no "carbon style" injection from plug-ins is needed. In fact it should be forbidden. Not sure about
? If this is where you want to go, then yes, I think we could do this. On the other hand plug-in authors (and other extensions) could just rely on core carbon, and on desktop modeler to apply sensible customizations. |
Currently assigned to @abdul99ahad, unless you want to pick it up today. |
As discussed in the weekly, I will be picking this item after sdk migration. so, it looks like I'm the DRI 😃 |
Even if plugins don’t explicitly apply Carbon styles, Carbon components still come with their pre-defined theme. That means we can enforce styles from the modeler, but how do we handle those built-in component theme? What we have:
Goal:
Note Not sure how to technically achieve this yet, but it’s something to research. Concerns:
|
My assumption is: Use a pattern that allows us to safely overrule the standard carbon themes, while allowing plug-ins to load after the core editor (asynchronously). This would be supported through this strategy, or a variation of it. Carbon, to my knowledge, clearly separates style and behavior (is the JS component what you refer to as "carbon themed component"?). Hence plug-in authors can use/import any Carbon components, they simply must not import styles into their bundles, but rely on them to be provided as infrastructure. For the modeler, themeing then is easy: Load Carbon styles -> Custom themes -> (later, some day maybe, plug-ins building on carbon components) and be happy ever after. Independently from the style extension discussion, plugins must re-use certain components (i.e. React) provided by the Desktop Modeler, through camunda-modeler-plugin-helpers. Any plug-in shall already today use core modeler components exposed through the helper (ref). This can be accomplished as a Proposal:
|
When you're talking about certain components, are you talking about carbon components? the plugins should use carbon components from camunda-modeler-plugin-helpers and not directly from
This is unclear |
React (especially "hooks") live by the "there can only be one" principle. Multiple versions of React inside your application (or Preact for that matter) can blow up your application. Not sure if they recently worked around that issue. |
I think it just makes sense. If we provide this rich set of utilities ("we build on top of Carbon"), why would we want plug-in authors to re-package their own part of Carbon, so we end up with 15 versions of the Carbon modal? We should provide these components, and plug-in authors can choose to use them.
Customers build their plug-ins from "standard resources", such as including @carbon/react. They bundle their plug-ins for the web, using bundlers (we recommend webpack). In fact, cf. example we already have a webpack plug-in that would do certain rewrites on the code-base, to ensure that modeler-provided resources are being used. |
What should we do?
We want to ensure that Carbon components, such as the Variables Overview are properly integrated into the existing UI. The approach I propose is "theming", by overriding the existing Carbon variables.
Why should we do it?
Ensure uses experience a coherent UI.
The text was updated successfully, but these errors were encountered: