Closed Bug 253480 Opened 19 years ago Closed 19 years ago

pages should be classified rather than identified by domain name

Categories

(Bugzilla :: User Interface, defect)

2.17.7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: myk, Assigned: kiko)

References

Details

Attachments

(1 file)

Bugzilla pages are identified by domain name via an "id" attribute on the body
tag, but the "id" attribute is supposed to identify tags uniquely, and the
domain name of a Bugzilla installation applies to a class of pages (all the
pages on the site) rather than a single page.  Bugzilla should classify pages by
domain name by putting the domain name into the "class" attribute on the body
tag and use the "id" attribute for a values that uniquely identify pages (f.e. a
reference to the bug number for a show_bug.cgi page).
Once we release with id="foo" it becomes much more difficult to fix this, so we
should fix it before we ship 2.18.
Flags: blocking2.18?
Target Milestone: --- → Bugzilla 2.18
Version: 2.19 → 2.17.7
I can't see why this should be necessary. The CSS spec [1] says:

  HTML also introduces the 'ID' attribute which is guaranteed to have a 
  unique value over the document. It can therefore be of special importance 
  as a style sheet selector, and can be addressed with a preceding '#':

The HTML spec [2] says:

  id = name [CS]
  
  This attribute assigns a name to an element. This name must be unique in a 
  document.
  
Note the "document"-centric wording. It doesn't say anywhere that ID should be
unique over a site or a collection of pages, and that actually makes sense to me.

Is there a practical reason why we should shun id instead of class?

[1] http://www.w3.org/TR/REC-CSS1#id-as-selector
[2] http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2
> Is there a practical reason why we should shun id instead of class?

Yes.  We added the ID to let users style our site via user stylesheets.  User
stylesheets apply to all pages on the web, though, so they present a situation
not accounted for by the document-centric HTML spec.

We chose to use installation domain names to identify sites per a proposal
making its way around the blogosphere to enable user styling of sites until
native browser solutions like bug 238099 become available, but that only enables
site-wide styling.

We want users to be able to style CGI output in general and specific pages as
well where appropriate (f.e. for show_bug.cgi).  For that we need to make the
site identifier a class and save the "id" attribute for something which is
really page-specific.
Blocks: bz-css
Attached patch kiko_v1: okaySplinter Review
Not rocket science.
Assignee: myk → kiko
Status: NEW → ASSIGNED
Comment on attachment 156859 [details] [diff] [review]
kiko_v1: okay

Looks good. r=myk
Attachment #156859 - Flags: review+
I see we're waiting on blocking 2.18..
Flags: approval?
Flags: approval2.18?
Flags: blocking2.18?
Flags: approval?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval+
Fixed.

/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/header.html.tmpl,v
 <--  header.html.tmpl
new revision: 1.28; previous revision: 1.27

/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/header.html.tmpl,v
 <--  header.html.tmpl
new revision: 1.24.2.1; previous revision: 1.24
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.