Describe your bug or feature request.

When viewing an order in the admin area the state change buttons are displayed in the sidebar in their own flex container.

In 3.2.x and older versions of commerce the buttons would wrap to a new line when there was a lot of them. This is more common with custom order workflows.

In 3.3.x the buttons were moved into their own flex container but wrapping was not carried over.

Current layout:
Current layout

With wrapping enabled:
With wrapping

Without wrapping the action buttons the sidebar can take up a considerable amount of screen space.

If a bug, provide steps to reproduce it from a clean install.

  1. On any commerce install define a custom workflow with multiple possible transitions from a specific state.
  2. View an order with that state.

Solution

Enable wrapping by adding flex-wrap: wrap to commerce-actions__actions .form-wrapper in the CSS file commerce.admin-components.css

Issue fork commerce-3631835

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

rhovland created an issue. See original summary.

rhovland’s picture

Status: Active » Needs review

Ready for review

majmunbog’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed the MR: the transition buttons shrink in a non-wrapping flex row. flex-wrap: wrap lets them flow to new lines, and the existing gap spaces the rows. Scoped to the admin order actions only. RTBC.

jsacksick’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.