Node bundles support

Created on 17 July 2023, over 1 year ago
Updated 13 September 2024, 2 months ago

Problem/Motivation

Now by default the module supporting 'page' bundle only.

Proposed resolution

Remove config, update form_alter
OR
make settings form for bundle selection.

The problem is that nobody can't use it from the box as expected related to the UX. The users expexted that menu UI will be updated for all bundles without any manipulation with configs/code/settings. The simple solution will be remove same checking. The second variant - create settings form in the 'Content autoring' section as enhancement oe advanced option.

Thanks.

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇺🇦Ukraine t1mm1 Kiev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @t1mm1
  • 🇺🇦Ukraine t1mm1 Kiev

    The patch

  • 🇺🇦Ukraine t1mm1 Kiev

    I also added some checking for empty values. Via some processes it makes fatal as well.

  • Status changed to Needs review over 1 year ago
  • 🇺🇦Ukraine t1mm1 Kiev

    Please, take a look for review.

  • 🇺🇦Ukraine t1mm1 Kiev
  • Assigned to peter törnstrand
  • 🇸🇪Sweden peter törnstrand

    Thanks, will have a look.

  • Status changed to Needs work 3 months ago
  • 🇸🇪Sweden peter törnstrand

    I can't remember why I made config for this. But the way forward is to create a settings form for this as it will break existing installations just changing the behavior.

  • 🇺🇦Ukraine t1mm1 Kiev

    Hi, Peter.
    In current implementation menu tree works for the 'page' bundle only. For example. if you create a new one custom bundle for node - it will not work there at all. It's from the box.
    I just propouse to upgrade settings for it. The config will be same. Just settings form and save process that will update config. It's not about minor changes. It's about enhancement. In will not break existing installations because there is no settings at all. And just 'page' bundle supporting only.

    Lemme explaine some my expirience. Some customes wants to use it for selected bundles, not for all. And keep some bundles with default menu link creation. I think it's good point when customer can select bundles for menu tree.

    My patch is not same, nut it provide to use menu tree for all bundles.

    Thanks.

  • 🇺🇦Ukraine t1mm1 Kiev

    Updated patch for 1.0.2.

  • 🇸🇪Sweden peter törnstrand

    In current implementation menu tree works for the 'page' bundle only. For example. if you create a new one custom bundle for node - it will not work there at all. It's from the box.

    This is not true. You can just edit the menu_tree.settings.yml in your config folder and add all the bundles you want using the menu tree widget. Don't forget to import the config after (drush cim).

    bundles:
      - page
      - article
      - custom_bundle

    But, I can see that a config form for this is warranted.

  • 🇺🇦Ukraine t1mm1 Kiev

    "This is not true. You can just edit the menu_tree.settings.yml in your config folder and add all the bundles you want using the menu tree widget. Don't forget to import the config after (drush cim)."

    So, just imagine. You working in company that has 100+ clients. A lot of them sometimes make updates - they create a custom node types. How many hours will be spend to update/export/import configs and re-deploy on dev, stage and product? In your case you should support each client env manually.

    No problem. I just propouse a typical solution related to drupal way.
    Thanks for feedback.

  • 🇺🇦Ukraine t1mm1 Kiev

    I will add patch here with this form. You can check it and see, maybe, it will change your opinion. Cause in my case configs update not usabble. I understand that you propouse most easy way yo config it, I agree with you cause it's good when you have several sites in support (for example). In my case I want to see it in maximum UI intergation.

    Anyway, thanks for your solution and time. Your 'menu tree' is really cool module and we use it as well.
    Thanks.

  • 🇸🇪Sweden peter törnstrand

    I am not against a configuration form for the module as I stated in my reply:

    But, I can see that a config form for this is warranted.

    So if you check the DEV release you will see I have added a config form.

    This will be released together with fixes for Drupal 11, so if you need it right away use the 1.0.x-dev version.

  • Status changed to Needs review 2 months ago
  • 🇸🇪Sweden peter törnstrand

    Released in version 1.0.4.

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

Production build 0.71.5 2024