Closed
Bug 917748
Opened 11 years ago
Closed 11 years ago
[Redesign] Quicklinks eat first paragraph or banner in some cases
Categories
(developer.mozilla.org Graveyard :: Design, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: teoli, Unassigned)
References
Details
THe quicklinks eat everything between:
<h2 class="Quick_links"> and the next <h2>
One common pattern that we have is
<h2 class="Quick_links">
<ol>
...
</ol>
Text or banner
<h2>
Text or banner are just eaten.
The quick_links feature must stop at the end of the first </ol>.
Reporter | ||
Comment 1•11 years ago
|
||
Note this is likely to be blocking our part of the work, so it is quite urgent to fix.
Reporter | ||
Updated•11 years ago
|
Summary: [Redesign] Quicklinks → [Redesign] Quicklinks eat first paragraph or banner in some cases
Comment 2•11 years ago
|
||
Yeah, this is why I wanted Quick Links to appear only at the end of documents -- we'd avoid this section grabbing stuff.
Thoughts here, Les? Can we extract a piece of a section without taking out the entire block?
Flags: needinfo?(lorchard)
Reporter | ||
Comment 3•11 years ago
|
||
David: yes, it would help to be able to define that these should be at the end only. Unfortunately the templates that we modify to prevent us to modify all the documents manually are always at the top :-( If this weren't the case, I would have been all to set a rule to put the QL at the end only.
Comment 4•11 years ago
|
||
(In reply to David Walsh :davidwalsh from comment #2)
> Thoughts here, Les? Can we extract a piece of a section without taking out
> the entire block?
No. The Quick Links feature uses section extraction, and this is how section identification is designed: A section starts at a header, and ends at the next header of equal or higher level. (ie. h2-to-h{1,2}) It's a simplification of the HTML5 outline algorithm.
You can also wrap markup in a <section id="Quick_Links">...</section> to explicitly delineate the section.
We can make it more complicated, but lots of things assume & depend on section extraction working this way.
Are there any examples of markup that absolutely cannot work around these rules?
Comment 5•11 years ago
|
||
Jean-Yves: If you're running into this issue with your secondary breadcrumb stuff, I think Les' solution above is perfect. Explicitly add your own <section id="Quick_Links"></section> stuff around the secondary breadcrumb code (within the template), and you should be good -- right?
Flags: needinfo?(lorchard)
Comment 6•11 years ago
|
||
(In reply to Les Orchard [:lorchard] from comment #4)
> You can also wrap markup in a <section id="Quick_Links">...</section> to
> explicitly delineate the section.
Hmm, although it looks like part of our doc processing wipes out a manually-assigned ID in a <section>. So, that's a bug we need to fix. But, I think an explicit <section> is the answer to this bug
Reporter | ||
Comment 7•11 years ago
|
||
Using sections is a perfect solution for me.
Not to wipe out id on section is probably easy (I remember submitting similar PR long time ago), do you want me to file a bug for this?
Really like the <section> solution :-) :-) :-)
You guys made my day again!
Reporter | ||
Comment 8•11 years ago
|
||
(I keep this open until I was able to confirm it works as expected)
Reporter | ||
Comment 9•11 years ago
|
||
s/was/am
Comment 10•11 years ago
|
||
(In reply to Les Orchard [:lorchard] from comment #6)
> (In reply to Les Orchard [:lorchard] from comment #4)
>
> > You can also wrap markup in a <section id="Quick_Links">...</section> to
> > explicitly delineate the section.
>
> Hmm, although it looks like part of our doc processing wipes out a
> manually-assigned ID in a <section>. So, that's a bug we need to fix. But, I
> think an explicit <section> is the answer to this bug
I think I have a fix for this bug now too:
https://github.com/mozilla/kuma/pull/1388
Comment 11•11 years ago
|
||
Commits pushed to master at https://github.com/mozilla/kuma
https://github.com/mozilla/kuma/commit/de6d6d8de56c18ea8e9efff6a3ea32cf92c88d3e
bug 917748: Preserve manually-supplied ID on <section>s
https://github.com/mozilla/kuma/commit/fe68e016cdaabeb72090de4ee16ca067766afda0
Merge pull request #1388 from lmorchard/917748-manual-section-id-fix
bug 917748: Preserve manually-supplied ID on <section>s
Reporter | ||
Comment 12•11 years ago
|
||
This is fixed, I confirm it. I'm using it now everywhere! Thank you all.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•