Skip to content

[COMMS-876] Single-line/multi-line layout argument for attribute value macros#24257

Draft
akabiru wants to merge 3 commits into
devfrom
feature/comms-876-adjust-ckeditor-version-macros-single-line-multi-line-layout-argument-for-attribute-value-macros
Draft

[COMMS-876] Single-line/multi-line layout argument for attribute value macros#24257
akabiru wants to merge 3 commits into
devfrom
feature/comms-876-adjust-ckeditor-version-macros-single-line-multi-line-layout-argument-for-attribute-value-macros

Conversation

@akabiru

@akabiru akabiru commented Jul 14, 2026

Copy link
Copy Markdown
Member

Ticket: https://community.openproject.org/wp/COMMS-876

Multi-value attributes such as target versions render one value per line, which does not always fit the text around a macro. Attribute value macros now accept an optional trailing layout argument (workPackageValue:X:targetVersions:singleline or :multiline, multi-line being the default) so authors can choose.

  • Web macro parsing: the text-formatting matcher parses the argument, including the id-less relative form, and hands it to the macro element as data-layout
  • Frontend rendering of the single-line variant
  • Layout argument on the PDF/export macro path
  • Legacy version attribute mapped to the single-line behaviour

Multi-value attributes such as target versions need both block and
inline renderings depending on the surrounding text; an optional
singleline/multiline macro argument lets authors choose.
@akabiru akabiru changed the title Feature/COMMS-876: Single-line/multi-line layout argument for attribute value macros [COMMS-876] Single-line/multi-line layout argument for attribute value macros Jul 14, 2026
@akabiru akabiru self-assigned this Jul 14, 2026
@akabiru akabiru added this to the 17.8.x milestone Jul 14, 2026
@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/projects/lists/filters_spec.rb[1:6:1]
  • rspec ./spec/features/workflows/edit_spec.rb[1:5:6]
🤖 Ask Copilot to investigate

Copy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer.

@copilot The following spec(s) are flaky in CI (first seen on PR #24257, linked for reference only):

- `rspec ./spec/features/projects/lists/filters_spec.rb[1:6:1]`
- `rspec ./spec/features/workflows/edit_spec.rb[1:5:6]`

Treat this as a standalone task, unrelated to PR #24257. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #24257 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @akabiru to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @akabiru, and request a review from @akabiru.
On every commit, set @akabiru as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

akabiru added 2 commits July 14, 2026 16:23
The macro element's layout argument flows through displayFieldOptions;
a singleline option selects a comma-joined display field instead of
the one-per-line variants used in the single view context.
Mirrors the web matcher grammar and threads the layout to the export
formatter's array separator. Multi-value macros now default to one
value per line (markdown hard break) instead of a comma-joined list,
matching the web rendering.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant