-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
tabs-missing-explicitState-added #8108
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
That's a great idea, thanks @pmario |
@Jermolene -- Improved readability and did some more testing. Is ready to be reviewed now |
uups forgot the tw function prefix |
@Jermolene -- once Vercel built the preview it should be ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pmario
core/wiki/macros/functions.tid
Outdated
tags: $:/tags/Global | ||
|
||
<!-- This global function can be used when the eexplicitState parameter is used with tabs-macros --> | ||
\function tf.getExplicitState() [<currentTab>get[explicitState]] ~[<currentTiddler>get[explicitState]] ~[<thisTiddler>get[explicitState]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this cascade needed? It feels like it could very confusing.
I don't like having to introduce such a specific core function. It doesn't seem particularly useful outside the core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this cascade needed? It feels like it could very confusing.
It is necessary. Consider the following configuration. The story river contains
- $ControlPanel -> Info -> Cascades
- $:/core/ui/ControlPanel/Cascades
- "New Tiddler" with this code:
{{||$:/core/ui/ControlPanel/Cascades}}
With the code in the PR all 3 tabs show the same "selected tab" -- all visible tiddlers can be used to switch tabs. All of them use the right explicitState value.
If ~[<thisTiddler>get[explicitState]]
is missing from the cascade, the "New Tiddler" will be disconnected, which is not what we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like having to introduce such a specific core function. It doesn't seem particularly useful outside the core.
At the moment this "function" is a bit "lonely". But I would like to be able to do this:
<<switch-to-tab root:"$:/ControlPanel" path:"Info/Advanced/Cascades/View Template Title">>
and the tab should be selected in the $:/ControlPanel tiddler.
Every tiddler that contains a "tabs" macro will probably need more meta-data, but the functionality will be globally useful for everyone, that uses the tabs-tiddlers with that configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converted this one to a draft again, since I would like to rename and move the "global function" tiddler. |
A side effect if a mechanism like this one We should be able to globally search for parameters in the control panel and we should be able to select the right tab. -- But that's a completely different topic :) |
✅ Deploy Preview for tiddlywiki-previews ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@Jermolene -- I did some more experiments, if the whole PR is worth it. -- I think it is. This PR would be the first "baby step" As I wrote at: #8108 (comment)
If we add most of the hardcoded variables into the tiddler fields eg: How the tabsList is created, we do have enough information in the fields, that we can connect all configurations together and show them in different ways (templates).
|
This PR will allow us to "copy / paste" tabs macro definitions into new tiddlers, without the need to adjust the "explicitState" parameter in the macro.