Would it make sense to provide a search for each class and where it appears in tiddlywiki with options excluding its definition in themes, stylesheets and pallets?
That is help the user to identify where it is in use?
Another method I have played with is the ability to toggle a css content to display the class on screen so you can look for it.
I moved this discussion into an new thread, since itâs only indirectly related with palette colour values
I do have a plugin, which is called click-effect, which does exactly what the name says.
But there is a second mode: Element Pulse
which highlights a area, that belongs together if it is clicked with the mouse.
It should be possible to extend the function, to show the element eg: DIV and classes, if they are assigned. .. BUT clicking an element is only half of the truth. ..
Eg: an image button like B in TW are 2 elements. The HTML BUTTON
and an SVG child.
If the user clicks the SVG they only get that info, but itâs the BUTTON that has the classes assigned, that make most of the styling.
So the only way to really see, whatâs going on is the browser-dev tools and Right-Click â Inspect
The advantage of outline is, that it doesnât change the browser layout. border would change that. So the layout would look slightly different, when the border is removed again, which makes work harder.
So from your prior work @pmario we could simply build a stylesheet containing all known classes and the ability to toggle each to be displayed with an outline.
This is the approach I was also suggesting to highlight the elements from the pallet.
Ideally we could parse all tiddler type css and tag stylesheet to present a list of such classes to optionally toggle their outline.
Another way to implement this is to pass the appropriate CSS or stylesheet tiddlers into an âinner wikiâ that one can use to observe where the various classes are applied. A custom view of empty.html basically providing a visual map of the UI css elements.
Thatâs not possible. The elements in the palette are colour definitions used with a macro inside a class definition in the base.tid file which is part of the vanilla theme.
So the only way to find, where and how something is used, is to make a âfull text searchâ in all .tid files
First you need to have a look at the palette, to get the colour name eg: alert-background
Then you need to search in base.tid for the colour name.
The colour can be used several times in several class definitions.
If you know the class eg: tc-tab-buttons, you need to do a second full-text search in all .tid and .js files to find
4.1 the .tid templates, where the class is used
4.2 the .js files show you if a class is dynamically assigned by the core code. eg: tc-tiddlylink-resolved, which shows, that a tiddler exists. tc-tiddlylink-missing shows itâs missing.
Thatâs the basic steps you have to follow, to find out, where a colour is used. ..
OR
change the colour in the palette editor and see, what happens. ⌠Thatâs much easier, once itâs merged.
I do see value in providing tools to automate this kind of search process for any css elements. Tiddlywiki is self documenting however when it comes to css quite intimidating because of how many paths you have to follow.
It is quite easy to build in automation to tiddlywiki, as a plugin to make it easier interrogating it.
We could say what we need is to take the explicit knowledge of how tiddlywikis various elements come together and provide this knowledge in a tool that helps one investigate this. We can do a lot without even reverting to inspect, but this too can be part of the guidance.
It seems to me rather than every man and his dog, woman and her cat having to deconstruct, learn and hack their way to this information, we need only do it once and embed this in a tool. Even if its cumbersome it will still be easier than âin a vacuumâ.
But then we may still come up with a nice interactive interface once the explicit knowledge is open for all to see.
One tool is called documentation and everyone can take action to improve it.
The second set of tools are the browser dev tools. Even if you have a look at all the TW stylesheet definitions, only the browser knows, which rule is really used. The rule thatâs used is the one with the highest specificity.
base.tid is part of the TW core. ⌠But itâs possible that users add their own stylesheets and overwrite the core styles. ⌠That shouldnât happen but most newbie users donât care about, what should be done. They use the first thing that works.
The 3rd and non existent tool may be a special search that follows the steps I showed in the other post. ⌠But in the end, itâs the browser dev-tools, that will tell you whatâs going on.
If this the case so be it. But I would suggest this being the case means we have not provided sufficient documentation or the tools to mange tiddlywikis CSS especially for newer users.
If the documentation says âThe way to identify the definitive CSS in use after customisations is to use the inspectâ and provides a little guidance on this all the better.
For example Both Chrome and Firefox allow you to point and r-click any part of the screen and inspect. Each browser has the ability to copy selectors or resulting styles. A little guidance on this would make life much easier.
Then what does one do with the result of an investigation inspect or otherwise to find where it is set and how to specify targeted css?