-
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
tv-override-missing-links: fix links to missing tiddlers #3530
Conversation
this lets us set `tv-override-missing-links` true so that we can fix edge cases like the `Filter` dropdown in the `Advanced Search` when `enable missing links` is unchecked in the `Settings` tab of the Control Panel
not needed here
Hi @BurningTreeC this is a really interesting one. I'm afraid that merging the original PR #2347 was a mistake; it's what happens if I let my guard down and merge PRs without properly thinking them through. (To be clear, the fault here is entirely mine: it's my responsibility to act as a gatekeeper and not blindly wave things through). It should never have been a global setting, but instead should have always been controlled by a variable |
@Jermolene is this fix here that much worse in terms of performance? |
The fix here is more complex than it needs to be because of the earlier mistake. That contributes to making the core code harder to follow and understand, so I'd be inlined to clean things up properly. |
I understand - what about backwards compatibility @Jermolene? Here I'd be much more concerned than in #3572 |
Now the variable used is |
I think the semantics of the revised implementation I'm proposing wouldn't introduce any problems; there would still be support for $:/config/MissingLinks but the problem areas would be fixed, and there'd be a new config variable. |
... if the variable gets set on top of the pagetemplate?
@Jermolene , I've updated the PR ... I think this is similar to how you wanted it to be ... ? |
Great stuff, thank you @BurningTreeC! |
@Jermolene, is it correct that the link widget doesn't have to refresh anymore if $:/config/MissingLinks changes? because I removed that |
Yes, that's right. The set widget in the page template will ensure that the entire page gets refreshed if $:/config/MissingLinks changes |
Perfect, thanks! |
Whoops, I just started updating the docs and realised that we may have inadvertently flipped the logic of the $:/config/MissingLinks variable. Before this PR, setting that config tiddler to "no" would cause missing links to be hidden. Afterwards, setting it to "yes" will cause missing links to be hidden. So, we need to change the variable to "tv-show-missing-links", and default it to "yes" if its not defined. |
Ups, my mistake! I didn't think about it at all |
…yWiki#3530) * add tv-override-missing-links variable this lets us set `tv-override-missing-links` true so that we can fix edge cases like the `Filter` dropdown in the `Advanced Search` when `enable missing links` is unchecked in the `Settings` tab of the Control Panel * add tv-override-missing-links to filter dropdown * add tv-override-missing-links to type dropdown * add tv-override-missing-links to fieldname dropd * add tv-override-missing-links to TagManager(icons) * undo tv-override-missing-links TagManager not needed here * Update link.js * Update dropdown.tid * Update fields.tid * Update type.tid * Update dropdown.tid * Update link.js * simplify all together * add tv-hide-missing-links to pagetemplate * do we need to refresh here... ... if the variable gets set on top of the pagetemplate?
this adds a variable
tv-override-missing-links
that gets detected by thelink widget
that enables us to render links like in the
Filter
dropdown of theAdvanced Search
, even ifenable links to missing tiddlers
is unchecked in the Control-Panel-Settings-TabSee discussion in the groups: https://groups.google.com/forum/#!topic/TiddlyWiki/E7qL1-hOOxM
fixes: