Plugin idea

5 views
Skip to first unread message

Dave Gifford - http://www.giffmex.org/

unread,
Sep 5, 2007, 9:01:38 AM9/5/07
to TiddlyWiki
I wonder if this plugin is doable. It was inspired by FND's
description of his CollapseBloxMacro.

I'm thinking of a plugin that is a control panel that lets you adjust
the widths of the mainmenu, tiddler area, righthand sidebar, and the
header height. There would be boxes where you could enter new numbers,
then hit a refresh button and the stylesheets would be overridden.
Maybe also boxes to adjust the text size for the sitetitle, mainmenu,
tiddler text, and tiddler title.

Or maybe someone has already come up with this?

Dave Gifford

FND

unread,
Sep 5, 2007, 9:05:45 AM9/5/07
to Tiddl...@googlegroups.com
> I'm thinking of a plugin that is a control panel that lets you adjust
> the widths of the mainmenu, tiddler area, righthand sidebar, and the
> header height

There's a plugin for that already: It's called StyleSheet... ;)

Seriously though, it could be done, but it'd be a bit tricky for some
elements with the current layout.
There's a discussion about such issues over on [twdev], but a problem is
backwards compatibility (as usual).


-- F.

Saq Imtiaz

unread,
Sep 5, 2007, 9:09:05 AM9/5/07
to Tiddl...@googlegroups.com
Hi Dave,

What you are suggesting is possible, if one makes the assumption that everyone will use the standard PageTemplate and StyleSheeet. But for those that are customizing their layout, it is impossible to know what id's they are using for the various elements, or how they are arranged. I have considered such a configuration panel before, and that has always been the discouraging factor.

Not at all what you are asking for, but there is this plugin of mine that adjust tiddler text size:
http://tw.lewcid.org/#FontSizePlugin
(Or the latest cutting edge unreleased version at http://tw.lewcid.org/svn/plugins/FontSizePlugin/FontSizePlugin.js)

Cheers,
Saq
--
TiddlyThemes.com ( http://tiddlythemes.com ) : a gallery of TiddlyWiki themes.
TiddlySnip ( http://tiddlysnip.com ) : a firefox extension that turns TiddlyWiki into a scrapbook!
LewcidTW ( http://tw.lewcid.org ) : a repository of extensions for TiddlyWiki

Dave Gifford - http://www.giffmex.org/

unread,
Sep 5, 2007, 9:56:08 AM9/5/07
to TiddlyWiki
> There's a plugin for that already: It's called StyleSheet... ;)

FND: LOL. Yeah, but some of us who either don't know CSS (old me) or
are too lazy to memorize it or hunt down elements buried in the
StyleSheets would love a control panel a la SelectPaletteMacro to play
around a little bit.

if one makes the assumption that
> everyone will use the standard PageTemplate and StyleSheeet. But for those
> that are customizing their layout, it is impossible to know what id's they
> are using for the various elements,

Good point Saq.

I was more thinking of it as a tool for someone just starting their
styling but not familiar with stylesheets or too lazy to track down
the elements buried within the stylesheets in order to adjust them.
Later changes to the custom StyleSheet tiddler could override the
plugin, but the plugin would override the 3 default stylesheets. That
was kind of my idea.

Saq of course I remember your cool font resize plugin, but I was
thinking more along the lines of adjusting mainmenu, header, etc, to
account for changes in the width of the menus and the height of the
header.

Dave


FND

unread,
Sep 5, 2007, 10:16:24 AM9/5/07
to Tiddl...@googlegroups.com
> I was more thinking of it as a tool for someone just starting their
> styling but not familiar with stylesheets or too lazy to track down
> the elements buried within the stylesheets in order to adjust them

In theory, this would be very easy (at least if you discount Saq's very
valid warning about non-standard themes):
document.getElementById("header").style.height = "50px";
document.getElementById("mainMenu").style.width = "15%";
document.getElementById("sidebar").style.width = "12em";
(Whereas the part after the equals sign is the user input - although
they'd still have choose from and thus know about px, em and % units.)

However, with TW's current default layout technique, the displayArea
(where the tiddlers are displayed) doesn't scale automatically when the
MainMenu and Sidebar columns are resized.
Those dependencies are probably calculable - but to be honest, I can't
be bothered to look into that.

Also, such a plugin for modifying only those four element would make
people demand enhanced functionality - basically a WYSIWYG CSS editor,
which is just a tiny bit hard to do...


-- F.

BJ

unread,
Sep 5, 2007, 12:31:34 PM9/5/07
to TiddlyWiki
I've thought about something similar to this (with the same concerns
as expressed by the others already). What I've thought to get around
that, and have been itching to try out, is making more of the CSS
work like the ColorPalette tiddler slices. I don't see any reason why
other slices in other tiddlers could be used to define commonly
modified CSS settings/values, with the advantage of a single point of
change as well as the degree of separation from having to code native
CSS (not that hard really, once you get a handle on some of the
nuances of inheritance and such).

I'm sure there would be some backward compatibility problems, but
coming up with a set of those commonly changed setting and having them
in the default stylesheets (again, like the palette references in
StyleSheet Color) could make things a touch easier. Since the CSS
stuff is already parsed to pick up those slices, I don't think there
would be any coding needed in terms of a plugin (or, perish the
thought, core changes).

Just my $0.02USD worth...

-- BJ (TampaGeek)

FND

unread,
Sep 5, 2007, 3:21:23 PM9/5/07
to Tiddl...@googlegroups.com
> making more of the CSS work like the ColorPalette tiddler slices

That's a very good idea!
Obviously this wouldn't work for *all* values, but it's a nice idea for
the basic elements Dave had mentioned.
(From a developer's point of view, it might also make it a little easier
to ensure consistency, e.g. for similar elements' padding and margin.)

> I'm sure there would be some backward compatibility problems

Really? I can't think of anything that might break (though this is
usually the cue for Saq to shoot me down... ).


-- F.

Dave Gifford - http://www.giffmex.org/

unread,
Sep 5, 2007, 4:24:26 PM9/5/07
to TiddlyWiki
Great! It's a done deal then. I want it on my desk by Friday
afternoon.

;-)

Dave Gifford

Dave Gifford - http://www.giffmex.org/

unread,
Sep 5, 2007, 4:44:15 PM9/5/07
to TiddlyWiki
Oh, and if it's a plugin rather than a core item, who's concerned with
backward compatibility? Just need to add "Requires version x or
higher."

Dave Gifford

On Sep 5, 3:24 pm, "Dave Gifford - http://www.giffmex.org/"

FND

unread,
Sep 6, 2007, 3:44:06 AM9/6/07
to Tiddl...@googlegroups.com
> It's a done deal then. I want it on my desk by Friday afternoon.

You really are the devil, my friend - I just couldn't let this go...
Here's a proof-of-concept implementation:
http://layoutslices.tiddlyspot.com/#LayoutDimensions%20StyleSheet

As you can see, it's not quite as easy as you might had hoped (though
there's no actual interface yet, other than the slices tiddler*).
For example, the header's height is dynamic (depending on padding,
font-size etc.), so it's not as easy as just setting the height value.

Tell me what you think.

> Oh, and if it's a plugin rather than a core item, who's concerned with
> backward compatibility? Just need to add "Requires version x or
> higher."

The problem is with getting a more flexible default StyleSheetLayout.
If you're interested in the details, take a look at this discussion over
on [twdev]:
http://tinyurl.com/24rkxp
(http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/b55011665c5e04d9)


-- F.


* it seems that you have to reload TiddlyWiki (or the StyleSheet)
after changing a slice's value for the changes to take effect

Saq Imtiaz

unread,
Sep 6, 2007, 8:28:28 AM9/6/07
to Tiddl...@googlegroups.com
store.addNotification("LayoutDimensions",refreshColorPalette);
of course the refreshColorPalette function drives me up a tree but thats a whole different story and not at all relevant.....



* it seems that you have to reload TiddlyWiki (or the StyleSheet)
   after changing a slice's value for the changes to take effect

Dave Gifford - http://www.giffmex.org/

unread,
Sep 6, 2007, 12:54:27 PM9/6/07
to TiddlyWiki
Cool. Might be nice as a form with windows for the #s.

Dave

On Sep 6, 7:28 am, "Saq Imtiaz" <lew...@gmail.com> wrote:
> store.addNotification("LayoutDimensions",refreshColorPalette);
>
> of course the refreshColorPalette function drives me up a tree but thats a
> whole different story and not at all relevant.....
>
> > * it seems that you have to reload TiddlyWiki (or the StyleSheet)
> > after changing a slice's value for the changes to take effect
>

> --
> TiddlyThemes.com (http://tiddlythemes.com) : a gallery of TiddlyWiki
> themes.
> TiddlySnip (http://tiddlysnip.com) : a firefox extension that turns
> TiddlyWiki into a scrapbook!
> LewcidTW (http://tw.lewcid.org) : a repository of extensions for
> TiddlyWiki

Simon Baird

unread,
Sep 6, 2007, 7:55:58 PM9/6/07
to Tiddl...@googlegroups.com
On 9/6/07, FND <Ace_...@gmx.net> wrote:

> It's a done deal then. I want it on my desk by Friday afternoon.

You really are the devil, my friend - I just couldn't let this go...
Here's a proof-of-concept implementation:
    http://layoutslices.tiddlyspot.com/#LayoutDimensions%20StyleSheet
 
Nice work! I think this concept is a very good one. How about throwing in some font sizes also.
 

Dave Gifford - http://www.giffmex.org/

unread,
Sep 6, 2007, 9:41:03 PM9/6/07
to TiddlyWiki
And change the CSS class on those boring tables, too.

Dave Giphistopheles

FND

unread,
Sep 7, 2007, 2:41:13 AM9/7/07
to TiddlyWiki
> Nice work! I think this concept is a very good one.

Actually, having discussed this with Saq, I'm not too sure about the
tiddler slices approach anymore.
In the StyleSheet, it's really more trouble than it's worth (for the
developer/designer at least).
It'd generally be easier to modify the respective values directly with
JavaScript (see below).

> How about throwing in some font sizes also.

> [...]


> And change the CSS class on those boring tables, too.

As I've said, it's only a proof-of-concept implementation, so I just
picked out a few things for demonstration purposes.

> Cool. Might be nice as a form with windows for the #s.

That would be the next step, yes. (The added benefit being that the
previously-discussed dependencies could be calculated automatically
then.)
However, I'm not gonna pursue this any further for now, as I don't see
it as a high-priority issue on my long list of TiddlyWikiToDos...

Nevertheless, this whole thing should be pretty easy to implement;
once you've got the interface (form fields) in a dedicated tiddler,
all you need is to read out their respective values and apply them
like this:
[element].style.[property] = [value];
Sounds like the perfect project for getting started with developing TW
plugins... ... ...


-- F.

Morris Gray

unread,
Sep 7, 2007, 9:03:58 AM9/7/07
to TiddlyWiki
Dave is on to something here. TiddlyWiki does need much more
flexibility in visual design. There is much talk in design circles
about Web 2.0

http://www.webdesignfromscratch.com/web-2.0-design-style-guide.cfm

It is just another rose by another name - a fad, still... putting the
hype aside TiddleyWiki has always been capable of much more than even
the Web 2.0 affection-ados :) expect. Its rigidity in layout was one
of its strengths; allowing the user to get on with using it for
something useful while not having to worry about a multitude of
possibilities. But for those now starting to push its boundaries some
of the things Dave is envisioning should be looked at seriously.
There is no reason for any trade-offs. The simplicity can be
maintained for those who require it whilst still opening it up to
state-of-the-art visual design.

This is a challenge and a slight departure from the direction of
'muliti-wiki-harmonization' which seems to be its direction at the
moment. While it might be nice to go down the wiki track, the
excitement and charm of a flexible framework that can easily be used
for those wiki things, but still do anything from a college student's
blog/GTD to a state-of-the-art design web site for professionals will
make it accessible to a much wider market is tempting. As a
recalcitrant ex-DOS person I hate wysiwyg thingos, but if TiddlyWiki
is to reach its widest audience and user base it needs for its geekish
tools to get out of the way of a users passion to get their message
across.

I want my main menu to go diagonally across the top of the page from
port to starboard at a 45 degree angle, hide backstage underneath the
orchestra pit, have SideBarOptions disappear and reappear upon
command, and have more women's toilets so I don't have to wait so
long, and be afraid of being late for the next act :)

Morris

On Sep 5, 11:01 pm, "Dave Gifford - http://www.giffmex.org/"

FND

unread,
Sep 7, 2007, 3:04:42 PM9/7/07
to Tiddl...@googlegroups.com
> However, I'm not gonna pursue this any further for now

Okay, so I lied; I couldn't help but create the basic framework:
http://layoutslices.tiddlyspot.com/#EasyLayoutPlugin
But this time, I really won't extend this any further (or at least I'll
try harder than before).

By the way: Ultimately it might be easier - and generally more useful -
to create a universal plugin which provides a GUI for editing tiddler
slices.
But I won't go there (see above)...


-- F.

Eric Shulman

unread,
Sep 7, 2007, 5:17:39 PM9/7/07
to TiddlyWiki
> By the way: Ultimately it might be easier - and generally more useful -
> to create a universal plugin which provides a GUI for editing tiddler
> slices.

http://www.TiddlyTools.com/#SliceGridPlugin

-e

schilke

unread,
Sep 7, 2007, 6:50:00 PM9/7/07
to TiddlyWiki
> > to create a universal plugin which provides a GUI for editing tiddler
> > slices.
>
> http://www.TiddlyTools.com/#SliceGridPlugin

*dang*
LOL

FND

unread,
Sep 8, 2007, 1:59:49 AM9/8/07
to Tiddl...@googlegroups.com
> http://www.TiddlyTools.com/#SliceGridPlugin

Nice!
I should have known about this - or at least I should have expected it...

Small(?) suggestion: It might be useful to have an alternative output
layout - one table per tiddler, one slice per row.
!Foo
|sliceName|sliceValue|
!Bar
|sliceName|sliceValue|
Not sure if it's worth the trouble though.


-- F.

Reply all
Reply to author
Forward
0 new messages