Closed
Bug 919065
Opened 11 years ago
Closed 11 years ago
Enable writers to specify that a nav section should be open by default.
Categories
(developer.mozilla.org Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: wbamberg, Unassigned)
References
Details
(Keywords: dev-doc-needed, Whiteboard: [specification][type:feature])
What problems would this solve?
===============================
For important pages that are likely to be useful to lots of people, I'd like users to be able to reach them in one click from the landing page. For example, I'd like the reference pages for developer tools (for example, https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector) to be reachable in one click from the landing page.
It would make sense, I think, to have a section in the navbar like "Reference", that contains links to these pages (alongside other items like, perhaps, "Tutorials" and "Screencasts") and I'd like a way to specify that this section should be open by default. Then the initial navbar appearance could be like this:
* Tutorials
* Screencasts
* Reference
** Inspector
** Debugger
** ...
I could replicate this structure on every page, then a user would only need 1 click to get to the reference, wherever they are, and they wouldn't have to go hunting around inside menus.
Who would use this?
===================
Users.
What would users see?
=====================
navbar, or quick links, like this:
* Tutorials
* Screencasts
* Reference
** Inspector
** Debugger
** ...
rather than this:
* Tutorials
* Screencasts
* Reference
What would users do? What would happen as a result?
===================================================
Users would know where to find a reference page for a particular tool.
Is there anything else we should know?
======================================
Reporter | ||
Comment 1•11 years ago
|
||
This bug needs to be fixed before we can finish porting the SDK docs to the MDN wiki.
Comment 2•11 years ago
|
||
Would it be reasonable to ask you to add a "data-default='true'" on a main item? If you'll do that, I can make this happen as soon as Monday.
Reporter | ||
Comment 3•11 years ago
|
||
Yes, I'm pretty sure that would be perfect!
Updated•11 years ago
|
Comment 4•11 years ago
|
||
(In reply to David Walsh :davidwalsh from comment #2)
> Would it be reasonable to ask you to add a "data-default='true'" on a main
> item? If you'll do that, I can make this happen as soon as Monday.
I've added the attribute in the JSRef macro now:
https://developer.mozilla.org/en-US/docs/Template:JSRef
In action:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number
Comment 5•11 years ago
|
||
Though we often want them open by default, we also have cases where we don't want this to be done. Example: the whole CSS Reference at the bottom of the CSS Quick links should be, so we must be able to toggle the default (with a class for example) E.g. no class = open, class="closed" closed by default.
Comment 6•11 years ago
|
||
I don't think we should block the launch with this, unless the SDK is required (but I don't think so). But it is something we really want.
Will can you confirm? Before I hand this out to Ali for the decision (on blocking).
Flags: needinfo?(wbamberg)
Reporter | ||
Comment 7•11 years ago
|
||
Jean-Yves: I can confirm that this is a blocker for
Flags: needinfo?(wbamberg)
Reporter | ||
Comment 8•11 years ago
|
||
... the SDK docs to be added to MDN.
I don't think the SDK docs being in MDN is a blocker for the redesign launch. So I'm basically neutral on whether this should be a redesign launch blocker.
But I really want to get the SDK docs into MDN, so it's important to me all the same.
Comment 9•11 years ago
|
||
David, would it be technically possible (in a reasonable amount of time) to:
- have quicklinks folders opened by default
- have a folder closed by default if it has a specific class (so that writers can control it)
Also adding habber for feedback here.
Flags: needinfo?(hhabstritt.bugzilla)
Flags: needinfo?(dwalsh)
Comment 10•11 years ago
|
||
As I suggested above, adding the following to a menu item would allow me to know if I should automagically open it:
data-default='true'
I'm up for other ideas though.
Are we trying to do the exact same thing as the subnav though, where we try to match the current page URL with the the link in the quick links?
Anyways, tell me what to do and I'll do it.
Flags: needinfo?(dwalsh)
Comment 11•11 years ago
|
||
David, a data- attribute looks good to me.
I would prefer data-default-state="open" (with a closed state if not present). The name change would allow to have other default in the future (we never know, though I have nothing in mind). The default for open is that most of the time we want them open, as they are quicklinks.
David: could you confirm this, so that I can put [impl-ready] in the whiteboard, if holly approves?
Ali: I think this is not a hard-blocker, but we should block because we are close to be implementation ready and David is efficient enough to be able to fix this quickly, making it a low-hanging fruit. The benefits of having this is big for writers.
Adding dev-doc-needed as this will be needed to be documented in the Project:MDN zone (or whatever it will be called)
Updated•11 years ago
|
Blocks: MDNLaunchBlockers
Comment 14•11 years ago
|
||
So this needs to be done within both the "Quick Links" and the Zone subnav? Just want to be sure.
Updated•11 years ago
|
Flags: needinfo?(wbamberg)
Flags: needinfo?(jypenator)
Flags: needinfo?(hhabstritt.bugzilla)
Reporter | ||
Comment 15•11 years ago
|
||
For the SDK, no, because the SDK docs live inside the Add-ons zone and aren't themselves a zone. But I think it would be a useful thing t have in the Zone subnav too.
Flags: needinfo?(wbamberg)
Comment 16•11 years ago
|
||
This would be extremely useful for both. I really look forward to have this in my JS reference quick links navigation, too.
Flags: needinfo?(jypenator)
Comment 17•11 years ago
|
||
For Quicklinks, definitively. I've not used zone nav for the moment, so I'm not 100% sure there.
Comment 18•11 years ago
|
||
Lastly, do you want to add `data-default-state="open"` to the A element or the LI element for the menu toggle?
Comment 19•11 years ago
|
||
(In reply to Jean-Yves Perrier [:teoli] from comment #17)
> For Quicklinks, definitively. I've not used zone nav for the moment, so I'm
> not 100% sure there.
It would definitely be useful for both, but right now I find it more urgent for quicklinks (if we have to treat them as separate jobs).
I think putting the info on the <li> would be more convenient. But we'll have to add UI for this eventually anyway.
Comment 20•11 years ago
|
||
I have no strong feelings about <a> and <li>. I just note that, in JSRef, Florian put it on the <a>, but this is easy to fix). I think <li> would be better (as we are not sure to want an <a> there)
Comment 21•11 years ago
|
||
Commits pushed to master at https://github.com/mozilla/kuma
https://github.com/mozilla/kuma/commit/d8a5b82b1ca4234f0660b3ef69e7f99b98697584
fix bug 919065 - Allow attribute for auto-opening a quicklink menu
https://github.com/mozilla/kuma/commit/4b0041060385dc4ddee9314a897142bc5831a7b5
Merge pull request #1634 from darkwing/default-open-919065
fix bug 919065 - Allow attribute for auto-opening a quicklink menu
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•5 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
•