Replies: 2 comments 3 replies
-
Hi @pmario I agree, good idea. We'd also need to add palette entries for styling disabled buttons and the SVGs within them. |
Beta Was this translation helpful? Give feedback.
2 replies
-
@Jermolene ... There is no docs, how to create a new toolbar button. ... Should it be part of TW-docs or TW-DEV docs. ... It's a relatively complex configuration. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In TW 5.1.23 the button widget gets a "disabled" attribute.
This information can be used by CSS with
button:disabled{fill:#aaa;}
. ... ATM toolbar buttons don't have a possibility to find out, if they should set the disabled attribute. Toolbars heavily depend on "config tiddlers". So everything needs to be defined dynamically.The button config tiddlers have a field
condition
, which allows them to know if they should be visible. ...The proposal is, to use a similar mechanism to define "disabled"
Add a new field
condition-disabled
to the button-config tiddler. It should contain a filter, that allows the button to set thedisabled
attribute.The implementation is relatively simple and I can create a PR really fast, since I have a working implementation, that I want to use for one of my plugins.
@Jermolene, @saqimtiaz, @BurningTreeC and others ... what do you think?
$:/core/ui/EditTemplate/body/toolbar/button
only need 2<$set name=disabled filter={{!!condition-disabled}}>
and we need some CSS adjustments as mentioned above.Most work will be needed for the docs.
Beta Was this translation helpful? Give feedback.
All reactions