Suggestions for more functionality #38
Replies: 17 comments
|
Hi, thanks for your suggestions.
Great, you tidied it up for me :)
I think with Discussions we would move this "problem" to a different place. It'd be better to create a new issue for every point in your list or at least for every cluster (maximized state + shortcuts, dropdown for open tiddlers, close tiddlers the right). That way it'd be easier to have a discussion for every topic independently. But, you can leave those here. I'd like to ask you to do it for any future cases, thanks :) I'll leave the feedback for your list here soon. |
I think this should not be part of the plugin as you can add this easily manually.
Some styling should be udpated, but this should help. EDIT: udpated field value in 4th point. |
|
@crazko Thanks for the reply. Next time i will make sure, i report each issue separately. I asked you to shift this to Discussions because these are actually suggestions or ideas more than issues.
Thanks for the tips. I tried this, it worked except that it appeared to the right of the search bar in the header. Also can you suggest some sample styling and where to insert the code (i dont have much hold in coding). |
Sorry, bad
This could be a good starting point :)
.krystal-header .tc-sidebar-tab-open a,
.krystal-header .tc-sidebar-tab-open button {
display: initial;
padding: 0;
width: auto;
}
.krystal-header .tc-sidebar-tab-open > div {
padding: 0 14px;
}Update: do not affect other dropdowns in the header, add padding |
|
Thanks for the prompt reply. Dropdown now works perfectly. |
|
I have one problem after i started using the code for dropdown menu for Open tiddlers. I use projectify plug-in by nicolas petton in my wiki. It has a page control schedule button which is shown in the header tools of krystal. This button shows the schedules for today as a dropdown on clicking. After adding the code for dropdown for Open tiddler, the contents of the projectify's schedule button dropdown are arranged horizontally instead of actual vertical alignment. Can you suggest what to do for this? Or should i ask this to nicolas petton? I have attached two demos - one with issue and other without. |
|
Also when the current active tiddler is in maximized state, dropdown option of the page control buttons like palette selection button and “open” tiddlers gets hidden behind the maximized tiddler. |
Thanks for the source files. I've updated the CSS snippet above; please update it in your TiddlyWiki.
Update Krystal to version |
|
@crazko Dropdown works fine now. Thanks for the update. |
Any updates on these feature requests? |
|
Not really. I've only played with some of the implementations, but haven't had enough time to finish any of them. |
Can you please implement the suggestion numbered as “1”. It’s ok if other suggestion take more time to implement. Atleast the first one needs to be implemented. Currently I have to come out of the maximized state to see the newly opened links or tiddlers |
Until the feature you're asking is implemented, here's a solution you can try. Didn't do extensive testing, but seems OK... Create a tiddler called "mystartup.js" with the following body: /*\
title: mystartup.js
type: application/javascript
module-type: startup
Sets plugin behavior
\*/
(function () {
const MAXIMIZED_TIDDLER_CLASS = "krystal-tiddler__frame--maximized";
exports.after = ["render"];
exports.startup = function () {
$tw.hooks.addHook("th-navigating", restoreFromTiddler);
};
function tiddlerRestoreSize(tiddlerTitle) {
const tiddler = document.querySelector(
`div[data-tiddler-title="${tiddlerTitle}"]`
);
if (tiddler) {
tiddler.classList.remove(MAXIMIZED_TIDDLER_CLASS);
}
}
function restoreFromTiddler(event) {
const navigateFrom = event.navigateFromTitle;
if (!event.navigateSuppressNavigation && navigateFrom !== undefined) {
tiddlerRestoreSize(navigateFrom);
}
return event;
}
})();You also need to:
Hope this helps. |
|
That was awesome. It works nicely. Would you also extend this functionality to work when a tiddler link is opened from the "Recent" and "Open" dropdown menus in the header while another tiddler is in maximised state. |
|
Try this one. Replace your "mystartup.js" tiddler content with the following: /*\
title: mystartup.js
type: application/javascript
module-type: startup
Sets plugin behavior
\*/
(function () {
const MAXIMIZED_TIDDLER_CLASS = "krystal-tiddler__frame--maximized";
exports.after = ["render"];
exports.startup = function () {
$tw.hooks.addHook("th-navigating", restoreMaximizedTiddler);
$tw.hooks.addHook("th-new-tiddler", restoreMaximizedTiddler);
};
function restoreMaximizedTiddler(event) {
const tiddler = document.querySelector(
`div[class~="${MAXIMIZED_TIDDLER_CLASS}"]`
);
if (tiddler) {
tiddler.classList.remove(MAXIMIZED_TIDDLER_CLASS);
}
return event;
}
})();Again, not tested extensively. The code assumes there will be at most one maximized tiddler at any time. It will restore the maximized tiddler to the default size on any navigation and new-tiddler events. If you find more instances needing this functionality, try to see if you can add a hook (or event listener) in |
For the second suggestion about a keyboard shortcut for going in and out of maximized state of currently active tiddler, i experimented with the keyboard navigation shown in this link by BTC I created a tiddler titled "$:/core/ui/KeyboardShortcuts/maximize" and tagged it with "$:/tags/KeyboardShortcut" with the below wikitext in the text field.
Also add a field called "key" with "alt-M" as content. This works well in my short testing. I have attached a demo wiki |
Uh oh!
There was an error while loading. Please reload this page.
I have been using tiddlywiki for the last 6 months regularly and i mostly use Krystal plug in for the story view. Here are some of the things which i observed during my regular use that may help to increase the functionality
Sorry for the lengthy post. I think i have mentioned these things in some other places also. I am posting all these together here for easy reference. If you can start the "Discussion" thread of github, i can shift this to discussions.
All reactions