You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Martin Furter <mf...@rola.ch> on 2010/02/09 18:35:46 UTC

[PATCH]: add section links (was: new website & IRC bot)


On Tue, 9 Feb 2010, Julian Foad wrote:

> Alan Barrett wrote:
>> On Tue, 09 Feb 2010, Julian Foad wrote:
>>> * A very neat solution: a little "link to this section" symbol after
>>> each heading. I saw a web site that provided links to the individual
>>> section headings by popping up a little symbol (the paragraph marker
>>> symbol which looks like a P with a double-stroked vertical line) just at
>>> the end of the section heading text, only when the mouse hovered over
>>> the heading text. The symbol was a link to the full URL of that section,
>>> so it could be copied, plus a "title" attribute of some kind.
>
>
>> Here's an attempt at an implementation.
>>
>>    /* CSS */
>>
>>    /*
>>     * Hide class="sectionlink", except when an enclosing heading
>>     * has the :hover property.
>>     */
>>    .sectionlink { display: none; }
>>    .heading:hover .sectionlink { display: inline; }
>
> Thanks, Alan. For our purposes, where headings come in various classes:
> [[[
> Index: style/site.css
> ===================================================================
> --- style/site.css	(revision 904498)
> +++ style/site.css	(working copy)
> @@ -135,6 +135,10 @@
> .h3 {
>   margin-left: 2em;
> }
> +/* Hide class="sectionlink", except when an enclosing heading has the :hover
> + * property. */
> +.sectionlink { display: none; }
> +:hover > .sectionlink { display: inline; }
>
> /*
> ** Other Customizations
> ]]]
>
> That matches anything with class "sectionlink" that is a direct child of
> what you're hovering over.
>
> Then we can modify our headings like this:
> [[[
> -<div class="h2" id="news" title="news">
> -<h2>News</h2>
> +<div class="h2" id="news">
> +<h2>News<a href="#news" class="sectionlink" title="Link to this section">¶</a></h2>
> ]]]
>
> How's that?

I've created a copy and applied that patch-template:
http://svn-test.borg.ch/

Mmm, nice :)

Here's an attempt at a patch...

I've no idea what happened to the .ja and .zh pages. Unfortunately my 
browser is not able to display those characters.

[[[
Replace title attributes by section links which show up when hovering
over the enclosing header.

* style/site.css
   (.sectionlink): New class.

* contributing.html,
* docs/community-guide/building.part.html,
* docs/community-guide/conventions.part.html,
* docs/community-guide/debugging.part.html,
* docs/community-guide/general.part.html,
* docs/community-guide/index.html,
* docs/community-guide/issues.part.html,
* docs/community-guide/l10n.part.html,
* docs/community-guide/mailing-lists.part.html,
* docs/community-guide/releasing.part.html,
* docs/community-guide/roles.part.html,
* docs/index.html,
* docs/release-notes/1.2.html,
* docs/release-notes/1.3.html,
* docs/release-notes/1.4.html,
* docs/release-notes/1.5.html,
* docs/release-notes/1.6.html,
* docs/release-notes/1.6.zh.html,
* faq.html,
* faq.ja.html,
* faq.zh.html,
* index.html,
* issue-tracker.html,
* mailing-lists.html,
* news.html,
* packages.html,
* roadmap.html,
* source-code.html
   Remove title attributes and add section links to headers.
]]]

Thanks,
Martin

Re: [PATCH]: add section links

Posted by "C. Michael Pilato" <cm...@collab.net>.
I think somebody pointed out that we weren't getting site updates (again).
Maybe poke somebody in #asfinfra?

Mark Phippard wrote:
> Are you seeing your changes on the site?  It all seems the same to me.
> 
> Mark
> 
> 
> On Thu, Feb 11, 2010 at 4:40 PM, Martin Furter <mf...@rola.ch> wrote:
>>
>> On Thu, 11 Feb 2010, C. Michael Pilato wrote:
>>
>>> Julian Foad wrote:
>>>> Martin Furter wrote:
>>>>> New patch and the script are attached, and http://svn-test.borg.ch/ has
>>>>> the updated version too.
>>>> Looks lovely to me. Any objection? Mike?
>>> It rawks.  Commit away.
>> Committed in r909145 and r909157.
>>
>> nmiyo and rocksun:
>> These commits added the english text "Link to this section" to your
>> translations, you may want to replace it with text in your language.
>> The affected files are:
>> * faq.ja.html
>> * docs/release-notes/1.6.zh.html
>> * faq.zh.html
>>
>> Thanks,
>> Martin
>>
> 
> 
> 


-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


Re: [PATCH]: add section links

Posted by Mark Phippard <ma...@gmail.com>.
Are you seeing your changes on the site?  It all seems the same to me.

Mark


On Thu, Feb 11, 2010 at 4:40 PM, Martin Furter <mf...@rola.ch> wrote:
>
>
> On Thu, 11 Feb 2010, C. Michael Pilato wrote:
>
>> Julian Foad wrote:
>>>
>>> Martin Furter wrote:
>>>>
>>>> New patch and the script are attached, and http://svn-test.borg.ch/ has
>>>> the updated version too.
>>>
>>> Looks lovely to me. Any objection? Mike?
>>
>> It rawks.  Commit away.
>
> Committed in r909145 and r909157.
>
> nmiyo and rocksun:
> These commits added the english text "Link to this section" to your
> translations, you may want to replace it with text in your language.
> The affected files are:
> * faq.ja.html
> * docs/release-notes/1.6.zh.html
> * faq.zh.html
>
> Thanks,
> Martin
>



-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

Re: [PATCH]: add section links

Posted by Martin Furter <mf...@rola.ch>.

On Thu, 11 Feb 2010, C. Michael Pilato wrote:

> Julian Foad wrote:
>> Martin Furter wrote:
>>> New patch and the script are attached, and http://svn-test.borg.ch/ has
>>> the updated version too.
>>
>> Looks lovely to me. Any objection? Mike?
>
> It rawks.  Commit away.

Committed in r909145 and r909157.

nmiyo and rocksun:
These commits added the english text "Link to this section" to your 
translations, you may want to replace it with text in your language.
The affected files are:
* faq.ja.html
* docs/release-notes/1.6.zh.html
* faq.zh.html

Thanks,
Martin

Re: [PATCH]: add section links

Posted by "C. Michael Pilato" <cm...@collab.net>.
Julian Foad wrote:
> Martin Furter wrote:
>> New patch and the script are attached, and http://svn-test.borg.ch/ has 
>> the updated version too.
> 
> Looks lovely to me. Any objection? Mike?

It rawks.  Commit away.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


Re: [PATCH]: add section links (was: new website & IRC bot)

Posted by Julian Foad <ju...@btopenworld.com>.
Martin Furter wrote:
> New patch and the script are attached, and http://svn-test.borg.ch/ has 
> the updated version too.

Looks lovely to me. Any objection? Mike?

Please commit if there are no objections by tomorrow. (As you are a
partial committer you should write "Approved by: julianfoad" in the log
message.)

- Julian


> [[[
> Replace title attributes by section links which show up when hovering
> over the enclosing header.
> 
> * style/site.css
>    (.sectionlink): New class.
> 
> * contributing.html,
> * docs/community-guide/building.part.html,
> * docs/community-guide/conventions.part.html,
> * docs/community-guide/debugging.part.html,
> * docs/community-guide/general.part.html,
> * docs/community-guide/index.html,
> * docs/community-guide/issues.part.html,
> * docs/community-guide/l10n.part.html,
> * docs/community-guide/mailing-lists.part.html,
> * docs/community-guide/releasing.part.html,
> * docs/community-guide/roles.part.html,
> * docs/index.html,
> * docs/release-notes/1.2.html,
> * docs/release-notes/1.3.html,
> * docs/release-notes/1.4.html,
> * docs/release-notes/1.5.html,
> * docs/release-notes/1.6.html,
> * docs/release-notes/1.6.zh.html,
> * faq.html,
> * faq.ja.html,
> * faq.zh.html,
> * index.html,
> * issue-tracker.html,
> * mailing-lists.html,
> * news.html,
> * packages.html,
> * roadmap.html,
> * source-code.html
>    Remove title attributes and add section links to headers.
> ]]]
> 
> Martin


Re: [PATCH]: add section links (was: new website & IRC bot)

Posted by Martin Furter <mf...@rola.ch>.

On Tue, 9 Feb 2010, Julian Foad wrote:

> On Tue, 2010-02-09, Martin Furter wrote:
>> I've created a copy and applied that patch-template:
>> http://svn-test.borg.ch/
>>
>> Mmm, nice :)
>>
>> Here's an attempt at a patch...
>
> Thanks! Please tell me you did that with a script, not by hand. You
> might want to enhance your script to catch sections like this one ...
>
>> <div class="h4" id="pre-lock-hook-output" title="pre-lock-hook-output">
>>  <h4>Changed handling of output of <code>pre-lock</code> hook</h4>
>
> ... which it missed. (I'm guessing it's because of mark-up within the
> heading.)

There were a lot more cases it missed. Sorry that I didn't find them 
before.

The new version seems to find almost all cases now. There are 9 remaining 
which can be done by hand. I'd say we fix them after committing this patch 
since they are lost after running the script. If anyone approves that I'm 
gonna commit and fix them afterwards.

I search for the missed ones using the following commandline:
find . -name \*.html -exec grep -H 'title="' {} \; |
   egrep -v '(javahl|docs/api/|Link to this section)'

New patch and the script are attached, and http://svn-test.borg.ch/ has 
the updated version too.

[[[
Replace title attributes by section links which show up when hovering
over the enclosing header.

* style/site.css
   (.sectionlink): New class.

* contributing.html,
* docs/community-guide/building.part.html,
* docs/community-guide/conventions.part.html,
* docs/community-guide/debugging.part.html,
* docs/community-guide/general.part.html,
* docs/community-guide/index.html,
* docs/community-guide/issues.part.html,
* docs/community-guide/l10n.part.html,
* docs/community-guide/mailing-lists.part.html,
* docs/community-guide/releasing.part.html,
* docs/community-guide/roles.part.html,
* docs/index.html,
* docs/release-notes/1.2.html,
* docs/release-notes/1.3.html,
* docs/release-notes/1.4.html,
* docs/release-notes/1.5.html,
* docs/release-notes/1.6.html,
* docs/release-notes/1.6.zh.html,
* faq.html,
* faq.ja.html,
* faq.zh.html,
* index.html,
* issue-tracker.html,
* mailing-lists.html,
* news.html,
* packages.html,
* roadmap.html,
* source-code.html
   Remove title attributes and add section links to headers.
]]]

Martin

Re: [PATCH]: add section links (was: new website & IRC bot)

Posted by Martin Furter <mf...@rola.ch>.

On Tue, 9 Feb 2010, Julian Foad wrote:

> On Tue, 2010-02-09, Martin Furter wrote:
>> I've created a copy and applied that patch-template:
>> http://svn-test.borg.ch/
>>
>> Mmm, nice :)
>>
>> Here's an attempt at a patch...
>
> Thanks! Please tell me you did that with a script, not by hand. You
> might want to enhance your script to catch sections like this one ...

Heh, ofcourse it's a script, I'm too lazy to do that manually :)

>> <div class="h4" id="pre-lock-hook-output" title="pre-lock-hook-output">
>>  <h4>Changed handling of output of <code>pre-lock</code> hook</h4>
>
> ... which it missed. (I'm guessing it's because of mark-up within the
> heading.)

Yes, and that's one of the simpler cases. There are also some entries 
where the opening and closing tag are not on the same line. I guess I need 
to make the script a lot smarter...

Thanks for the review,
Martin

Re: [PATCH]: add section links (was: new website & IRC bot)

Posted by Julian Foad <ju...@wandisco.com>.
On Tue, 2010-02-09, Martin Furter wrote:
> I've created a copy and applied that patch-template:
> http://svn-test.borg.ch/
> 
> Mmm, nice :)
> 
> Here's an attempt at a patch...

Thanks! Please tell me you did that with a script, not by hand. You
might want to enhance your script to catch sections like this one ...

> <div class="h4" id="pre-lock-hook-output" title="pre-lock-hook-output">
>  <h4>Changed handling of output of <code>pre-lock</code> hook</h4>

... which it missed. (I'm guessing it's because of mark-up within the
heading.)

> I've no idea what happened to the .ja and .zh pages. Unfortunately my 
> browser is not able to display those characters.

My browser displays them but I can't read them, but it looks like it's
doing the right thing.

- Julian