Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Navigation #4535

Closed
5 tasks done
JohnONolan opened this issue Nov 28, 2014 · 9 comments
Closed
5 tasks done

Feature: Navigation #4535

JohnONolan opened this issue Nov 28, 2014 · 9 comments
Labels
affects:admin Anything relating to Ghost Admin feature [triage] New features we're planning or working on

Comments

@JohnONolan
Copy link
Member

image

The Navigation UI provides a simple user interface for creating a list of links to output in your theme. The interface allows for the clickable text and url for each link to be entered. Each item can be reordered using drag and drop, edited, removed and new items can be added to the end of the list. In the theme API, we get a new {{navigation}} helper, which works with a default navigation.hbs template, much the same as the {{pagination}} helper.

Sub Issues

Accessibility Questions

Should we wrap with <nav role="navigation"> ? IMO: Feels like clutter - I'd rather let the theme define the wrapping element.

Should we put the ARIA role into the UL? Like <ul class="nav" role="navigation"> to promote better accessibility standards by default? Is this a valid use of the role attribute?

@JohnONolan JohnONolan added settings affects:admin Anything relating to Ghost Admin feature [triage] New features we're planning or working on labels Nov 28, 2014
@ErisDS ErisDS added the epic label Nov 28, 2014
@ErisDS ErisDS added this to the Current Backlog milestone Nov 28, 2014
@ErisDS
Copy link
Member

ErisDS commented Nov 28, 2014

@JohnONolan Two questions:

Should the default 'Home' item only be present in the UI by default (and stored after pressing save) or should it be stored by default and output by the {{navigation}} helper regardless of whether anyone touches this screen?

Should the navigation helper definitely always output absolute URLS? (Note: I moved that part of the spec to #4541)

@JohnONolan
Copy link
Member Author

First question: the latter

Second question: yes (imo)

@craigbutcher
Copy link

@JohnONolan - Accessibility is a must. Check out ARIA roles cheatsheet for help and a few links on that page. Hope this will help!

@ooktay
Copy link

ooktay commented Jan 16, 2015

#4539 is already closed, but this will be harder to change later. So here is my 2c:
These navigation helpers will only be used by the theme developer, right? Then, the keys should be provided by the theme rather than hand coded by the blogger.
If we are thinking about some "universal" keys like "home", then these should be hard coded in ghost to enforce this universal-ness.

@ErisDS
Copy link
Member

ErisDS commented Jan 16, 2015

@ooktay I think you have misunderstood how this will work. Please have a read of #4541. The navigation items will be selected by the blogger, not by the theme developer.

@ooktay
Copy link

ooktay commented Jan 16, 2015

I got it now, the helper outputs a simple menu. Thanks @ErisDS.

@tidyui
Copy link

tidyui commented Jan 18, 2015

Hi there, just thought I'd share my view on post, pages & navigation structures from working with different content management systems for over ten years.

A lot of other platforms make the visual distinction between navigation and the actual content like you're proposing here. One downside with it is that it cripples the publishing flow somewhat since most of the time you're first "writing content", and the "attching it" to a structure. In other words you're transforming a simple task into a two-step process.

Also, for the person writing the content, the only point of separating the navigation structure from the pages is if it's possible to create several navigation structures and publish the same page in several of them at the same time.

A simpler way to present this to the user would maybe be to create a new view called Pages/Site/Whatever where the navigation structure is shown. Here users can create "pages" of different kinds, for example:

  • Content page (post with page=1)
  • Tag archive
  • Internal link (i.e to another post)
  • External link

When the user creates a new entry the new post is created together with the navigation item in a single transaction, making it seemless for the user and turning it into a single step. If this kind of view was created, then maybe it would also be logical to filter out posts with page=1 from the post list.

In other words, the same underlying structure could be used, it's just presented in a different way.

Btw, I really love the project!

Regards

ErisDS added a commit to ErisDS/Ghost that referenced this issue Feb 13, 2015
refs TryGhost#4535

- as discussed in the meeting on 1st February ;)
- changed the fake-placeholder to only operate on the last item, this way it feels right, I think
ErisDS added a commit to ErisDS/Ghost that referenced this issue Feb 16, 2015
refs TryGhost#4535

- all internal urls in ghost have a trailing slash, missing it out will cause nav-current to not work
ErisDS added a commit to ErisDS/Ghost that referenced this issue Feb 25, 2015
ref TryGhost#4535

- don't need this any more :)
ErisDS added a commit to ErisDS/Ghost that referenced this issue Feb 28, 2015
refs TryGhost#4535

- Rather than storing navigation data as a top level key, store it as @blog.navigation
- Reference the global data from the helper
@ErisDS ErisDS closed this as completed Mar 3, 2015
@ErisDS
Copy link
Member

ErisDS commented Mar 3, 2015

🚢 'd it 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:admin Anything relating to Ghost Admin feature [triage] New features we're planning or working on
Projects
None yet
Development

No branches or pull requests

5 participants