[ALOY-1729] Add a "widget wide" tss file that serves as the base for the widget (think app.tss for app wide)
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | alloy, griffin-app |
Reporter | Malcolm Hollingsworth |
Assignee | Unknown |
Created | 2015-11-13T14:40:08.000+0000 |
Updated | 2020-04-06T13:28:20.000+0000 |
Description
When creating a widget it is common to have more than one view, style, controller set. Given the nature of a widget the elements would share a common style. However there is no current way to define a "widget wide" tss file as there is with the "app wide" app.tss file.
This means that the author has two choose between two poor coding techniques;
- Duplicate the common styles for each tss file within the widget
- Pollute the app.tss solely for the benefit of the widget/
This reduces the ability for a widget to fulfil the part of its original goal which was to be DRY and re-usable. The above problem highlights the lack or restrictions of re-usability.
I've run in to this all the time and have had customers mention this as well. This is a necessary feature from POV.
+1 - I agree with Rick, this would be a great feature.
Is there another way to have widget-wide styles that has been implemented already? cc: [~amukherjee] [~eharris]
This isn't supported to my knowledge (and I can't find any other tickets referencing this). It does totally seem useful to me, but I think we'd have to be careful on how this is implemented as no doubt whichever road which pick will break someone