-
-
Notifications
You must be signed in to change notification settings - Fork 9
Provide styling possibilities #10
Comments
Thank you for opening this issue, Regarding the But back to the custom CSS point, if we were to allow to inject CSS from a module, I would feel more comfortable if that CSS was scoped to the boundaries of the injected module. I would find that unexpected to have a module bleed and have side-effect across the entire product. But I might be missing a use-case you're facing, so feel free to fill me in. For global CSS, I believe an alternative avenue would be to add a custom stylesheet to Could you maybe elaborate on the following, I am not sure I grasp fully your reasoning
CompoundWe're currently developping Compound (Element's design system) to have easy to build and replicable interfaces. This manifests in two concrete things, design tokens and UI libraries Design tokens to unlock themabilityThey are atomic primitives that document and provide design decisions for every platform to consume. As part of that we have built a new set of colour scale with a big focus on accessibility. Those are not to be used on their own, and we have another layer of variable that consumes the color in a more semantic and contextual way, see our documentation around semantic tokens. The way we imagine themability to work in that context, is that someone will provide a set of a handful of colour, which will generate alternative brand colour scale. UI LibrariesUI libraries are available for web, iOS and Android. And they will help to have more consistent interfaces across the board. They'll provide the building blocks needed for UIs in a widget, a module that are a carbon copy of what exists within Element Web. At that point, the need for custom CSS is lesser – unless the systemised components do not provide the functionality you're after. https://github.com/vector-im/compound-web is still in its nascency but you can peek at what's available already. |
Closing this as answered. |
Is your feature request related to a problem? Please describe.
We tried to use module API to partially implement sidebar changes described in #8.
The following was applied:
ModuleRunner.instance.invoke
to load and render extra sidebar button with menu from a custom modulematrix-react-sdk
components like SpaceButton, IconizedContextMenu etc to make the UI to look like an Element. To be able to use these componentsmatrix-react-sdk
was added as dependency to the custom module and some dependencies where updated inmatrix-react-sdk-module-api
to be as inmatrix-react-sdk
for the code to compileWhile these steps allow to add a sidebar button it seems that it is currently not possible to provide a custom styling for components used from
matrix-react-sdk
. In particular a sidebar button (SpaceButton) needs a custom icon and to be able to use styles frommatrix-react-sdk
like here: https://github.com/matrix-org/matrix-react-sdk/blob/0d1fce37b22c0565d25c517ad8e50ff42cab78ff/res/css/structures/_SpacePanel.pcss#L199-L226Would be great if module system could allow to apply custom styling to matrix-react-sdk components and in general to new components added by custom module.
Describe the solution you'd like
Styling is possible in a similar way it is done in
matrix-react-sdk
: https://github.com/matrix-org/matrix-react-sdk/tree/develop/resDescribe alternatives you've considered
To apply custom changes to Element fork, but this is what we want to avoid and to use module system instead.
The text was updated successfully, but these errors were encountered: