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

Add option to toggle the snippet admin to a list per snippet type #6773

Open
wants to merge 2 commits into
base: 3.0
Choose a base branch
from

Conversation

wimvds
Copy link
Contributor

@wimvds wimvds commented Aug 4, 2022

Added a config toggle to switch between the single snippet list view (current) and a list view per snippet type (with a navigation entry per snippet type in the admin sidebar).

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets
Related issues/PRs #4278
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

A config toggle to switch between the single snippet list view (current) and a list view per snippet type (with a navigation entry per snippet type in the admin sidebar) has been added to the Sulu snippet configuration.

Why?

The single list of snippets becomes a burden when you have a few snippet types with a lot of content, it's easier to manage the snippet types separately.

Example Usage

The default admin view for the snippets is the current single list view. To toggle to the new view (with subnavigation per snippet type) you should have the following in your configuration :

sulu_snippet:
    admin_view: types_list

To revert back either remove the admin_view or set it's value to single_list.

A screenshot of the admin when the new view is active :
snippets-nav

To Do

  • Create a documentation PR

Fix SnippetAdmin tests
Add config option to toggle between old (single list) snippet view & new (split per type) snippet view
@wimvds wimvds changed the title Snippet admin per type (navigation) Add option to toggle the snippet admin to a list per snippet type Aug 4, 2022
@wimvds
Copy link
Contributor Author

wimvds commented Aug 5, 2022

I just realized that this can also be done by decorating the StructureFormMetadataLoader and replacing the AdminSnippet service via Symfony configuration... So maybe I could just document how to do that instead (though it's not 100% future proof of course - as it depends on the StructureFormMetadataLoader not changing ;p).

@alexander-schranz alexander-schranz added the Feature New functionality not yet included in Sulu label Aug 8, 2022
@alexander-schranz
Copy link
Member

@wimvds Nice work, we need to discuss also with the UX team in which direction we want to go here. Thank you already for the work and implementation you provided.

@alexander-schranz alexander-schranz added UX Affecting the end user To Discuss The core team has to decide if this will be implemented labels Aug 23, 2022
@mario-fehr
Copy link
Contributor

How about a tabview like in the ArticleBundle?

@mamazu
Copy link
Contributor

mamazu commented Feb 25, 2023

Voting all for it, but I think the tabview could be a problem if you have a lot of snippet types.

@alexander-schranz
Copy link
Member

Think this is something we could discuss again when we now rewrite the articles and snippets based on Content Bundle. To think what is best or if we want to have possibility todo it by config or not.

@alexander-schranz alexander-schranz changed the base branch from 2.4 to 3.0 May 2, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality not yet included in Sulu To Discuss The core team has to decide if this will be implemented UX Affecting the end user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants