Markup key inside of weight array?

Created on 2 June 2025, 4 days ago

Problem/Motivation

I stumbled over the following MR regarding the weight array key. See the changes in the "form_decorator_example" module: https://git.drupalcode.org/project/form_decorator/-/merge_requests/13/diffs

After some thinking I wondered why the "#markup" key is inside of "weight". Usually the weight key or property accepts a positive or negative integer value. This value is meant for ordering. The "markup" key inside of "weight" accepts some string value, what makes the code potentially misleading.

Proposed resolution

* Just handle an integer value for the weight value
* Add some description about the behavior, because currently it's kind of weird

๐Ÿ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany Peter Majmesku ๐Ÿ‡ฉ๐Ÿ‡ชDรผsseldorf

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