Re: [tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-09-01 Thread Mat
@pmario Brief tests on Win10 chrome works good, including it surviving some arbitrary crash-attempts. Thank you very much for this Mario! <:-) -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving

Re: [tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-09-01 Thread PMario
As Jeremy suggested, I did change the html attribute name to "data-*". It actually seems to be designed with our usecase in mind. So the CSS handling should be optimized already and there are some other nice side effects. The generic browser javascript api seems to be demanding, but that's not

Re: [tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-31 Thread PMario
On Tuesday, August 30, 2016 at 11:01:48 AM UTC+2, Jeremy Ruston wrote: > > Yes. I think *it might* be a possibility fix issue 958 > and even improve > the possibilities. > > What do you mean by fixing #958? > closing, if we reach an

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-30 Thread Danielo Rodríguez
Hey! I just found a solution to my problem, how convenient ! I realized that there is something that hides the subtitle, the tags and the body, everything but the title, which was exactly what I wanted: the fold state. So what I did is add a "section" after the title, show it when needed and

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-30 Thread Mat
PMario wrote, in reply to my comment: > > Also, this would also make it possible to, in each tiddler, have a >> dedicated *style *field (just like currently there can be a *color *field) >> for quick styling of a tiddler without a separate stylesheet. I.e directly >> in the tiddler create a

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-30 Thread Danielo Rodríguez
El martes, 30 de agosto de 2016, 15:49:42 (UTC+2), Danielo Rodríguez escribió: > > > I just realized about the following on the filter of the body view > template: > > !field:hide-body[yes] > > I think it will be much easier, and powerful, and performant, and less > error prone to implement

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-30 Thread Danielo Rodríguez
I just realized about the following on the filter of the body view template: !field:hide-body[yes] I think it will be much easier, and powerful, and performant, and less error prone to implement this to all the view templates (title and tags). It will easily integrate with TW philosophy. What

Re: [tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-30 Thread Jeremy Ruston
Hi Mario > Yes. I think it might be a possibility fix issue 958 > and even improve the > possibilities. What do you mean by fixing #958? That ticket merely points out that tag names have to be encoded for use in a stylesheet. We don’t

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-30 Thread PMario
On Monday, August 29, 2016 at 5:48:34 PM UTC+2, Danielo Rodríguez wrote: > > That is awesome, and far better than using a class. > ATM I don't know, if CSS [attr] styling is considered "slow". It depends, a lot on browser optimizations. eg: drop-shadows are supported for a long time, but still

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-30 Thread PMario
On Tuesday, August 30, 2016 at 7:45:45 AM UTC+2, Mat wrote: > > Could this be used generically for any field? If one does want to style > using tags, or any other field? > Not really. The attributes we are talking about here are DOM attributes, not tiddler fields. I did change the core

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-30 Thread Tobias Beer
Hi Danielo, I think it should be possible to extend the core so that for each ViewTemplate element one could define a filter whereby the element would only be displayed if the filter had any result. Best wishes, Tobias. -- You received this message because you are subscribed to the Google

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Mat
On Monday, August 29, 2016 at 4:48:51 PM UTC+2, PMario wrote: > > > I did a test with a new ta-title attribute in the ViewTemplate. See the > attached file. > REALLY EXCELLENT! Thank you Mario Could this be used generically for any field? If one does want to style using tags, or any other

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Danielo Rodríguez
Some more tests that works with mario's setup: <$list filter="[is[current]has[caption]]"> [ta-title="<>"] .tc-title { display: none } This is awesome. Maybe a bit CSS hacky... I don't know if implementing this feature (dynamic element showing) into the core could lend to more

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Danielo Rodríguez
I just tried [ta-title="<>"] .tc-tiddler-body { background: orange; } [ta-title="<>"] .tc-title { display: none } And works flawlessly. As I said, very promising. I can't wait to see this as a core default! -- You received this message because you are subscribed to the Google Groups

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Danielo Rodríguez
Hello Mario, That is awesome, and far better than using a class. This allows very flexible selectors as *ta-title^="Draft of '"* for selecting all the tiddlers begginig with that string, including single quotes. And the browsers compatibility seems to be very wide, from IE7 and all the mayor

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread PMario
I think there needs to be a different way, Also for tags. I think the existing tc-tagged- mechanism is extremely inconvenient, because it doesn't handle special characters well. I did a test with a new ta-title attribute in the ViewTemplate. See the attached file. It modifies the

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Danielo Rodríguez
Hello Mario, That is a very good explanation. I already know all those mechanisms but it would be a very good reference for incoming users or even myself when I forget about any detail. However, I don't understand your reticence to implement a very simple feature which is already implemented

Re: [tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Thomas Elmiger
Thank you, Mario, for the detailed explanations! 2016-08-29 12:21 GMT+02:00 PMario : > On Monday, August 29, 2016 at 10:43:35 AM UTC+2, Thomas Elmiger wrote: >> >> I would not recommend to include title-hashes in CSS ... but to somehow >> filter the titles you want to apply

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread PMario
On Monday, August 29, 2016 at 10:43:35 AM UTC+2, Thomas Elmiger wrote: > > I would not recommend to include title-hashes in CSS ... but to somehow > filter the titles you want to apply special css to and transclude the > result in the CSS. > "but to somehow filter the titles" ... That's

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Mat
BTW, is there an advantage with hashes over uri-encoded titles? The latter is already in use in TW and we have e.g makeuri and in $:/core/modules/utils/utils.js there is a function tagToCssSelector that seems to mangle a tag

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Mat
PMario wrote: > > > Yea, that's easy. ... But I'm talking about the other way around. I'll > give you the hash and you give me the title (after renaming it). This is > maintenance nightmare! > Isn't that because the mechanism (if there is any) for dealing with "renamings" is insufficient?

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Danielo Rodríguez
I have opened a new issue about this topic: https://github.com/Jermolene/TiddlyWiki5/issues/2564 Dear Thomas, Mat, and of course Mario, your input would be very valuable there. -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Thomas Elmiger
Hi Mario I would not recommend to include title-hashes in CSS ... but to somehow filter the titles you want to apply special css to and transclude the result in the CSS. In my theory this should work as long as the filter works, no matter how often you change the title. Thomas > > Yea,

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Thomas Elmiger
Hi Danielo This is exactly how I would do it: The system uses the same hashing macro as the CSS developer. This makes sure, they get the same results. Am Montag, 29. August 2016 10:24:06 UTC+2 schrieb Danielo Rodríguez: > > >>> The problem with hash values is, that if the tiddler title is

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread PMario
On Monday, August 29, 2016 at 10:24:06 AM UTC+2, Danielo Rodríguez wrote: > > >>> The problem with hash values is, that if the tiddler title is changed, >> there is absolutely no way to find the "tiddler name" (responsible for the >> styling), if you only know the hash from the CSS definition.

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Danielo Rodríguez
> > >> The problem with hash values is, that if the tiddler title is changed, > there is absolutely no way to find the "tiddler name" (responsible for the > styling), if you only know the hash from the CSS definition. > > The existing way, at least gives you a hint, about the connection between

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread Danielo Rodríguez
Hello @Mat and @Thomas, I think that Thomas's idea it's a very good one, but I would use a class instead of an ID. Remember that a tiddler can be opened more than once. I don't think that there is any good reason for doing it for tags and not for titles. Probably the reason is because someone

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-29 Thread PMario
On Monday, August 29, 2016 at 12:23:24 AM UTC+2, Thomas Elmiger wrote: > > Titles can be very long and contain special characters, maybe this is the > reason, it was not done before. > There is a long standing issue at github which discusses

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-28 Thread Thomas Elmiger
Hi Mat Titles can be very long and contain special characters, maybe this is the reason, it was not done before. URI-encoding or hashing appear both to be possible, hash values tend to be shorter (if you have longer titles than "foo"). But I am not a JS hero neither. Sorry. Good night! --

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-28 Thread Mat
@Danielo and @Thomas, in deed. Identification/targeting of specific tiddlers. I don't understand why the tiddler title/ID isn't already designed to be at the outer div, but I'm guessing there is some good reason for this. However this just gave me an idea: In

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-28 Thread Thomas Elmiger
Hi Danielo and Mat This is a feature I have been missing too: identification of individual tiddlers in the story river. If we had something like this: We could target individual tiddlers with (local) CSS. A hash value is just my first idea to get an id without special characters and

[tw] Re: Hide parts of a tiddler without using a tag or global css styles

2016-08-28 Thread Mat
You can use a filter that if conditions are met shows a local (not global) style block. <$list filter=""> {display:none;} A potential problem with this is that you probably want to use it generally, on whichever tiddler fulfills some criteria, but that the "most styles" even