Problem/Motivation

A first draft to generate the create menu items:

  • Content types
  • Image
  • File
  • User

While we might need to hard code Image, File and User for now.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Blocks, Media & Taxonomy are using a submenu to avoid flooding the menu with items and to help categorize them.

API changes

Data model changes

Issue fork navigation-3388367

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

saschaeggi created an issue. See original summary.

saschaeggi’s picture

Title: Generate content menu items » Generate create menu items
Issue summary: View changes
saschaeggi’s picture

Status: Active » Needs review
saschaeggi’s picture

Issue summary: View changes
lauriii’s picture

Status: Needs review » Fixed

Merged the MR! It's good enough for now. We'll have to still update the code to get rid of the hard coded entity types so that it doesn't break if you don't have some of the modules enabled.

  • lauriii committed 83d68590 on 1.x
    Revert "Issue #3388367: Generate content menu items"
    
    This reverts...
lauriii’s picture

Status: Fixed » Needs work

Got feedback from @ckrina that we should not introduce the submenus to the "Create" menu, and that we should implement a solution that displays a filtered list of options but on a single level.

saschaeggi’s picture

I like the flat hierarchy but the potential problem I see with this approach is that you can end up with items with the same name from different entitites. So we would need to either

a) Categorize them (using type titles)
b) Show which entity type it is on each item

Let's discuss this at DrupalCon ☺️

ckrina’s picture

Agreed, we need to have the conversation about having an special UI to handle this. I'd be great to get a first draft of the "what" defined at DrupalCon.

Anyway, for solving this specific issue for now I'd go with 2 tickets so we can ask to people what they see more useful:

Option 1, merged to keep a closer result of what we have right now:

  1. Implement your solution for nodes
  2. Let'snot add blocks yet
  3. Implement the media links manually: just Images and Files for now
  4. Implement the tags with the same solution you proposed for nodes
  5. Keep current implementation for users

Option 2, open a MR with the existing proposal in this MR. But maybe without blocks?

Thoughts?

saschaeggi’s picture

I think both work well, as long as we somehow can overcome the hardcoded links as a first iteration.

Let's discuss this later this week so we can get a first iteration in and working on the end result how the "pie in the sky" version should look like

saschaeggi’s picture

@ckrina and I discussed how we want to move forward with this for now:

We'll keep the content types while removing Blocks, Media & Taxonomy for now (as an intermediate solution).

The following links should be added (maybe manually):

  • Image
  • File
  • User

Also have a look at https://www.drupal.org/project/gin/issues/3394085 for adding the code to check if types actually exist and the corresponding modules are enabled.

saschaeggi’s picture

Issue summary: View changes
saschaeggi’s picture

Issue summary: View changes

markie made their first commit to this issue’s fork.

markie’s picture

Status: Needs work » Needs review

Reviewed the work done in Gin and used a bit of the code to verify content types, block types, term vocabularies, and if media is enabled, media items. Fun fact, Image and Files are media entities, so if the module isn't enabled, it won't have an add path. I wanted to capture the logic in this branch with a commit before removing blocks, media and taxonomy, but also would like y'all to look at the result and see if maybe it becomes acceptable.

markie’s picture

Issue tags: +DrupalCon Lille 2023

Forgot our fancy tag..

ckrina’s picture

Status: Needs review » Needs work

Thanks @markie! What @saschaeggi meant in comment #13 is that we want to remove the submenu and groupings from the Create item, so we have a list without anything opening a submenu. So it would look like:

  • Recipie (if Node is enabled)
  • Article (if Node is enabled)
  • Basic Page (if Node is enabled)
  • Image (if Media module is installed)
  • File (if Media module is installed)
  • User
markie’s picture

Status: Needs work » Needs review

Updated listing and verified that if media exists, the proper items are shown. I feel that we should list all media entity types but that's up to y'all.

saschaeggi’s picture

Status: Needs review » Needs work

Hey @markie thanks for working on this. I left some comments/suggestions in the MR 👀

kostyashupenko made their first commit to this issue’s fork.

kostyashupenko’s picture

Status: Needs work » Needs review
ckrina’s picture

Status: Needs review » Needs work

Thanks for moving this forward!

The content menu should end up being (at least for now):

  • Create
    • Article
    • Basic Page
    • Recipe (if Umami)
    • Image (if Media module is installed)
    • File (if Media module is installed) <-- Missing
    • User
  • Content
  • Files
  • Media<-- Missing

The File in the Content creation item is missing, and also the link to Media. So moving this to NW.

This is also removing the Blocks. I don't think it's a big deal for now, but we'll need to validate that in follow-ups.

saschaeggi’s picture

Media<-- Missing

This one might be my mistake as it seems i marked the wrong lines for removal, sorry!

markie’s picture

I would like to reiterate that there is no `/file/add` or anything so the closest thing we have is the "Document" media entity type. I realize the one I added was removed at Sascha's request. Would you like that named "File" instead of "Document"?

ckrina’s picture

Agh, that’s right that it’s called Document. So yeah, I’d use Document instead of File for now (and let’s figure out later the best default, but at least we can test now and get some feedback).
Thanks!

ckrina’s picture

Status: Needs work » Fixed

Merging this so we can start working on top of it. Thanks all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.