[TW5] Transcluding a Core Button is Hidden in pop-out Window

123 views
Skip to first unread message

Jeff Vance

unread,
Mar 28, 2017, 12:25:31 PM3/28/17
to TiddlyWiki
I put the following in several tiddlers as a shortcut to the "New Here" button.  I didn't want to put it permanently in the toolbar, but these particular tiddlers generate index table of tiddlers tagged with this one. So I thought it would be convenient to put a "New Here" icon at the bottom of the table. 

{{||$:/core/ui/Buttons/new-here}}

This works, but I noticed that if I Pop-Out this tiddler into a new window, the icon doesn't appear.  I can still click in that spot and it acts as if the icon is there, but I can't see it.  Any ideas why this happens and how to fix it?

Jeff


@TiddlyTweeter

unread,
Mar 29, 2017, 7:42:05 AM3/29/17
to TiddlyWiki
Good point.

I noticed that myself. It seems to affect other "$:/core/ui/Buttons" too. They can get replaced by a placeholder when you use "Open In New Window" from a Tiddler.

I'm unclear why that happens. I'm sure its not the intended behaviour

Best wishes
Josiah

PMario

unread,
Mar 29, 2017, 8:19:21 AM3/29/17
to TiddlyWiki
On Tuesday, March 28, 2017 at 6:25:31 PM UTC+2, Jeff Vance wrote:
This works, but I noticed that if I Pop-Out this tiddler into a new window, the icon doesn't appear.  I can still click in that spot and it acts as if the icon is there, but I can't see it.  Any ideas why this happens and how to fix it?

I suppose you mean the tiddler toolbar command: "Open in new window"

This command renders the tiddler content and opens it in a new tab. That's it.
There is no js code. So this tiddler is a "static" representation of the tiddler. ... It has no idea about other tiddlers.

That's the intended behaviour.

eg:

This is a test: {{||$:/core/ui/Buttons/new-here}}

creates:

<html>
  <head>
    <style>...a lot of tw CSS...</style>
    <title>New Tiddler</title>
  </head>
  <body class="tc-body tc-single-tiddler-window">
    <p>This is a test: <button class="" title="Create a new tiddler tagged with this one" aria-label="new here"></button>
    </p>
  </body>
</html>


Since the CSS is exported, it's possible to see the content in a formatted way. ... But there is no interaction.

have fun!
mario


Jeremy Ruston

unread,
Mar 29, 2017, 9:53:31 AM3/29/17
to tiddl...@googlegroups.com
On 28 Mar 2017, at 17:25, Jeff Vance <vanc...@gmail.com> wrote:

I put the following in several tiddlers as a shortcut to the "New Here" button.  I didn't want to put it permanently in the toolbar, but these particular tiddlers generate index table of tiddlers tagged with this one. So I thought it would be convenient to put a "New Here" icon at the bottom of the table.  

{{||$:/core/ui/Buttons/new-here}}

This works, but I noticed that if I Pop-Out this tiddler into a new window, the icon doesn't appear.  I can still click in that spot and it acts as if the icon is there, but I can't see it.  Any ideas why this happens and how to fix it?

The reason that nothing is appearing is because the toolbar buttons require the variables tv-config-toolbar-icons and tv-config-toolbar-text to control whether the text and or the icon is displayed. You can use them like this:

<$vars tv-config-toolbar-icons="yes">
{{||$:/core/ui/Buttons/new-here}}
</$vars>

I suppose you mean the tiddler toolbar command: "Open in new window"

This command renders the tiddler content and opens it in a new tab. That's it.
There is no js code. So this tiddler is a "static" representation of the tiddler. ... It has no idea about other tiddlers.

That is actually not correct. The windows opened by the “Open in new window” toolbar button are fully functional wikitext windows. The reason that some things don’t work in that context is generally because the new window doesn’t use the full page template, and thus omits some initialisation present in the main window.

Best wishes

Jeremy.



That's the intended behaviour.

eg:

This is a test: {{||$:/core/ui/Buttons/new-here}}

creates:

<html>
  <head>
    <style>...a lot of tw CSS...</style>
    <title>New Tiddler</title>
  </head>
  <body class="tc-body tc-single-tiddler-window">
    <p>This is a test: <button class="" title="Create a new tiddler tagged with this one" aria-label="new here"></button>
    </p>
  </body>
</html>


Since the CSS is exported, it's possible to see the content in a formatted way. ... But there is no interaction.

have fun!
mario



--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/57e2850f-f9e4-4fd5-a38b-f6cf1b7dd497%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

@TiddlyTweeter

unread,
Mar 29, 2017, 10:22:20 AM3/29/17
to tiddl...@googlegroups.com
Ciao Jeremy

Thank you for that clarification. I was to about to comment to PMario that most everything still functions in  Tiddlers spawned from“Open in new window”.

Functionally it is VERY useful for when you need an "Overview" tiddler constantly open. I use it habitually for Telmiger's ToDoNow. People who have either large monitors or more than one can really leverage using that feature.

Its also useful for printing just one Tiddler.

Its also useful if you want to just save "a page".

Its also useful if you want to extract just the rendered HTML in the body section.

I have been confused why sometimes some graphics don't appear. There are other cases too where some styling seems to be missing. Slowly I begin to understand why.

Best wishes
Josiah

@TiddlyTweeter

unread,
Mar 29, 2017, 2:15:47 PM3/29/17
to TiddlyWiki
Over here: https://groups.google.com/d/msg/tiddlywiki/A9DTfpJyzuQ/e49qdXffAQAJ an interesting point was raised about the LINGO of "Open in new window." Out of the context of specific Tiddlers I do think its a bit confusing. Probably a confusion shared with the net in general when that phrase is used? Open WHAT in a new window? The deep connectedness of the child window Tiddler to mother TW is not so clear in the language.

Just a comment

Best wishes
Josiah

Thomas Elmiger

unread,
Mar 29, 2017, 4:09:55 PM3/29/17
to TiddlyWiki
Hi there!

I tried to fix some issues described by Josiah (aka TiddlyTweeter) over there

@TiddlyTweeter:
Over here: https://groups.google.com/d/msg/tiddlywiki/A9DTfpJyzuQ/e49qdXffAQAJ an interesting point was raised about the LINGO of "Open in new window."

Using the fix Jeremy suggested here I was able to present the save button* also in the new window … but some issues remain:
  • the dirty-indicator does not show up, as the body tag of the new window doesn’t get the tc-dirty class like the body in the main window does
  • the class tc-btn-invisible is missing on my save-button – I fixed that by duplicating the corresponding styles to my own class
  • the font size is slightly smaller in the new window (it is calculated to 14px instead of 15px font-size) in the case of my list – I can’t say why
  • … there might be other differences I didn’t notice

Jeremy (or others), can you give further advice on reasons and hints to fix these effects?


You can play with my app here: https://tid.li/tw5/hacks.html#ToDoNow


All the best,

Thomas


*Here’s my fixed code for the save button:


\define teBigSaveButton(class:"te-third")
<$vars tv-config-toolbar-icons="yes">
@@.te-btn-big.$class$ {{$:/core/ui/Buttons/save-wiki}}@@
</$vars>
\end



@TiddlyTweeter

unread,
Apr 1, 2017, 10:44:05 AM4/1/17
to TiddlyWiki
Ciao Thomas

Its already an improvement. Thanks!

"tc-dirty" I assume that is not about a porno section?

Is it something to do with whether the save button is Red, not Black?

Best wishes
Josiah

Thomas Elmiger

unread,
Apr 1, 2017, 11:38:39 AM4/1/17
to TiddlyWiki
Ciao Josiah

That’s right: the red color is applied if the <body> of the document has the class "tc-dirty". TW seems to dynamically apply this as soon as a tiddler is changed … but only in the main window.

That’s something I can’t fix.

Cheers, Thomas

@TiddlyTweeter

unread,
Apr 1, 2017, 11:53:39 AM4/1/17
to TiddlyWiki
Ciao Thomas

Judging by earlier replies I hope it might be.

You need input?

The whole thing with being able to use supplemental ACTIVE views (via "Open in new window") gets more salience as monitors get bigger & users have more than one.

My tuppence worth.

Best wishes
Josiah
Reply all
Reply to author
Forward
0 new messages