-
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
Sidebar-resizer: change $:/themes/...
tiddlers
#8663
base: master
Are you sure you want to change the base?
Sidebar-resizer: change $:/themes/...
tiddlers
#8663
Conversation
Run & review this pull request in StackBlitz Codeflow. |
Confirmed: BurningTreeC has already signed the Contributor License Agreement (see contributing.md) |
sorry for tagging you 😸 The calculations are now done in wikitext in the procedures. |
This works now with all absolute css metrics: Including percentage, which is easy to calculate. The internal calculations are all done in pixel, so this first converts everything to pixel, then calculates, then converts back to the corresponding value. I don't know if this can also support other relative css metrics... |
As I said above, in fixed-fluid mode I'm not settled about how the gap between story-river and sidebar should be handled. |
@BurningTreeC -- I did checkout this branch and did run it, but I can not find any resizer. I think I'm missing something |
A theme can now set the following functions in the
|
This PR is ready for review. |
Again, here's the current build: https://sidebar-resizer-config.tiddlyhost.com/ |
@@ -18,7 +18,8 @@ | |||
"tiddlywiki/tight", | |||
"tiddlywiki/heavier", | |||
"tiddlywiki/tight-heavier", | |||
"tiddlywiki/readonly" | |||
"tiddlywiki/readonly", | |||
"tiddlywiki/example" |
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.
What is tiddlywiki/example used for
Is it there for testing only, or will it stay?
Sidebar Layout: Fluid story, Fixed sidebar Story Padding Left -- Does change the distance between the left window border and the tiddler border. So if I change it from 42px to 22px the padding gets smaller. Story Padding right -- Does only move the "sidebar resizer" -- It does not change the distance between the tiddler and the sidebar -- Is that intended? |
Is it possible to double-click the sidebar-resizer -- so it triggers the "hide sidebar". |
Hi @pmario - in Fluid story, Fixed sidebar mode the visible gap between the story-river and the sidebar has always been determined by the sidebar's left padding. That's also been a bit confusing to me in the beginning. |
Yes we can do that 👍 |
Can you try the following code for: $:/core/functions/themes I did add line breaks and removed redundant Show code
|
…bal function and refactor some global functions
I've made the changes @pmario requested and found a minor error which is now fixed |
Again, here's the current build: https://sidebar-resizer-config.tiddlyhost.com/ |
should I change all occurrences of
|
Most of the settings in TW have verbose names, even if they are a bit longer. So I think it's OK as it is. The function also modifies the "Sidebar width" tiddler, which we need to keep for backwards compatibility. |
This PR uses the same mechanism as #8644 but changes the
$:/themes/tiddlywiki/vanilla/metrics/...
tiddlers directly.Note that in fixed-fluid mode thestory-river
actually changes its width but thetiddlerwidth
remains fixed width as there was no discussion yet how we handle this. I just made the tiddlers adapt to the story-river if the story-river-width goes below the tiddlerwidth.There are some design questions:
I haven't yet added the ControlPanel configurations used for storyminwidth and sidebarminwidth.This PR is just for completeness, I will update it so that we can compare with other possible solutions.
In the meantime this PR has been updated quite a bit, I've put a current build here:
https://sidebar-resizer-config.tiddlyhost.com/