Bug 28111

Summary: tools trivia: make page titles fit in browser tabs, and remove obsolete devhelp index generation
Product: Telepathy Reporter: Will Thompson <will>
Component: tp-specAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: git master   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/wjt/telepathy-spec-wjt.git;a=shortlog;h=refs/heads/trivia
Whiteboard: r+
i915 platform: i915 features:

Description Will Thompson 2010-05-14 11:55:13 UTC
Right now if you have a bunch of (say) channel interfaces open in tabs, you can't see which is which because the tabs only have room for “org.freedesk…”.

I have a branch which abbreviates "Connection" to "Conn", "Channel" to "Chan", "Interface" to "I" so your tabs instead say things like “Chan.Type.DBu…” and “Conn.I.Balance …”, which is significantly more useful.

Oh, and I noticed that we're still generating the devhelp index for the old spec, so I binned that.
Comment 1 Simon McVittie 2010-05-17 07:54:04 UTC
r+ for the second commit, feel free to cherry-pick it while we discuss the first.

> +        # Bit of a hack, but... I want useful information about the current
> +        # page to fit in a tab in Chromium. I'm prepared to be disagreed with.
> +        self.really_short_name = (
> +            self.short_name.replace('Interface', 'I')
> +                           .replace('Channel.', 'Chan.')
> +                           .replace('Connection.', 'Conn.')
> +            )

I'd prefer to anchor the patterns with a dot before *and* after, like:

    self.short_name.replace('.Interface.', '.I.')

to avoid problems if someone defines a GraphicalUserInterface interface, or something. With that change in all three substitutions, consider it reviewed.

I wouldn't object to replacing ".Type." with ".T." either.
Comment 2 Simon McVittie 2010-06-08 09:40:05 UTC
(In reply to comment #1)
> r+ for the second commit, feel free to cherry-pick it while we discuss the
> first.

I timed out and merged it.

> I'd prefer to anchor the patterns with a dot before *and* after, like:
> 
>     self.short_name.replace('.Interface.', '.I.')
> 
> to avoid problems if someone defines a GraphicalUserInterface interface, or
> something. With that change in all three substitutions, consider it reviewed.
> 
> I wouldn't object to replacing ".Type." with ".T." either.

I've done these in branch smcv/html, and also changed the filenames to be shorter:

gitweb: http://git.collabora.co.uk/?p=user/smcv/telepathy-spec-smcv.git;a=shortlog;h=refs/heads/html
HTML: http://people.freedesktop.org/~smcv/telepathy-spec-html/spec/
Comment 3 Simon McVittie 2010-06-08 09:41:53 UTC
(In reply to comment #2)
> I've done these in branch smcv/html, and also changed the filenames to be
> shorter:
> 
> gitweb:
> http://git.collabora.co.uk/?p=user/smcv/telepathy-spec-smcv.git;a=shortlog;h=refs/heads/html
> HTML: http://people.freedesktop.org/~smcv/telepathy-spec-html/spec/

Side benefit of this: because I'm generating the output filenames from the <node> name, which is also what the codegen uses, we get filenames that are independent of stability. When ContactList.DRAFT either advances to .DRAFT2 or gets declared stable, it will still be in Connection_Interface_Contact_List.html.
Comment 4 Simon McVittie 2010-06-08 10:11:05 UTC
Fixed in 0.19.7.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.