Replies: 6 comments 5 replies
-
The filter part of this can be simplified to something like this in 5.1.23:
Personally I prefer to use the reveal widget only where the resultant DOM node is needed. I don't have the opportunity to look into the toolbar structure at the moment, but we would need to make sure that the change is backwards compatible and would not have any layout or performance implications. There are a few places in the other templates as well that we can optimize using some of the newer filter run prefixes and avoid the use of extra widgets. |
Beta Was this translation helpful? Give feedback.
-
I edited the title because it sounded too aggressive and rough, sometimes i can do it without this intention. Sometimes it happens to me when I think I have things clear. |
Beta Was this translation helpful? Give feedback.
-
Jeremy said in a discussion once that the list widget is preferred if animation is not needed. If there is animation, I think there should still be a way around this problem, such as actually setting classes on the reveal widget, which is already a feature, instead of putting a div inside it. |
Beta Was this translation helpful? Give feedback.
-
Hi @Alzacon @saqimtiaz @Arlen22 that's correct: firstly, that the purpose of the |
Beta Was this translation helpful? Give feedback.
-
I'm OK with removing unnecessary DOM elements. ... We only have to take care, that we don't accidentally change the |
Beta Was this translation helpful? Give feedback.
-
I couldn't solve the difference in the design in "basic" toolbars (ViewToolbar, EditToolbar and PageControls) vs EditorToolbar. EditorToolbar uses a template while the other toolbar use the basic transclusion. I didn't found how fix it without use a set widget for each button. Surely I don't have the knowledge to solve it. I think in two alternative solutions:
Here a approach of proposal with examples, there are some extra (unused) macros for the part of dropdowns. It is based on contributions of @saqimtiaz and @Arlen22 . The filter expresion only works in 5.1.23. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a "problem" with this widget. It creates messy html, many tags (
div
andspan
) with classtc-reveal
are created.It is more evident, for example, in the tiddler toolbar. A filter is used in the template for create a list, and then its items are evaluated in the
reveal
widget. I don't know if there is a special reason for its use instead of other solutions as filter expression. I found a "supercalifragilisticexpialidocious" filter expression that avoids the use of the widget.Origal snippet:
(for the part visible of the tiddler toolbar is)
Proposed snippet:
(with 2nd run in filter expression:
-[all[shadows+tiddlers]prefix[$:/config/ViewToolbarButtons/Visibility/]field:text[hide]!has[draft.of]removeprefix[$:/config/ViewToolbarButtons/Visibility/]]
)It works, even on TWs with extra buttons.
NOTE: I don't know if there is any better filter expression for it. Although with a new special filter we could try to avoid the long second run of the filter expression (
prefix
+field
+removeprefix
).Beta Was this translation helpful? Give feedback.
All reactions