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

Navigation Improvements #74

Closed
jackmcdade opened this issue Jan 31, 2020 · 25 comments · Fixed by statamic/cms#6678
Closed

Navigation Improvements #74

jackmcdade opened this issue Jan 31, 2020 · 25 comments · Fixed by statamic/cms#6678
Labels
feedback wanted Let's get a discussion going

Comments

@jackmcdade
Copy link
Member

jackmcdade commented Jan 31, 2020

I've been putting quite a bit of thought into how we can improve the control panel's nav and organization. It feels like too many clicks to get to many of the things we do most often, and I'm not the only one who thinks so (#44, statamic/cms#1014).

Here are some factors that need to be considered in any reorganization:

  • Must be significantly more intuitive/efficient to warrant change
  • Must account for edge cases (0 collections, 1 collection, 25+ collections), which means any kind of "show on hover" interaction is a no-go. I've already tried it and it's awful.
  • Must have a consistent place to create all container-type things (collections, taxonomies, asset containers, globals)
  • The "Structures" section will soon be replaced with "Navs" as part of a refactor of the Structures feature
  • Must not require a reimagining of the entire application "frame" (general layout of header bar, nav bar, content area, etc)

I'd love to get some thoughts and suggestions from anyone who has the time to share.

@jackmcdade jackmcdade added the feedback wanted Let's get a discussion going label Jan 31, 2020
@peter-hicks-ayko
Copy link

As much as it wouldn't and shouldn't happen for sites with large (10+) numbers of collections, it would be extremely useful to be able to surface collections as part of the main navigation, to avoid having to dig into the collections page every time you want to access arguably the most highly-trafficked part of any CMS's control panel - the actual content.

Maybe a configuration setting could be added to provide an array of collections to "pin" to the main navigation if the site admin so chose, so that the X most important collections are a single click away? Might be a little cumbersome to work with, but it avoids the control panel having to make guesses about what the user wants, and avoids cluttering the navigation by default.

@dougstjohn
Copy link

I like that the listing of content and the creation of new content types is so close in the UI on one page. I can click Collections and click the Create Collection button easily. It's also uniform that Create Collection and Create Entry are in the same place on the page. For creating content types, I prefer not having to go to a separate 'Settings' page to create all content types, but that would be one solution.

Currently, you have to click Collections and only then you get the exact same listing in the sidenav and listing area. An idea would be to get rid of the intermediate listing pages (Ex. /cp/collections) that really only add the Create button and entry totals.

You'd have to work out where the Create button goes like into the sidenav listing, a sidenav dropdown next to each CONTENT type, or a separate settings page, plus you'd need to make the display of sidenav listings toggleable as you wouldn't want to see all listings all the time.

Sidenote: I'd recommend adding entry totals to each listing page.

@jackmcdade
Copy link
Member Author

What if we supported pinning collections, taxonomies, and global sets to the top of the nav? Would that alone make enough difference?

image

@peter-hicks-ayko
Copy link

peter-hicks-ayko commented Jan 31, 2020 via email

@jesseleite
Copy link
Member

What if we supported pinning collections, taxonomies, and global sets to the top of the nav?

Just a note that you can already pin a specific collection/taxonomy/etc. to the favorites in the search bar, though it's not as in-your-face as pinning to the nav itself.

@jackmcdade
Copy link
Member Author

Right, though at best you're still 2 clicks away (but no refresh), and those are per-user instead of global.

@jonassiewertsen
Copy link

jonassiewertsen commented Jan 31, 2020

Pinning, as shown above, would make a big difference. Especially from the client perspective!

Just thinking about the edge case, if there is only 1 or 2 collections (like blog or news).
Would it be confusing to have them pinned AND listed under collections as well? Will it be clear to a client or confusing having the same thing in multiple places?
Does it make sense to control visibility in the pinned section on it's own (permissions?) or is it nonsense?
Maybe an option: Don't show in Content if pinned? Helpful or confusing?

To repeat myself: Pinning would be great!

@wm-simon
Copy link

wm-simon commented Feb 5, 2020

I'm missing the "Save and add new entry" link, which add a new entry to the current depth. After adding an entry, now, i always have to go back and click for a new entry.

If you work with multiple blueprints per collection and want to add a new child, you can't choose the blueprint. It's always the default. If you add a new entry with the button at the top, you can choose the blueprint, but than you have to order the entry to the correct position.


//Edit
I saw, this issue is just about the main navigation, right? Should I post it anywhere else? Sorry.

@jackmcdade
Copy link
Member Author

@Pfeifakopf Yeah that's a completely separate issue that's actually already open: statamic/cms#675 :)

@goellner
Copy link

When creating a new page from within collections, the nav on left side always switches to structures, once a new page has been saved.

@jackmcdade
Copy link
Member Author

@goellner thats gonna change when replace structures with the nav builder.

@goellner
Copy link

So structures are getting renamed basically?

@jasonvarga
Copy link
Member

jasonvarga commented Feb 12, 2020

Structures will be a "behind-the-scenes" feature.
The current Structures section in the nav will become "Navs" (or a better name) and contain only the navigation-type structures.
The collection-type structures will be more integrated into collections themselves. Tell a collection you want it to be "structured" and, its listing will just become a page tree.

A discussion for a different thread though.

@bakerkretzmar
Copy link

Are you guys still considering tweaking this? If so I'm happy to PR a basic implementation for you to play with. I ran into this today and it was very little code to change to just always show all the children:

// in CP/Navigation/Nav.php, line 150

 ->filter(function ($item) {
-    return is_callable($item->children()) && $item->isActive();
+    return is_callable($item->children());
 })
// in resources/views/partials/nav-main.blade.php, line 15

- @if ($item->children() && $item->isActive())
+ @if ($item->children())

Could easily be made configurable with a config option like statamic.cp.expand_nav, set it to active by default or something and let users set it to true if they want. Then instead of removing the isActive() checks you check that and also check if the user wants to override it.

@jesseleite
Copy link
Member

@bakerkretzmar The reason why children are within closures and only shown when the item is active is for query-related performance reasons. I think we're considering the pinnable collections/taxonomies/globals/etc thing Jack mentioned though.

@bakerkretzmar
Copy link

@jesseleite yep, makes sense. Are you open to letting users override it if they don't mind the performance ding? Maybe on a per-top-level-menu-item basis, so they could just do Collections for example?

@purplespider
Copy link

I see this has been closed but can't work out why. e.g. still no way to easily restore the top-level "Pages" nav item like v2?

@joseph-d
Copy link

I wasn't around for v2 but I can say that using v3 this is definitely a sticking point that's come up when I try to explain the CP to users. At some point, I'm going to say to a user that that pages collection "is special" to which they invariably ask, "so why does it look like all of the others?"

The pinning idea sounds good to me. For now my workaround is to do title: 📄 Pages in the collection's yaml. Addition of the emoji has the added bonus of alphabetising the pages collection down at the bottom of the list to further emphasize it's specialness!

Screenshot_20210412_105045

@jasonvarga jasonvarga reopened this Apr 12, 2021
@jasonvarga
Copy link
Member

Not really sure why this was closed. 🤔

@tobyjug
Copy link

tobyjug commented Apr 12, 2021

From a end-user's point of view, the term 'Collection' is alien to them when editing a website. 'Content' is fine, but then they would expect to see things like Pages, Blog, Gallery for example directly under that.

@el-schneider
Copy link

I think the discussed pinning feature would make a huge difference in usability and just wanted to encourage you to pick @jackmcdade's proposal up again.

However I think the best solution would be if all elements within the nav could be arranged freely via drag and drop and the whole navigation could be treated in a way similar to how columns are treated in a collection list view now. Preferably with the settings being saved individually for each user, since, as with columns, it's reasonable to expect different users having different priorities. This should include having top-level groups or folders that can store arbitrary links and adding rules or spacers for separation. I realize that this is a lot of work but I think the impact on usability (especially for the end-user) would make it worthwile.

But short-term I would also happily take the pinning feature, that just puts everything at the top 😃

@aerni
Copy link

aerni commented Jul 16, 2021

I like the idea of @el-schneider. I would also prefer a more dynamic solution. Let's say you have an SEO global. I would like this global to be its own nav item and remove it from the Globals nav and listing.

I come across this issue all the time when building addons. I don't want to build my own addon views and figure out how to save content. I simply want to hook into collections, taxonomies, globals, etc. But the addon deserves its own dedicated nav items or even nav group.

Take the Aardvark SEO as example. General Settings could be a global. But you don't want that global show up in the Globals nav or Globals listing.

Bildschirmfoto 2021-07-16 um 2 49 52 PM

@montemartin
Copy link

I'll third the ideas of @el-schneider and @aerni. Being locked into the default sidebar structure is a big sticking point for me about Statamic. I constantly run into problems deciding between whether something should be a Collection or a Taxonomy. The difference shouldn't be something an end user needs to understand. Sometimes a group of content might have the functionality of a taxonomy, but it makes more sense when nested with other collections for end-users.

Having free-form sidebar organization would be the perfect solution to this. Letting users customize it would be nice, but the ideal for me would be to save a configuration for each permissions group.

@jasonvarga
Copy link
Member

FYI You can override the entire nav by creating a custom view.

Create resources/views/vendor/statamic/partials/nav-main.blade.php and add whatever you want. For example:

<nav class="nav-main" v-cloak>
    <div class="nav-main-inner">
        <h6>Content</h6>
        <ul>
            @php($url = cp_route('collections.show', 'pages'))
            <li class="@if (request()->fullUrl() === $url) current @endif">
                <a href="{{ $url }}">
                    <i>{!! Statamic::svg('collection') !!}</i><span>Pages</span>
                </a>
            </li>
        </ul>
    </div>
</nav>

jasonvarga pushed a commit to statamic/cms that referenced this issue Jan 13, 2023
@jasonvarga
Copy link
Member

Will be included in the new nav builder in 3.4. statamic/cms#6678

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback wanted Let's get a discussion going
Projects
None yet
Development

Successfully merging a pull request may close this issue.