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
JohnONolan opened this issue Nov 28, 2014 · 9 comments

Comments

Projects
None yet
5 participants
@JohnONolan
Copy link
Member

commented Nov 28, 2014

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

  • Create the new screen (issue #4537)
  • Handle the data as a setting (issue #4539)
  • Drag and drop reordering (issue #4540)
  • Base URL preview (issue #4807)
  • Helper / output (issue #4541)

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?

@ErisDS ErisDS added the epic label Nov 28, 2014

@ErisDS ErisDS added this to the Current Backlog milestone Nov 28, 2014

PaulAdamDavis added a commit to PaulAdamDavis/Ghost that referenced this issue Nov 28, 2014

Add Labs, Nav & Grab icons
References TryGhost#4535, TryGhost#4534

- Add an Atom icon for Labs page
- Adds Compass and Grab icons for the Navigation page
@ErisDS

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member Author

commented Nov 29, 2014

First question: the latter

Second question: yes (imo)

@craigbutcher

This comment has been minimized.

Copy link

commented Jan 16, 2015

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

@ooktay

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link

commented Jan 16, 2015

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

@tidyui

This comment has been minimized.

Copy link

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

@Reedyn Reedyn referenced this issue Jan 18, 2015

Open

Menu-system #37

ErisDS added a commit to ErisDS/Ghost that referenced this issue Feb 13, 2015

Use placeholder only for last item
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

Ensure internal nav items have a trailing slash
refs TryGhost#4535

- all internal urls in ghost have a trailing slash, missing it out will cause nav-current to not work
@ErisDS

This comment has been minimized.

Copy link
Member

commented Feb 17, 2015

Steps to ship it (:shipit:) -

ErisDS added a commit to ErisDS/Ghost that referenced this issue Feb 25, 2015

Remove navigation config flag
ref TryGhost#4535

- don't need this any more :)

ErisDS added a commit to ErisDS/Ghost that referenced this issue Feb 28, 2015

Make the {{navigation}} helper global
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 Mar 3, 2015

@ErisDS

This comment has been minimized.

Copy link
Member

commented Mar 3, 2015

🚢 'd it 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.