Re: [Zim-wiki] Discuss wish: Page templates
On Thu, Jun 25, 2009 at 7:37 AM, Dotan Cohendotanco...@gmail.com wrote: ( By having a special namespace for templates I mean that you would still be able to use the namespace templates for any other purpose. The templates would e.g. be in a folder _templates (normal page names can not start with '_') and show up e.g. at the top of the index tree. ) In that case, then names entered by users must be trimmed for whitespace (The underscore replaces space in Zim names). I think that Python has a function for this. I often wind up with a page name with a redundant space before or after the text if the name is copy / pasted from another application. I think that is done already. At least the function for parsing page names entered in one of the dialogs strips whitespace and other characters that are not allowed. -- Jaap ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Discuss wish: Page templates
On Thu, Jun 25, 2009 at 7:35 AM, Dotan Cohendotanco...@gmail.com wrote: The main design question for me is whether we should use a normal namespace for this, or there a need to create special namespaces? I run into the same question trying to implement a move to garbage feature - again the garbage bin can be a regular namespace, but it could also be a special namespace. Special namespace, definitely. Those are special purpose pages, and should not be mixed in with the regular pages. Otherwise, the regular pages become the special case. As described I think I know how to store these by using the _ as a folder prefix for special namespaces. Then the next question is how to show these special namespaces in the interface. Should they be part of the index tree or should they have their own tree. If so, should both trees be visible in the side pane, should they be switchable ? etc. I can imagine to have a dropdown at the top of the side pane which allows switching between index and templates. Also thrash could be in this dropdown as well as a view for search. Alternatively this could be done with vertical tabs along the side pane - but I feel that might take up too much space. Regards, Jaap ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Discuss wish: Page templates
Dne Čt 25. června 2009 11:21:14 jste napsal(a): The templates would ideally be available when creating a new page. I do not understand Polish, so I do not understand what was in the screenshot, but a dropdown box with a choice of available templates It was Czech, sorry - an image on the fly. Templates |_ Person |_ Report |_ Mail |_ another template would be intuitive. A template editor under the Tools menu would let the user create, delete, and edit templates. I do not think that Why? Zim is the editor. You can organize them like any other pages. That's the beauty. It's easy to imagine when I don't know how to code! Yes. :) I don't want to complicate it. When I create a namespace Zim:Template and some subnodes like Zim:Template:Person or Zim:Template:Report, I would like to see them in the New page dialog. That's an inoffensive way, isnt' it? We can then think of Zim:Trash Zim:Help Zim:Whatever (Please send your emails to zim-wiki@lists.launchpad.net only, I'm subscribed.) -- Vlastimil Ott www.e-ott.info ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Discuss wish: Page templates
On Thu, Jun 25, 2009 at 11:22 AM, Dotan Cohendotanco...@gmail.com wrote: I think that is done already. At least the function for parsing page names entered in one of the dialogs strips whitespace and other characters that are not allowed. It seems that whitespace is trimmed from the end, but not beginning of new page names. Shall I test further? Try opening a page like _foo or foo, in both cases you end up at foo. -- Jaap ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Discuss wish: Page templates
2009/6/25 Vlastimil Ott li...@e-ott.info: Dne Čt 25. června 2009 11:51:39 Dotan Cohen napsal(a): Yes, Zim is the editor. But so that they do not have to be shown in the tree, I thought that the Tools menu would be best. What other places are good? I have many roots in the tree, another one is no problem - :Zim with subtree. I think they could be in the tree. I feel that my tree is already too crowded. Also, the tree is for user data, not Zim's internal files. I consider a template a Zim internal file, even if I can modify it, because it contains settings not data. Yes, that is exactly what I thought. But where would you go to edit the templates, or add new ones? Tools - Templates I'll go to :Zim:Template in the tree. Like mediawiki i.e. - when do you want to edit templates, you go to Template:YourTemplate: That makes sense as (as far as I know) MediaWiki does not present to the user a tree of the data. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Discuss wish: Page templates
Try opening a page like _foo or foo, in both cases you end up at foo. Try hitting Ctrl-N and entering foo . You get _foo. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Discuss wish: Page templates
Hi, I have a suggestion for this possible feature: - store templates in ~/.config/zim/templates/ - store default templates also in this dir Initially I would agree with Vlastimil: show templates just like other pages in the main tree -- because everything is a file. But if that's not going to happen... well I could at least customize the date format to the one that I like (without having to modify files outside of $HOME) :-) Just a suggestion. Jaap Karssenberg wrote: On Thu, Jun 25, 2009 at 11:21 AM, Dotan Cohendotanco...@gmail.com wrote: 2009/6/25 Jaap Karssenberg jaap.karssenb...@gmail.com: Then the next question is how to show these special namespaces in the interface. Should they be part of the index tree or should they have their own tree. If so, should both trees be visible in the side pane, should they be switchable ? etc. The templates most certainly should not be in the tree, no matter what! The trash could be in the tree, I suppose, but it should be distinguishable as a special branch. Maybe an icon, and having it at the bottom of the tree always. For sure we need some kind of tree view for Trash, as it can contain a sub-tree. With the proposal to have a separate side-pane view for this it would have it's own tree, which may be more clearly separated from the rest of the index. The templates would ideally be available when creating a new page. I do not understand Polish, so I do not understand what was in the screenshot, but a dropdown box with a choice of available templates would be intuitive. A template editor under the Tools menu would let the user create, delete, and edit templates. I do not think that templates should be available across Zim, but rather per notebook. For those who disagree, perhaps a checkbox for a Global option would help. All templates could be stored as a hidden Zim notebook, with some form of metadata to mention to which notebook they belong, or alternatively as global. My first though was that templates would also require a tree, but I realize this is not the case. The template list can be a flat list. In that case a separate dialog to edit them is feasible. Still the editor used would be the same as is used for normal pages. Would need some progression on detaching an editor widget from the main application. I can imagine to have a dropdown at the top of the side pane which allows switching between index and templates. Also thrash could be in this dropdown as well as a view for search. Alternatively this could be done with vertical tabs along the side pane - but I feel that might take up too much space. I don't really like this idea. It is inconsistent with other applications' behaviour and sounds intrusive. I see a lot of KDE application that either use a dropdown or vertical tabs to switch views in a side pane. Maybe templates do not belong in there, but search for sure is there for many applications, and thrash also seems to fit nicely there. All in all the full implementation is getting much more complex than the original proposal from Vlastimil. Someone would need to invest time to make it happen - preferably on the python code tree. At the moment I'm struggling to get that project back on target - so zero space in my planning at this moment. Regards, Jaap ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp -- Emilis Dambauskas emili...@gmail.com gsm: +370-686-07732 irc: emilis_i...@irc.freenode.net http://emilis.info -BEGIN GEEK CODE BLOCK- Version: 3.12 GAT/CC/MC/O dpu(-) s:- a- C++ UBLHS++ P(+) L+++ E--- W+++$ N+ o-- K? !w O? M-@ V? PS+(--) PE Y+++ PGP t- 5? X+@ R- !tv b+ DI D G e++ h r+++ y --END GEEK CODE BLOCK-- ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Discuss wish: Page templates
2009/6/25 Jaap Karssenberg jaap.karssenb...@gmail.com: On Thu, Jun 25, 2009 at 11:21 AM, Dotan Cohendotanco...@gmail.com wrote: 2009/6/25 Jaap Karssenberg jaap.karssenb...@gmail.com: Then the next question is how to show these special namespaces in the interface. Should they be part of the index tree or should they have their own tree. If so, should both trees be visible in the side pane, should they be switchable ? etc. The templates most certainly should not be in the tree, no matter what! The trash could be in the tree, I suppose, but it should be distinguishable as a special branch. Maybe an icon, and having it at the bottom of the tree always. For sure we need some kind of tree view for Trash, as it can contain a sub-tree. With the proposal to have a separate side-pane view for this it would have it's own tree, which may be more clearly separated from the rest of the index. I bug 3366813 is implemented then the trash could go on the left: https://bugs.launchpad.net/zim/+bug/366813 That would also make a single trash for all notebooks, which I think is a very clean solution in this case. The trash is not used so often where each notebook needs it's own trash, there would be more trash folders than actual pages in the trash in that case! My first though was that templates would also require a tree, but I realize this is not the case. The template list can be a flat list. In that case a separate dialog to edit them is feasible. Still the editor used would be the same as is used for normal pages. Would need some progression on detaching an editor widget from the main application. I think that having a tree of templates is going too far. A flat list is fine. I can imagine to have a dropdown at the top of the side pane which allows switching between index and templates. Also thrash could be in this dropdown as well as a view for search. Alternatively this could be done with vertical tabs along the side pane - but I feel that might take up too much space. I don't really like this idea. It is inconsistent with other applications' behaviour and sounds intrusive. I see a lot of KDE application that either use a dropdown or vertical tabs to switch views in a side pane. Maybe templates do not belong in there, but search for sure is there for many applications, and thrash also seems to fit nicely there. Kate does have tabs going down the side which is similar I suppose. What other KDE apps have such a dropdown list? I'd like to look at the implementation. All in all the full implementation is getting much more complex than the original proposal from Vlastimil. Someone would need to invest time to make it happen - preferably on the python code tree. At the moment I'm struggling to get that project back on target - so zero space in my planning at this moment. Should we wait until the feature can actually be implemented before discussing further? A lot could change between now and the time when implementation is possible! -- Dotan Cohen http://what-is-what.com http://gibberish.co.il ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Discuss wish: Page templates
2009/6/25 Emilis Dambauskas emili...@gmail.com: Hi, I have a suggestion for this possible feature: - store templates in ~/.config/zim/templates/ - store default templates also in this dir Initially I would agree with Vlastimil: show templates just like other pages in the main tree -- because everything is a file. But if that's not going to happen... well I could at least customize the date format to the one that I like (without having to modify files outside of $HOME) :-) Just a suggestion. I do not see how everything is a file is relevant to a user application. Furthermore, if you want to use the *nix filesystem as inspiration, there is the concept of hidden files because not every file needs to be seen by the end user. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp