Templates in experimental branch.
Hi,
I've replaced a large fraction of the templates in the experimental branch by "procedural" templates. This unclutters quite a bit the Templates menu as well as offering overall more options. Please test your favorite templates and give me feedback.
Thanks,
Tav
On Fri, 2014-10-10 at 21:21 +0200, Tavmjong Bah wrote:
Hi,
I've replaced a large fraction of the templates in the experimental branch by "procedural" templates. This unclutters quite a bit the Templates menu as well as offering overall more options. Please test your favorite templates and give me feedback.
Good work Tav, :-)
Martin,
On 2014-10-10 21:21 , Tavmjong Bah wrote:
I've replaced a large fraction of the templates in the experimental branch by "procedural" templates. This unclutters quite a bit the Templates menu as well as offering overall more options. Please test your favorite templates and give me feedback.
Great!
Would anyone be interested in an even more generic procedural template which instead of presets presets offers a number of options from the Document Properties dialog?
Snapshot (WIP, not finished): https://gist.github.com/su-v/d2f0fdc10b1d3ea7898e
Regards, V
On Sat, 2014-10-11 at 07:13 +0200, su_v wrote:
On 2014-10-10 21:21 , Tavmjong Bah wrote:
I've replaced a large fraction of the templates in the experimental branch by "procedural" templates. This unclutters quite a bit the Templates menu as well as offering overall more options. Please test your favorite templates and give me feedback.
Great!
Would anyone be interested in an even more generic procedural template which instead of presets presets offers a number of options from the Document Properties dialog?
Snapshot (WIP, not finished): https://gist.github.com/su-v/d2f0fdc10b1d3ea7898e
But where is the auto-draw tab?
Your python fu puts mine to shame.
This template looks quite interesting! Perhaps it should replace the simpler one I wrote. What do others think?
Here is a brain dump of questions and observations; some are of a more broader nature:
* Can some of the functions could be put into a library to be shared between procedural templates (e.g. add/delete layers).
* I am wondering if the page size presets could be broken up into sub-categories. This might make certain categories easier to find... and would make sharing page sizes between templates easier. (BTW, I don't think "Banner 460x60" is useful in the modern age.)
* It might be good to include the actual size in some of the page size preset labels, e.g. there seem to be more than one "European" standard size. (See https://en.wikipedia.org/wiki/Business_card )
* Is it possible to gray out sections that don't apply (like when the Page format is not "Custom")? This probably an overall extensions issue.
* The basis for all the templates is "default.svg" (I think). Is this good? What if someone puts in a really weird default?
* The 'po' files determine which "default.svg" files is used. These files differ in only one way... the name "Layer 1". Can this change be done programmatically so we can remove all the almost duplicate files?
* What if a user replaces the default file? It won't be picked up if they don't replace the correct language dependent file.
* I thought we had a "Save default" option, I guess we don't.
* Page 'viewBox' could use some explanation (maybe it's too specialized for a generic template).
* "Resize margins" could also use some explanation. Is it really useful in the generic template?
* I don't know what "apply all tabs" means.
* Some kind of color value verification could be useful.
* Zoom level could use an "auto" value. I'm not sure the best way of doing this (I did a very simple thing in "empty_icons.py").
* I would expect the "Guides" and "Grids" tabs to actually allow me to define guides and grids (and with using document units).
* Format for "Current layer (id)" is unclear. It will probably need some coding change to actually work.
* As I was reworking the templates, I questioned how useful some of the existing templates were to the average user (LaTeX beamer?) We could have a download section on our website for specialized templates.
Tav
On 2014-10-11 12:23 , Tavmjong Bah wrote:
On Sat, 2014-10-11 at 07:13 +0200, su_v wrote:
On 2014-10-10 21:21 , Tavmjong Bah wrote:
I've replaced a large fraction of the templates in the experimental branch by "procedural" templates. This unclutters quite a bit the Templates menu as well as offering overall more options. Please test your favorite templates and give me feedback.
Great!
Would anyone be interested in an even more generic procedural template which instead of presets presets offers a number of options from the Document Properties dialog?
Snapshot (WIP, not finished): https://gist.github.com/su-v/d2f0fdc10b1d3ea7898e
Here is a brain dump of questions and observations; some are of a more broader nature:
- Can some of the functions could be put into a library to be shared
between procedural templates (e.g. add/delete layers).
Good idea.
- I am wondering if the page size presets could be broken up into
sub-categories. This might make certain categories easier to find... and would make sharing page sizes between templates easier. (BTW, I don't think "Banner 460x60" is useful in the modern age.)
The list of preset formats in empty_custom.py is copied from here: http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/src/ui/w...
The list was originally extracted for the inklingreader extension [1], but there only a sub-set of page sizes is shown in the AutoGUI. The procedural template currently lists all presets to mirror closely what options are available in the 'Document Properties' dialog.
Agreed that the complete list is too long for a dropdown list.
- It might be good to include the actual size in some of the page size
preset labels, e.g. there seem to be more than one "European" standard size. (See https://en.wikipedia.org/wiki/Business_card )
Agreed (and updated in the gist).
- Is it possible to gray out sections that don't apply (like when the
Page format is not "Custom")? This probably an overall extensions issue.
Currently, this is not supported in INX-based dialogs (aka "AutoGUI"). Would be really nice to have though ...
- The basis for all the templates is "default.svg" (I think). Is this
good? What if someone puts in a really weird default?
- The 'po' files determine which "default.svg" files is used. These
files differ in only one way... the name "Layer 1". Can this change be done programmatically so we can remove all the almost duplicate files?
- What if a user replaces the default file? It won't be picked up if
they don't replace the correct language dependent file.
- I thought we had a "Save default" option, I guess we don't.
The only one I am aware of is via GtkFileChooser dialog (Save as, Save a copy as), where the 'templates' directory of the current user ($XDG_CONFIG_HOME/.config/inkscape/templates) has a special hook under 'Places' on the left.
Questions specific to empty_custom.{inx,py}:
- Page 'viewBox' could use some explanation (maybe it's too specialized
for a generic template).
Agreed - currently present for testing, can be hidden (or moved to an 'Advanced' tab or template).
- "Resize margins" could also use some explanation. Is it really useful
in the generic template?
Agreed (not really useful in templates) - currently present for testing (because the namedview attributes exist and the initial goal for the extension was to implement support for as many options from 'Document Properties' as possible).
- I don't know what "apply all tabs" means.
If it is unchecked, it allows to apply only the settings of the current tab to the new document (instead of applying all settings from all tabs):
Examples: - only change the 'Display' settings - only add a number of new layers (without other changes to default.svg)
- Some kind of color value verification could be useful.
Yes, definitely needed. Another possibility would be to use the color selector widget (available in AutoGUI) for input.
- Zoom level could use an "auto" value. I'm not sure the best way of
doing this (I did a very simple thing in "empty_icons.py").
Thx, will take a look (meaningful auto value probably also is influenced by initial window size (& state)?).
- I would expect the "Guides" and "Grids" tabs to actually allow me to
define guides and grids (and with using document units).
Those two tabs currently are "placeholders" for what could be added (e.g. similar to the 'Layers' tab). For now, they only include the basic 'namedview' attributes which store options for guides and grids.
Guides could offer presets (similar to guides creator), and grids probably too (but that might conflict UX-wise with the global preference settings for new grids).
- Format for "Current layer (id)" is unclear. It will probably need some
coding change to actually work.
Agreed - I initially started with just 'Current layer (id):' on that tab (a remnant from earlier versions of the script as effect), before I added the other choices. Needs more work.
- As I was reworking the templates, I questioned how useful some of the
existing templates were to the average user (LaTeX beamer?) We could have a download section on our website for specialized templates.
Sounds reasonable to me.
Regards, V
On 2014-10-11 14:43 , su_v wrote:
On 2014-10-11 12:23 , Tavmjong Bah wrote:
- I thought we had a "Save default" option, I guess we don't.
The only one I am aware of is via GtkFileChooser dialog (Save as, Save a copy as), where the 'templates' directory of the current user ($XDG_CONFIG_HOME/.config/inkscape/templates) has a special hook under 'Places' on the left.
Correction: I meant to refer to "$XDG_CONFIG_HOME/inkscape/templates".
Hello. Great work Tav. Also like the proposed mockup by su_v.
Some things about: 1.- Icon procedural template could show also a 1px grid - and a custom snap if posibol -
2.- Custom mockup template also can be used as a template generator with a save option. This saved templates also can be deleted in the template list - for example templates in the user prefix.
3.- And for the last: Is posibol to use the New button as default button instead force to go to the submenus? sometimes seems boring to me. Maybe is more clear two entries "New" and "New from template". This button is very often used and most of time you/i dont need a template.
Regards, Jabier.
On 2014-10-11 12:23 , Tavmjong Bah wrote:
Here is a brain dump of questions and observations; some are of a more broader nature:
- Can some of the functions could be put into a library to be shared
between procedural templates (e.g. add/delete layers).
Initial attempt to use a (new) shared module: https://code.launchpad.net/~suv-lp/+junk/inkscape-procedural-templates
(Note: not a full inkscape branch - just the empty_* extensions from experimental updated to use functions from the shared module)
Regards, V
Hi,
On Mon, 2014-10-13 at 16:50 +0200, su_v wrote:
On 2014-10-11 12:23 , Tavmjong Bah wrote:
Here is a brain dump of questions and observations; some are of a more broader nature:
- Can some of the functions could be put into a library to be shared
between procedural templates (e.g. add/delete layers).
Initial attempt to use a (new) shared module: https://code.launchpad.net/~suv-lp/+junk/inkscape-procedural-templates
(Note: not a full inkscape branch - just the empty_* extensions from experimental updated to use functions from the shared module)
Looks good. Nice to get the ability to not have the default layer in all the templates. I am not sure getting rid of the border is that useful for most of the templates unless there are guides to indicate the drawing area.
Tav
On 2014-10-13 20:20 , Tavmjong Bah wrote:
Hi,
On Mon, 2014-10-13 at 16:50 +0200, su_v wrote:
On 2014-10-11 12:23 , Tavmjong Bah wrote:
Here is a brain dump of questions and observations; some are of a more broader nature:
- Can some of the functions could be put into a library to be shared
between procedural templates (e.g. add/delete layers).
Initial attempt to use a (new) shared module: https://code.launchpad.net/~suv-lp/+junk/inkscape-procedural-templates
(Note: not a full inkscape branch - just the empty_* extensions from experimental updated to use functions from the shared module)
Looks good. Nice to get the ability to not have the default layer in all the templates. I am not sure getting rid of the border is that useful for most of the templates unless there are guides to indicate the drawing area.
Latest updates: - removed 'Show border' setting expect for 'Generic Canvas' and 'Page' (the same ones which have it in experimental) - added helper function to create guides around page - replaced 'Show border' with a border type option which allows to choose between presets (for now: Default | No shadow | Guides) - added helper function to create a grid based on the document units
V
On 11 October 2014 07:13, su_v <suv-sf@...58...> wrote:
On 2014-10-10 21:21 , Tavmjong Bah wrote:
I've replaced a large fraction of the templates in the experimental branch by "procedural" templates. This unclutters quite a bit the Templates menu as well as offering overall more options. Please test your favorite templates and give me feedback.
Great!
Would anyone be interested in an even more generic procedural template which instead of presets presets offers a number of options from the Document Properties dialog?
Snapshot (WIP, not finished): https://gist.github.com/su-v/d2f0fdc10b1d3ea7898e
Regards, V
Maybe I missed the point behind this idea, though to me it sounds pretty similar to what I proposed in bug 1362061, i.e. to show document properties dialog when creating a new document:
https://bugs.launchpad.net/inkscape/+bug/1362061
In comment 4 https://bugs.launchpad.net/inkscape/+bug/1362061/comments/4 I posted a mockup https://launchpadlibrarian.net/184947907/New%20Document%20dialog.png of how I imagine that to look like.
Sebastian
On 2014-10-10 21:21 , Tavmjong Bah wrote:
I've replaced a large fraction of the templates in the experimental branch by "procedural" templates. This unclutters quite a bit the Templates menu as well as offering overall more options. Please test your favorite templates and give me feedback.
One issue I haven't figured out yet:
Window size of new documents based on procedural templates
Currently (trunk and experimental), new documents based on a procedural template resize the new document window to a minimal size unless the namedview attributes for the window size are explicitly set by the script. This also happens with a custom 'default.svg' i.e. with a user default template which defines window width and height explicitly to match the template's nature and the current user's need.
AFAICT procedural templates 1) ignore the setting for default window size as defined in the preferences [ Small | Large | Maximized ] (new in 0.91) 2) override explicit window size settings in the current default template (default.svg) 3) ignore the window state property for the WM (maximized or not) 4) honor explicitly defined values for window width and height
It might be possible to query the current screen via python in the extension script and set the window size explictly (via script), relative to the screen resolution; however this would require specific functions for each supported platform (with possibly additional dependencies (PyGTK, TkInter, etc.)), and be a burden to maintain (with cross-platform support).
Any ideas how to improve the UX for procedural templates wrt initial window size, apart from hard-coding a larger window size via scripts?
Regards, V
participants (6)
-
Alexandre Prokoudine
-
Jabier Arraiza
-
Martin Owens
-
Sebastian Zartner
-
su_v
-
Tavmjong Bah