Обсуждение: [edit] links in CommitFestSubSection headers

Поиск
Список
Период
Сортировка

[edit] links in CommitFestSubSection headers

От
Tom Lane
Дата:
I just threw a bunch of CommitFestSubSection divisions into
http://wiki.postgresql.org/wiki/CommitFest_2008-11

I see that each of the subsection headings has an [edit] link, but
it doesn't do what you might expect --- it seems to result in editing
the CommitFestSubSection template, which is not exactly useful.

Can we make these links actually edit just the subsection?  If not,
can we get rid of them?
        regards, tom lane


Re: [edit] links in CommitFestSubSection headers

От
"Brendan Jurd"
Дата:
On Sun, Nov 2, 2008 at 7:28 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I see that each of the subsection headings has an [edit] link, but
> it doesn't do what you might expect --- it seems to result in editing
> the CommitFestSubSection template, which is not exactly useful.
>

Yeah, we used to have this problem with the top-level sections as well
("Pending patches" and co.).  For a while we just got rid of the edit
links by adding the __NOEDITSECTION__ behaviour switch to the page,
but Alvaro came up with a fix for the main headings.  So the edit
links were reinstated.

Unfortunately that also means that the edit links are back for the
subsections as well.  The __NOEDITSECTION__ trick can't be used to
suppress some edit links but not others; it turns them off for the
entire page.

> Can we make these links actually edit just the subsection?  If not,
> can we get rid of them?

We can make them work for the subsections, at some cost in
user-friendliness.  One option would be to use substitution for the
subsection templates (the same trick we use with CommitFestBlank).
The subsections wouldn't be quite so easy to alter and move around as
they are now, but the edit links will work as expected.

Is that an acceptable trade-off for you?  If so, I have no problems
with making the change.

Cheers,
BJ


Re: [edit] links in CommitFestSubSection headers

От
Tom Lane
Дата:
"Brendan Jurd" <direvus@gmail.com> writes:
> On Sun, Nov 2, 2008 at 7:28 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Can we make these links actually edit just the subsection?  If not,
>> can we get rid of them?

> We can make them work for the subsections, at some cost in
> user-friendliness.  One option would be to use substitution for the
> subsection templates (the same trick we use with CommitFestBlank).
> The subsections wouldn't be quite so easy to alter and move around as
> they are now, but the edit links will work as expected.

Hm, what does "not quite so easy" mean?  I certainly think that one of
the main advantages of the whole wiki-page approach is the ease of
reclassifying things.  However, it would make sense to me that you need
to edit the whole page not a subsection if you want to fool with the
section structure.  Is that what you're saying, or would there be
additional magic involved?
        regards, tom lane


Re: [edit] links in CommitFestSubSection headers

От
Josh Berkus
Дата:
Brendan,

> We can make them work for the subsections, at some cost in
> user-friendliness.  One option would be to use substitution for the
> subsection templates (the same trick we use with CommitFestBlank).
> The subsections wouldn't be quite so easy to alter and move around as
> they are now, but the edit links will work as expected.
> 
> Is that an acceptable trade-off for you?  If so, I have no problems
> with making the change.

I don't think we'll be moving the subsections for this commitfest.

--Josh



Re: [edit] links in CommitFestSubSection headers

От
"Brendan Jurd"
Дата:
On Mon, Nov 3, 2008 at 2:19 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The subsections wouldn't be quite so easy to alter and move around as
>> they are now, but the edit links will work as expected.
>
> Hm, what does "not quite so easy" mean?

Currently, a subsection is just a template call, for example:

{{CommitFestSubSection|SE-PostgreSQL and related}}

That's pretty easy to read, and also quite easy to pick up and move
elsewhere, or rename if you so desire.

If we switch to using substitution, the contents of the subsection
template will actually be copied into the page itself, so the same
subsection will look like this instead:

|-
| colspan="4" |
=== SE-PostgreSQL and related ===

These three lines will have to be shifted around as a single unit, and
a slight error in the syntax could scramble the whole table.  So the
downsides are loss of readability and ease of editing, and increased
fragility.

Cheers,
BJ


Re: [edit] links in CommitFestSubSection headers

От
Tom Lane
Дата:
"Brendan Jurd" <direvus@gmail.com> writes:
> On Mon, Nov 3, 2008 at 2:19 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Hm, what does "not quite so easy" mean?

> Currently, a subsection is just a template call, for example:

> {{CommitFestSubSection|SE-PostgreSQL and related}}

> That's pretty easy to read, and also quite easy to pick up and move
> elsewhere, or rename if you so desire.

> If we switch to using substitution, the contents of the subsection
> template will actually be copied into the page itself, so the same
> subsection will look like this instead:

> |-
> | colspan="4" |
> === SE-PostgreSQL and related ===

> These three lines will have to be shifted around as a single unit, and
> a slight error in the syntax could scramble the whole table.  So the
> downsides are loss of readability and ease of editing, and increased
> fragility.

I see.  Still, the template calls read like line noise too ;-),
and seem to be prone to breaking in strange ways --- I'm still nowhere
near confident enough to commit changes without previewing.  I don't
think that the above is materially worse than what we do now.

Comments from others?
        regards, tom lane


Re: [edit] links in CommitFestSubSection headers

От
Tom Lane
Дата:
Josh Berkus <josh@agliodbs.com> writes:
> I don't think we'll be moving the subsections for this commitfest.

Why not?  The subsections that are there now are ones that I made up
with about fifteen minutes' thought.  I surely don't think they're
set in concrete ... especially not while people continue to add new
patches ;-)
        regards, tom lane


Re: [edit] links in CommitFestSubSection headers

От
"Brendan Jurd"
Дата:
On Mon, Nov 3, 2008 at 2:35 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I see.  Still, the template calls read like line noise too ;-),
> and seem to be prone to breaking in strange ways --- I'm still nowhere
> near confident enough to commit changes without previewing.

Aside: regardless of confidence level, I _never_ commit without
previewing.  It just isn't worth the grief.

> I don't
> think that the above is materially worse than what we do now.
>

If that's the case we might as well give it a shot.  Personally I find
the template call much more readable, but the utility of having [edit]
links which work properly is more important.

If nobody opposes in the next half hour or so I'll make the change.

Cheers,
BJ


Re: [edit] links in CommitFestSubSection headers

От
"Brendan Jurd"
Дата:
On Mon, Nov 3, 2008 at 2:45 PM, Brendan Jurd <direvus@gmail.com> wrote:
> If nobody opposes in the next half hour or so I'll make the change.
>

Done.  To add a new subsection, be sure to use the following syntax:
 {{subst:CommitFestSubSection|Name of Section}}

This will import the contents of the template with the given section name.

I've already converted all the existing subsections in 2008-11 and
updated the template instructions.

Cheers,
BJ