Hi Riz
> Something like
> 
> <$list filter=<<tv-config-pagetemplate-filter>> variable="listItem">
> 
> in the $:/core/ui/PageTemplate?
> 
> 
> It will allow complex and fine grained manipulations of display like
> 
> exports.run = function() {
>     var filter;
>     if (window.matchMedia("(min-width: 960px)").matches) {
>          filter = 
> "[all[shadows+tiddlers]tag[$:/tags/PageTemplate]!has[draft.of]]";
>     } else {
>      filter = "[all[shadows+tiddlers]tag[$:/tags/PageTemplate]!has[draft.of]] 
> -$:/core/ui/PageTemplate/sidebar";
>     }
> 
> return filter;
> 
> and so on. 

That’s an interesting proposal. A few observations:

* In support of the proposal, there are precedents for the core using variables 
that are expected to be provided via a JS macro. For example, 
tv-get-export-image-link, tv-get-export-path, tv-filter-export-link etc. 
* Meanwhile, I’ve proposed in the past that we bring the same ability to 
enable/disable individual components tagged $:/tags/PageTemplate via checkboxes 
just as we do for $:/tags/PageControls, $:/tags/ViewToolbar etc. Those two 
proposals could coexist, but at the cost of some complexity
*  The example you’ve given of making the UI responsive to the viewport size 
would appear to be insufficient, in that we might plausibly want to set other 
configuration in response to the screen size (eg font, font size, margins, or 
moving tiddler toolbar buttons into the dropdown on smaller screen sizes). In 
the past I’ve envisaged solving these problems through a new mechanism that can 
provide initial values for arbitrary configuration tiddlers that depend upon 
environmental factors like the viewport size. The nice thing about that 
approach is that it’s pretty universal; we can use it to configure anything 
that is controlled by config tiddlers. In combination with my proposal above, 
your example would be a matter of setting 
$:/config/PageComponents/Visibility/$:/core/ui/PageTemplate/sidebar to “hide”

What do you think?

Best wishes

Jeremy.






> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/tiddlywikidev 
> <https://groups.google.com/group/tiddlywikidev>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywikidev/96302185-29b6-43a1-88da-b4f8c857bbfa%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywikidev/96302185-29b6-43a1-88da-b4f8c857bbfa%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/EBFEB7DB-A8C6-421C-AEC7-32C14661C2C9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to