Skip to content

CMS 6 REGRESSION: Button toolbar wrapping - "Batch actions" button drops to second line #3121

@purplespider

Description

@purplespider

Module version(s) affected

6.0.0 including 6.1.0-rc1

Description

The toolbar above the page sitetree is wrapping onto two lines because the "Add new" button now says "Add new page", making it wider than before. This pushes the "Batch actions" button onto a second line.

Silverstripe 5 (correct layout)

Image

Silverstripe 6 (buttons wrapping)

Image

Reproduced in both Chrome and Safari.

What Changed

Commit 5336a999 updated the button text to include the record type name, changing "Add new""Add new page".

File: templates/SilverStripe/CMS/Controllers/Includes/CMSMain_ContentToolActions.ss:5

<%t SilverStripe\Admin\\LeftAndMain.AddNew 'Add new {name}' name=$getRecord('singleton').i18n_singular_name().lowercase %>

Possible Solutions

Option 1: Would changing it back to use AddNewButton instead of AddNew to restore the shorter "Add new" button label be an acceptable fix? I'm not sure if adding "page" here was explicitly intended.

Image
<%t SilverStripe\Admin\\LeftAndMain.AddNewButton 'Add new' %>

Option 2: Alternatively, does the "Batch actions" button really need it's text label? Could the text be removed from this button so that it is just the icon, like the site tree view button? e.g.:

Image

Happy to provide a PR for the agreed upon solution.

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions