-
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
Add true "single tiddler mode" #3412
base: master
Are you sure you want to change the base?
Conversation
* Storyviews expose a static "singleTiddlerMode" property to determine if they require single tiddler mode * Navigator widget adds a "singleTiddlerMode" attribute; when set to "yes", the story list is entirely replaced during navigation * Navigator widget now updates "list" field of $:/HistoryList with a more accessible version of the history list * Add a getstoryviewsingletiddlermode[] operator so that we can obtain the story view STM status for passing to the navigator widget
Much more useful than the "open" tab when in single tiddler mode
And fix a bug whereby we weren't refreshing when some attributes changed
… the history stack
Instead of introducing a new "History" tab to the sidebar we make the existing "Open" tab mutate into a "History" tab when in Single Tiddler Mode.
There has been some discussion of these changes in this Google Groups thread. Based on that feedback, I've posted an update to https://tiddlywiki.com/prerelease with a couple of further changes:
I consider this to be a major change to TiddlyWiki, and so would welcome feedback from everyone but I'll mention @giffmex @jdjdjdjdjdjd @telmiger as they may not be tracking this PR. The questions I'm curious about:
It would also be interesting to test these changes against the kind of plugins and hacks that manipulate the story list. |
Hi Jeremy
I finally got back in my office and went to try out the single tiddler
mode. I downloaded the prerelease. Now I am looking everywhere to find the
control to make it single tiddler mode. I tried the down arrow in the
tiddler viewtoolbar, the control panel, starting with the story view tab,
theme tab, and settings tab, the edit toolbar, the tools tab in the
sidebar, and a search for "single". Nothing. If you want me to try it out,
you have to tell me how to get to that mode. Blessings.
David Gifford
Mexico team leader, Mexico City
*Resonate Global Mission*
*Engaging People. Embracing Christ.*
A Ministry of the Christian Reformed Church
resonateglobalmission.org
…On Thu, Aug 30, 2018 at 8:13 AM, Jeremy Ruston ***@***.***> wrote:
There has been some discussion of these changes in this Google Groups
thread
<https://groups.google.com/d/topic/tiddlywiki/gXAewvbZAX0/discussion>.
Based on that feedback, I've posted an update to https://tiddlywiki.com/
prerelease with a couple of further changes:
- The tiddler 'close' button now navigates to the previous tiddler in
the history stack
- The "open" tab in the sidebar now mutates into a "history" tab when
single tiddler mode is engaged
I consider this to be a major change to TiddlyWiki, and so would welcome
feedback from everyone but I'll mention @giffmex
<https://github.com/giffmex> @jdjdjdjdjdjd
<https://github.com/jdjdjdjdjdjd> @telmiger <https://github.com/telmiger>
as they may not be tracking this PR.
The questions I'm curious about:
- What do people think of the new behaviour of the "open" tab? It
doesn't feel like a great solution to me -- there's no precedent for tabs
coming and going elsewhere. But equally, I didn't like having "history" as
a separate tab
- Is the navigating backwards action on "close tiddler" working as
you'd expect?
It would also be interesting to test these changes against the kind of
plugins and hacks that manipulate the story list.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3412 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACfdQvJBTK2Xiy0EfrDA_9y-Hvd7IVuSks5uV-TkgaJpZM4WMz_W>
.
|
BTW, two unrelated observations:
1) The tools tab in the sidebar should be in alphabetical order. There is
no clear logic to the order.
2) After being used to the way the Open tab works, the History tab makes me
feel like those are still open and need to be closed. But that is probably
just me. I don't think a brand new user would see it that way, only a long
term user. But I mention my reaction in case there is an easy way to
diminish that feeling.
Blessings.
David Gifford
Mexico team leader, Mexico City
*Resonate Global Mission*
*Engaging People. Embracing Christ.*
A Ministry of the Christian Reformed Church
resonateglobalmission.org
…On Thu, Aug 30, 2018 at 7:01 PM, David Gifford ***@***.***> wrote:
Hi Jeremy
I finally got back in my office and went to try out the single tiddler
mode. I downloaded the prerelease. Now I am looking everywhere to find the
control to make it single tiddler mode. I tried the down arrow in the
tiddler viewtoolbar, the control panel, starting with the story view tab,
theme tab, and settings tab, the edit toolbar, the tools tab in the
sidebar, and a search for "single". Nothing. If you want me to try it out,
you have to tell me how to get to that mode. Blessings.
David Gifford
Mexico team leader, Mexico City
*Resonate Global Mission*
*Engaging People. Embracing Christ.*
A Ministry of the Christian Reformed Church
resonateglobalmission.org
On Thu, Aug 30, 2018 at 8:13 AM, Jeremy Ruston ***@***.***>
wrote:
> There has been some discussion of these changes in this Google Groups
> thread
> <https://groups.google.com/d/topic/tiddlywiki/gXAewvbZAX0/discussion>.
>
> Based on that feedback, I've posted an update to
> https://tiddlywiki.com/prerelease with a couple of further changes:
>
> - The tiddler 'close' button now navigates to the previous tiddler in
> the history stack
> - The "open" tab in the sidebar now mutates into a "history" tab when
> single tiddler mode is engaged
>
> I consider this to be a major change to TiddlyWiki, and so would welcome
> feedback from everyone but I'll mention @giffmex
> <https://github.com/giffmex> @jdjdjdjdjdjd
> <https://github.com/jdjdjdjdjdjd> @telmiger <https://github.com/telmiger>
> as they may not be tracking this PR.
>
> The questions I'm curious about:
>
> - What do people think of the new behaviour of the "open" tab? It
> doesn't feel like a great solution to me -- there's no precedent for tabs
> coming and going elsewhere. But equally, I didn't like having "history" as
> a separate tab
> - Is the navigating backwards action on "close tiddler" working as
> you'd expect?
>
> It would also be interesting to test these changes against the kind of
> plugins and hacks that manipulate the story list.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#3412 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ACfdQvJBTK2Xiy0EfrDA_9y-Hvd7IVuSks5uV-TkgaJpZM4WMz_W>
> .
>
|
oops, sorry, I hit reply in my work email and that adds the long and religious signature that some people do not appreciate. |
@giffmex ... It's the "zooming" story view |
Hi Dave
Apologies, I forgot to push the latest update to tw.com <http://tw.com/>; there should be an introductory paragraph explaining what’s going on.
https://tiddlywiki.com/prerelease/ <https://tiddlywiki.com/prerelease/>
Best wishes
Jeremy
… On 31 Aug 2018, at 06:00, Mario Pietsch ***@***.***> wrote:
@giffmex <https://github.com/giffmex> ... It's the "zooming" story view
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#3412 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAKqqSJi9WMhPkxBb4y3-RbXENtOd7JMks5uWMLegaJpZM4WMz_W>.
|
Export our filter functions | ||
*/ | ||
|
||
exports.getstoryviewsingletiddlermode = function(source,operator,options) { |
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.
wouldn't it be better to have a function "getstoryviewmode", that returns the mode name? ...
IMO we would need a new function for every other existing and future mode too!
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.
Hi @pmario good point, I'll fix.
Ahh thank you, Mario and Jeremy. I assumed zoomin was going to continue being its own thing and that single tiddler mode was going to be separate. I have to run, but when I come back I will experiment and give feedback. |
core/ui/PageTemplate.tid
Outdated
@@ -14,7 +14,7 @@ tc-page-container tc-page-view-$(storyviewTitle)$ tc-language-$(languageTitle)$ | |||
|
|||
<$set name="storyviewTitle" value={{$:/view}}> | |||
|
|||
<$set name="tv-storyview-single-tiddler-mode" value={{{ [<storyviewTitle>getstoryviewsingletiddlermode[]] }}}> | |||
<$set name="tv-storyview-single-tiddler-mode" value={{{ [<storyviewTitle>getstoryviewmode[singletiddlermode]] }}}> |
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'm not sure, but I think the history-tab caption needs to be changed too?
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.
Hi @pmario the open/history tab caption is handled here:
https://github.com/Jermolene/TiddlyWiki5/blob/single-tiddler-mode/core/ui/SideBar/Open.tid#L3
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.
ok
Feedback viewing on Windows laptop: great! 1) in other story views, the tiddlers slide to the top of the screen. I never liked before that sometimes tiddlers would open toward the bottom of the screen. 2) In Zoom only one tiddler open at a time, probably helps avoid the sluggishness of having a heap of tiddlers open at a time. And as probably everyone knows, zoomin is one of the first changes I make to a TW. 3) I do like the alternating between history and open when you change storyviews. However I had an idea: what about having only a history tab, where the first section is open tiddlers and below the open tiddlers is another list of 'recently opened' tiddlers? It would look similar to search results, which are similarly divided into two sections, title matches and all matches. That would avoid both problems: having two separate tabs, and having a tab change names, which could be confusing to new users. Regardless, I really like this new feature of single tiddler mode. Very nice! |
Forgot to add: in my idea of having two sections in a history tab, in story view mode, the 'Open tiddlers' section at the top would only have one tiddler listed, and the 'Recently opened' tiddlers would be longer. In other modes, the 'Open tiddlers' section at the top would have more tiddlers, but usually not too many, and the 'Recently opened' tiddlers list would be shorter, only those tiddlers actively closed. And you could have a close all tiddlers at the top. |
Thanks @giffmex!
Great!
The first issue is that one list above the other makes it hard to find the second list if the first is long. But the deeper problem is that the "open" list is still displayed when in single tiddler mode, and it's always going to be redundant: it'll never contain more than a single tiddler, and using the close button won't have the expected effect. Meanwhile, I'd argue that the "history" list isn't useful when one is not in single tiddler mode because one can accomplish everything with the "open" tab and more (drag and drop, using the mini close buttons etc). |
My second comment above was trying to say that the second list wouldn't be difficult to find if the first list is one tiddler in storyview mode. Also, while redundant, the one item open list might give a new user a comforting feeling that this tab works, because what he sees on the screen is what is in the open tiddlers list. In other modes, I doubt that in one session of use of a file that the user will have either too many open tiddlers or too many recently closed tiddlers. Some users probably leave everything open, in which case the history list is not as needed, like you say. And other users may close most tiddlers except those they are working on, so the open list will be short and the recently closed list will be accesible. I understand your reserve, but I still think it is worth experimenting with. |
@Jermolene In the current zoomin story view, I set the below CSS to let a tiddler cover the whole screen! but
|
Also there seems the padding and margin setting for tiddler-frame, and tiddler-body, tc-story-river are different! |
this.openLinkFromInsideRiver = this.getAttribute("openLinkFromInsideRiver","top"); | ||
this.openLinkFromOutsideRiver = this.getAttribute("openLinkFromOutsideRiver","top"); | ||
this.singleTiddlerMode = this.getAttribute("singleTiddlerMode","no") === "yes"; | ||
this.relinkOnRename = this.getAttribute("relinkOnRename","no").toLowerCase().trim() === "yes"; | ||
this.setVariable("tv-story-list",this.storyTitle); |
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.
this is all super ugly! IMO it shouldnt be that way
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.
This is consistent with how all the core widgets manage their attributes.
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.
Yes, but that's not the point I wanted to make. ... The navigator widget shouldn't be responsible to handle views. It's the story and storyviews in combination, which need to handle the stuff.
So If an event wants to pass any parameter through, it need to be dynamic and not hardcoded like this one.
We do have the paramObject
which can hold any additional parameters the users and plugin authors may want to send to the navigator event handler.
I want the stuff to be dynamic and there shouldn't be a core PR necessary if new parameters like this one are needed by a new function.
It's OK if you make it. It gets merged, but if anyone else wants new params the chance is way to low. ... So I do want a solution, similar to the linkcatcher that I used for the new "story manager stuff" I'm creating. see: https://github.com/pmario/TiddlyWiki5/blob/dbf32fdef66196fb389ad55665b2f2c84991b65f/core/modules/widgets/linkcatcher.js#L75
linkcatcher has parameters that are OK, but can't be used for the new tm-load-story
message. I needed different params. With the mechanism I propose it will be simple, to create new tm-xxx plugins without the need to modify linkcatcher or navigator. They just pass through the paramObject
also see: https://github.com/wikilabs/plugins/blob/8b85e7b8d66b0b4dd7c7f3fc213a22501e633f44/wikilabs/wltm-open-story/tiddlers/open-story.js#L42 where the paramObject defined above AND sent by a user can be used.
Usage can be seen at: https://github.com/wikilabs/editions/blob/eca970252a441c2612239453c01d406da7519d75/wltm-open-story/tiddlers/%24__core_ui_AdvancedSearch_Story_Tabs_template.tid#L8
I think, that's the mechanism we should use to add unknown future parameters to navigator and story related widgets.
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.
Hi @pmario I think you're proposing a mechanism whereby widgets that dispatch events can specify the paramObject
hashmap by using unknown attributes. Why wouldn't one use the action-sendmessage
widget in such situations?
I don't quite understand how the proposal would be applied in this case? Which message is involved?
Hi @kookma the zoomin storyview uses some intricate CSS to make the animations work. The new solo storyview uses the same CSS as the classic storyview; it's exactly like classic storyview, except there are no animations, and the storylist is restricted to only hold a single tiddler. |
@Jermolene I am using solo and it seems it works much better than zoomin! However I uses I also appreciate to advise me how different are stylesheets (e.g selectors) from classic story view. I need to modify these stylesheet to get the desired behavior for Tiddlyshow plugin (like covering the whole screen, ... |
There's a lot of discussion further up this thread: the "open" tab is useless when using a single tiddler mode story view, because it would only ever show a single tiddler. The History tab is offered as an alternative means of navigating.
We have considered it, but it seems confusing to have both tabs present at once.
I don't follow: all story views use
The "solo" storyview uses the same CSS as the "classic" storyview. |
@Jermolene |
I mean for navigation using shortcut keys I use One more question: Thank you |
I don't know, but I would expect to need to target tc-tiddler-frame along the lines suggested by @pmario above. |
Thanks! by the way I cannot see any comment by @pmario on css! |
Some findings: These have been previously raised in the forum or Gihub Solo story view i.
ii.
|
Hi Jeremy, These are some comments by Mat I downloaded the attached zip and extracted, getting two files: empty and index. First trying out empty. I open it, go to ctrlpanel and select Solo storyview (for testing purposed it would probably make more sense to have this pre-set). Anyway, OK I close ctrlpanel so I only have GetingStarted and now click "+" to create a new tid. It opens in edit mode along with the already active GettingStarted. (Maybe I misunderstood the whole premise but I was expecting it to be only one tiddler open at a time? But OK, maybe it's not only one becaseu one is in view mode and one is in edit mode so maybe the latter "doesn't count"...) After I've saved the tiddler I note that the sidebar tab is not named Open but History. And it lists: New Tiddler, Draft of 'New Tiddler', GettingStarted. I would think that second title should not be there. Clicking it confuses things even more. If I create yet another "New Tiddler 1", I get the same issue with a missing Draft showing in the History list. If I reload the wiki and forget to set the Solo storyview but instead first click "+" to create a new tiddler but realize my mistake so I cancel the editview tiddler and then go to ctrlpanel and activate Solo, then upon closing the ctrlpanel the missing Draft pops up (hm!) and clicking "+" right away saves it as an existing tiddler but named "Draft of 'New Tiddler'". OK, deciding that the empty version is not quite ready for prime time I go to "index". This starts up with the usual default tiddlers open. I go to ctrpanel and note that Solo is pre-set. Closing the ctrlpanel... every tiddler closes/disappears. Actually what happened what that when I went to ctrlpanel, those default closed but I didn't see it because they were below the ctrlpanel. Not sure how to ideally handle that. As with empty, the drafts seem to be listed in the History tab. I'd suggest that only existing drafts are actually listed - or is there a thought behind it? This time, clicking "+" does not seem to save it though but instead a "New Tiddler" is opened in draft mode and the History list is updated accordingly. (This makes me wonder if empty and index don't actually have the same version of the machanism...) |
openLinkFromOutsideRiver: this.getAttribute("openLinkFromOutsideRiver","top") | ||
}); | ||
} | ||
this.wiki.addToStory(title,fromTitle,this.storyTitle,{ |
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.
see: #3412 (comment)
This PR will invalidate PR #4200 "Remove dependency on wiki.js for story-startup and navigator" where we don't have a decision yet. PR #4200 tries to fix a problem, that is also discussed in issue: #4180. Which links to many other issues, which are closed, but not resolved. Proposal: make navigator.js + friends "multi - story" aware. #4354 also discusses several elements that this PR touches. ... I would like to discuss the main mechanism first. |
Hi @pmario I'm in no hurry to merge this PR, I think it needs quite a lot more work. |
@Jermolene I would appreciate to have a look! I also wish to give some priority to this PR. It makes presentation simple and more semantic. Thank you |
Many thanks @Jermolene! |
Hi @Jermolene This is a small reminder. Thank you |
Just to say that I don't propose to merge this for v5.1.22 because we haven't resolved the issues around the handling of the "Open" sidebar tab. |
@Jermolene Thank you |
Hi @Jermolene - This is mild reminder. |
(I don't mean to nag, sorry if this is being worked on and just takes its time. I was just combing through old open issues and PRs and this seemed stale) Quick summary:
Does this, and the above-mentioned #4473, mean this PR is obsolete? |
Good catch! This issue is one of those threads that once I started pulling, more and more inter-related stuff popped out. As sometimes happen, it will be a multi-year journey to get things right.
Pretty much, yes. I've ended up exploring #4473 as part of my work on https://github.com/TWPUB/TWPUB-Tools (see https://twpub-tools.org). You can see there a sketch of the multi-column architecture. I'm currently working on bringing up a new implementation of the basic story river architecture that is entirely implemented in wikitext, without the complex encapsulated logic of the |
@Jermolene ... Can you remember, why this PR wasn't merged at the end? |
I was waiting for long time to see this merged! Solo ;-) |
Hi @pmario @kookma I think my earlier comments still apply:
But I guess it might make sense to revisit this for the next release. |
By which I meant the release after v5.2.3 |
UPDATE 29th JUNE 2021: See this comment for the current status of this work.
As @twMat noted in #1938 nearly three years ago, the current "zoomin" storyview suffers from some annoying limitations/quirks. This PR adds a proper "single tiddler mode" to the core in which only a single tiddler is displayed in the story river.
The changes involved are:
There are still some issues to be resolved:
$:/DefaultTiddlers
isn't yet adjusted, so multiple tiddlers are currently being opened at startupUpdate 20th January 2020:
These commits add a new "solo" storyview that presents a single tiddler at a time without any animation, making it much simpler to style than the "zoomin" storyview with its dynamic animations.