[twdev] Re: add viewport macro to core?

2018-02-21 Thread Simon Huber

>
>
>
> I do not mind that either - as long as I do not have to install a plugin 
> just to get access to this piece of info. As in, I recommend this to core - 
> instead of a plugin. 
>

That was my initial idea, too

Now I'm just happy to have it somewhere, but I also think it would be 
better to have it in the core. It adds almost no weight.

Maybe at one point we can have it as a core feature, would be great

Simon 

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/f5526563-82f7-4959-a4a8-cfb451180531%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: add viewport macro to core?

2018-02-21 Thread Riz


I do not mind that either - as long as I do not have to install a plugin 
just to get access to this piece of info. As in, I recommend this to core - 
instead of a plugin. 

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/2abd5642-f389-44b7-8bc2-66cc27e7d496%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: add viewport macro to core?

2018-02-20 Thread Simon Huber
Hi Riz,

IMHO, shouldn't we add them as a part of existing $:/Info tiddlers? That is 
> where it is expected, right? If we do that, third party themes which 
> radically changes outlook by differing Pagetemplates can make use of it. 
> Please consider if not too late already.
>
> I used $:/state tiddlers because they don't trigger a save-wiki process
If you save a wik html file -i in my case on chromium - a bottom download 
bar appears, that causes a page resize and another dimension change which 
causes it to save again
with auto saving enabled this could be bad

I think it's not too late to change anything but the $:/state tiddlers 
seemed best to me

Simon

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/1cccb817-2eb1-4769-9cd0-41dd4577f0a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: add viewport macro to core?

2018-02-20 Thread Riz
IMHO, shouldn't we add them as a part of existing $:/Info tiddlers? That is 
where it is expected, right? If we do that, third party themes which 
radically changes outlook by differing Pagetemplates can make use of it. 
Please consider if not too late already.

sincerely,
Riz

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/13608af9-9aa2-472e-bf1d-efea0009b776%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: add viewport macro to core?

2018-02-19 Thread Simon Huber

>
>
>
>> Could you name some?
>>
>>
>>
> Loading separate page-templates for mobile platform would be a start. 
>

 yes, great Idea!

The dynaview plugin now adds an option to save viewport dimensions 
dynamically :) !

Simon

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/f8dd6e6f-4e68-497a-bf73-10828aeba263%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: add viewport macro to core?

2018-02-16 Thread Simon Huber
Thanks Jeremy,

I've made a pull request 
here: https://github.com/Jermolene/TiddlyWiki5/pull/3126

best wishes,
Simon

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/725cd878-4674-4971-b86f-71d613c9c4fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: add viewport macro to core?

2018-02-16 Thread Jeremy Ruston
Hi Simon

> should it do this by default or by enabling it through a config tiddler?

Yes, great idea, and a checkbox in the plugin control panel would be nice.

Best wishes

Jeremy.

> 
> Best wishes
> 
> Jeremy
> 
> Simon 
> 
> -- 
> 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 tiddlywikidev+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to tiddlywikidev@googlegroups.com 
> .
> 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/de94fa0f-bd17-4029-ac84-11bf9019964b%40googlegroups.com
>  
> .
> For more options, visit 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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/81DF1385-A036-43B4-A44C-0A6D42B40A04%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: add viewport macro to core?

2018-02-16 Thread Simon Huber
Thank you Jeremy,


> I think the way to do this is as a startup module that listens for 
> viewport size changes and then updates a couple of state tiddlers with the 
> values. The changes to those tiddlers would then trigger any necessary 
> rerendering via the refresh process.
>
> The new DynaView plugin already listens for scroll and resize events, and 
> so it might be reasonable to extend it with these features:
>
>
> https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/dynaview/dynaview.js
>

yes this looks perfect,
should it do this by default or by enabling it through a config tiddler?

>
> Best wishes
>
> Jeremy
>
> Simon 

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/de94fa0f-bd17-4029-ac84-11bf9019964b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: add viewport macro to core?

2018-02-16 Thread Jeremy Ruston
Hi Simon

I think the way to do this is as a startup module that listens for viewport 
size changes and then updates a couple of state tiddlers with the values. The 
changes to those tiddlers would then trigger any necessary rerendering via the 
refresh process.

The new DynaView plugin already listens for scroll and resize events, and so it 
might be reasonable to extend it with these features:

https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/dynaview/dynaview.js
 


Best wishes

Jeremy


> On 16 Feb 2018, at 10:59, Simon Huber  wrote:
> 
> 
> 
> Am Freitag, 16. Februar 2018 11:29:38 UTC+1 schrieb PMario:
> Hi,
> 
> On Friday, February 16, 2018 at 10:21:26 AM UTC+1, Simon Huber wrote:
> I'd like to propose adding a macro to the TW core functionality that returns 
> the viewport dimensions
> The use-cases can be many
> 
> Could you name some?
> 
> executing, revealing, listing different things if the viewport width/height 
> is lower than x, something else if higher
> one can do things in css with vw of media queries, but inside macros or 
> widgets I couldn't find a way to get the viewport dimensions
> 
> I'm a little bit concerned, that a macro won't be always updated. ... Since 
> they are only calculated, if rendered. ... But I may be wrong here, without 
> tests. 
> 
> no you're right! it doesn't update. Should I go the widget way?
> 
> -m
> 
> thanks Mario!
> 
> Simon 
> 
> -- 
> 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 tiddlywikidev+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to tiddlywikidev@googlegroups.com 
> .
> 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/e751f885-5861-476c-9ae6-358a6ab1ecaf%40googlegroups.com
>  
> .
> For more options, visit 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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/1926CA60-69F2-4660-A8FB-5D595EED8968%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: add viewport macro to core?

2018-02-16 Thread Simon Huber


Am Freitag, 16. Februar 2018 11:29:38 UTC+1 schrieb PMario:
>
> Hi,
>
> On Friday, February 16, 2018 at 10:21:26 AM UTC+1, Simon Huber wrote:
>>
>> I'd like to propose adding a macro to the TW core functionality that 
>> returns the viewport dimensions
>> The use-cases can be many 
>>
>
> Could you name some?
>

executing, revealing, listing different things if the viewport width/height 
is lower than x, something else if higher
one can do things in css with vw of media queries, but inside macros or 
widgets I couldn't find a way to get the viewport dimensions

>
> I'm a little bit concerned, that a macro won't be always updated. ... 
> Since they are only calculated, if rendered. ... But I may be wrong here, 
> without tests. 
>

no you're right! it doesn't update. Should I go the widget way?

>
> -m
>

thanks Mario!

Simon 

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/e751f885-5861-476c-9ae6-358a6ab1ecaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: add viewport macro to core?

2018-02-16 Thread PMario
Hi,

On Friday, February 16, 2018 at 10:21:26 AM UTC+1, Simon Huber wrote:
>
> I'd like to propose adding a macro to the TW core functionality that 
> returns the viewport dimensions
> The use-cases can be many 
>

Could you name some?

I'm a little bit concerned, that a macro won't be always updated. ... Since 
they are only calculated, if rendered. ... But I may be wrong here, without 
tests. 

-m

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/6b2d1718-088a-4702-9196-483e93c6f6c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.