Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation for list iterators #1332

Merged
merged 4 commits into from
Jan 11, 2015

Conversation

tobibeer
Copy link
Contributor

@tobibeer tobibeer commented Jan 6, 2015

Documentation for #1330...

  • heavily modified ListWidget
    • extracted NestedLists
  • added IteratorVariables

heavily modified ListWidget
extracted NestedLists

added IteratorVariables
The list in the [[Types|$:/core/ui/MoreSideBar/Types]] tab is generated with this markup:

```
<$list filter="[!is[system]has[type]each[type]sort[type]]">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here perhaps we could transclude the actual content, something like:

<pre>
<code>
<$text text={{$:/core/ui/MoreSideBar/Types}}/>
</code>
</pre>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we perhaps make a global wikitext helper macro of that for...

$:/editions/tw5.com/wikitext-macros

?

I'm not so fond of these macro names...

<<wikitext-example>>
<<wikitext-example-without-html>>

Perhaps make them...

<<example-html>>
<<example>>

?

And add...

<<example-code>>

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the macro name <<example>> is too generic, better leave that for users own macros. I'd call this macro <<plain-text tiddler>>. Also I just realised that we should use the codeblock widget. That way the text will be syntax highlighted if the plugin is installed:

\define plain-text(tiddler)
<$codeblock language={{$tiddler$!!type}}>
<$text text={{$tiddler$}}/>
</$codeblock>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to add that to...

$:/editions/tw5.com/wikitext-macros

?

How about...

<<tw-demo>>
<<tw-demo-html>>
<<tw-code>>
<<tw-code-demo>>

?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tobibeer if we really want to change the names of those existing macros it's better to discuss that in a fresh ticket, not these line notes (they're not as persistent as comments on an issue).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll just add the other macro for now.

Didn't implement the codeblock widget as suggested here...

Jermolene#1332 (comment)

...because it would only return `undefined`.
@tobibeer
Copy link
Contributor Author

Ok, added the macro(s) and updated the examples. For now, it doesn't implement the codeblock widget as you suggested here #1332 (comment) because it would only return undefined.

@Jermolene
Copy link
Owner

For now, it doesn't implement the codeblock widget as you suggested here #1332 (comment) because it would only return undefined.

I'd got the syntax wrong; it should be:

\define plain-text(tiddler)
<$codeblock language={{$tiddler$!!type}} code={{$tiddler$}}/>

@tobibeer
Copy link
Contributor Author

Ok, thanks. Updated.

Can you perhaps write a little doc tiddler on the codeblock widget?
Thant would be nice.

Jermolene added a commit that referenced this pull request Jan 11, 2015
@Jermolene Jermolene merged commit 17f2e5e into Jermolene:master Jan 11, 2015
@Jermolene
Copy link
Owner

Thanks @tobibeer

Can you perhaps write a little doc tiddler on the codeblock widget?

If you want to have a go at this while I'm away, have a look at this file:

https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/widgets/codeblock.js

You can also see how the codeblock widget is overridden by the highlight plugin:

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

@tobibeer tobibeer deleted the list-widget-iterator branch January 11, 2015 21:30
@tobibeer
Copy link
Contributor Author

Just so I understand how /prerelease works... how come IteratorVariables is not on there yet while other parts are? Just curious. I can imagine you're perhaps doing some rewording.

@Jermolene
Copy link
Owner

@tobibeer I've pushed a new prerelease with the file extension fixed in f400587

@tobibeer
Copy link
Contributor Author

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants