Inherit default values of menu_ui

Created on 1 December 2024, 18 days ago

Problem/Motivation

I tried to use this module in my recipe, but there are a few minor problems with UI/UX. I expected fast and easy configuration (in an ideal world without configuration at all). Still, after installation, I need to update each content type and apply the same configurations that I already have in the menu_ui section.

In my opinion, it makes sense to use values from menu_ui fields. There are no risks of causing regression since menu_ui and menu_ui_async work identically.

Steps to reproduce

  1. Before menu_async_ui module installation: open content type edit form and allow 2-3 menus to use
  2. After menu_async_ui module installation: compare menu_ui and menu_async_ui settings

Proposed resolution

According to the menu_async_ui module code, the default values are fetched using getThirdPartySetting() method. The third parameter of the method is default value. So let's update code like this:

// Inherit default menu values from default menu settings.
$default_menus = $type->getThirdPartySetting('menu_ui', 'available_menus', ['main']);
$default_menus_async = $type->getThirdPartySetting('menu_ui_async_widget', 'available_menus', $default_menus);
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇺🇦Ukraine Panchuk Volyn, Lutsk

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024