On Wednesday, September 2, 2020 at 5:48:12 PM UTC+2, Mat wrote:
>
> We need to make a distinction between two major use cases:
>
>    1. tiddly fiddling
>    2. taking notes / authoring
>
> That's right, but we are at alpha stage at the moment. 
 

> ´.i.r.j.c.cp
>
>
you can open the CSS class definitions 
<https://wikilabs.github.io/editions/tick-text/#%3A%2Fplugins%2Fwikilabs%2Ftick-text%2Fstyles>
 
and you can see: j .. stands for text-align: justify. 
So if you change the CSS to

/* Text alignment */ 
.j, .justify { text-align: justify; }

You can use both. .. the string would be something like: 

`.justify.indent1.right-margin.cbox.cbox-primary your text goes here. 

I personally like the short versions more, because they are compact and 
much less to type. 

That's pretty close the "Tailwind 
<https://groups.google.com/d/msg/tiddlywikidev/c-PsNFN-Jm4/Hgp5RF4oBAAJ>" 
approach, that you brought up here in the group. ... 
 

> BUT for user #2 the indicator (´) has to be as easy to type as most other 
> things. I guess tick is OK but having to use a sepate tool for it is IMO a 
> no-go because it totally hijacks your attention. SO what are the options 
> for indicators? I've asked if a single period (.) could work but I take the 
> silence to mean "no". How about a *period AND some other standard 
> character, even a letter or a word*, e.g:
>

I did probably write it 2 times here. The DOT is _not_ possible. It will 
clash with tiddlers tagged $:/tags/Stylesheets ... Every class name starts 
with a dot. If users would start their stylesheets with: 

\rules only filteredtranscludeinline transcludeinline macrodef 
macrocallinline 

Which is done by most TW core CSS 
<https://wikilabs.github.io/editions/tick-text/#%24%3A%2Fthemes%2Ftiddlywiki%2Fsnowwhite%2Fbase>
 
definitions. It would be OK. BUT have you ever seen a user stylesheet, that 
started with the string above? ... I didn't and I personally don't use this 
string either, but it would be the only thing a dot at the start of the 
line wouldn't break users wikis. 

So that's why we CAN'T use dots at the beginning. We could use <dot><space> 
... But that is super ugly and super error prone. 


> .D My text
> -or-
> .DETAILS My text
>

We have to use "angel" brackets » for standard users and / or the "tick" ´  
for "advanced" users. I did create buttons and there will be keyboard 
shortcuts. .. So it should be simple to type them. 
 

> This make things very clear both when authoring and when reading the code. 
> It is fairly close to markdown. *And the specific indicator can itself 
> bring default styling!* In other words, there would be multiple 
> indicators, but one would likely only need very few. One could potentially 
> add actual style classes to it like so:
>

 

> .DETAILS.red My text
>

The class names are just a convention. You can make them as long or short 
as you which. See my example above. 
 

> The first period doesn't mean anything by itself.
>

.. It does mean something. Otherwise you could remove it without a problem. 
TW pars needs a "special" character, so it can recognize that something 
"special" needs to happen. 
 

> The *second *period means the same as the periods in your .c.cp.foo 
> cases. ()
>

That's right. 
 

> Again, this is *very *clear and there's minimal hijacking of brain 
> compared to defining pragmas, clicking buttons, or adding multiple classes.
>

You have to define the pragmas, otherwise nobody would know what you want 
to do. The next version will hopefully be able to import pragmas from 
tiddlers. 
 

> As for breaking at newline vs space-space-linebreak, if it is not already 
> baked into the command, this could also be commanded here:
>
> .DETAILS.NEWLINE 
> vs
> .DETAILS.PARAGRAPH
>
> (or some abbreviations)
>

space-space-newline will be a separate plugin. If you use ´.h or ´.hl you 
can do almost the same thing without the need for the plugin. 
eg: 

».h line 1
line 2
line 3

It uses these CSS settings: 
https://wikilabs.github.io/editions/tick-text/#nl-is-hard-linebreak-css 

For me the above looks much nicer then the existing code. ... _And_ it can 
do much much more

"""
line 1
line 2
line 3
"""
 

> The user must take care to not define class names that overlap with these 
> "command names". One could argue for using some other prefixing symbol than 
> the period, so to not confuse the commands with the classes BUT, again, an 
> author or note-taker is only likely to use a few such commands and there is 
> *less 
> *distraction precisely because it uses the very same character, i.e the 
> period. The author should not spend brain power on thinking about such 
> technical distinctions.
>

As I wrote. You can make your commands as long / short as you want. 

BUT

You *have to start* the line with a "tick" or an "angel" quote, except 
someone comes up with a better character that we don't use already! The 
parser needs it. The planned end result will hopefully look like this: 

configTiddlerDetailsHTML

\ticktext tick="d" tag="details" params=".notop.cbox.cbox-primary.hl" 
endString="---" open mode=block 
\ticktext tick="s" tag="summary" params=".-m"
\ticktext tick alias="´.d ´.s"

Usage tiddler 

\importpragmas configTiddlerDetailsHTML 

´ Summary Text
line 1 
line 2 
-------


And you can have as many <details><summary> elements in 1 tiddler as you 
like. All of them start with a tick. 

As you can see the configTiddler has completely redefined the meaning of 
the "tick" char. 

If you want to have different behavior you have to give it a unique 
identifier. eg

´.d or ´.details or ´.aside or ´.d or ´.paragraph or ´.p or ´.p.i for and 
indented paragraph with some special styling. 

... And please don't tell me that 

´ Summary Text
line 1 
line 2 
-------

or 


´.details Summary Text
line 1 
line 2 
-------

is complicated to write for a user. BUT they have to know, what to import, 
and we have to provide them with some basic config, that works out of the 
box. ... Without any CSS name clashes. 

have fun!
mario

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/3f23f6db-5d3a-45a3-8975-fcc43793d310o%40googlegroups.com.

Reply via email to