diff --git a/CHANGELOG.md b/CHANGELOG.md index 19cd7aeabf..524d1fc4ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2211,6 +2211,7 @@ See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information ### Bugfix +- Sort control panels alphabetically within each group @JeffersonBledsoe #3737 - Fix UniversalLink storybook @tiberiuichim - Fix logout to stay on the same page where the user was @reebalazs - Change sentry chunk name to avoid ad blockers. Only load sentry if env vars exist @tiberiuichim diff --git a/src/components/manage/Controlpanels/Controlpanels.jsx b/src/components/manage/Controlpanels/Controlpanels.jsx index fa8d3e880d..263be3b02f 100644 --- a/src/components/manage/Controlpanels/Controlpanels.jsx +++ b/src/components/manage/Controlpanels/Controlpanels.jsx @@ -3,18 +3,18 @@ * @module components/manage/Controlpanels/Controlpanels */ +import { Helmet, asyncConnect } from '@plone/volto/helpers'; +import { concat, filter, last, map, sortBy, uniqBy } from 'lodash'; import PropTypes from 'prop-types'; -import { useState, useEffect } from 'react'; +import { useEffect, useState } from 'react'; +import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; +import { Portal } from 'react-portal'; import { connect } from 'react-redux'; -import { compose } from 'redux'; import { Link } from 'react-router-dom'; -import { concat, filter, last, map, uniqBy } from 'lodash'; -import { Portal } from 'react-portal'; -import { asyncConnect, Helmet } from '@plone/volto/helpers'; +import { compose } from 'redux'; import { Container, Grid, Header, Message, Segment } from 'semantic-ui-react'; -import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; -import { listControlpanels, getSystemInformation } from '@plone/volto/actions'; +import { getSystemInformation, listControlpanels } from '@plone/volto/actions'; import { Error, Icon, Toolbar, VersionOverview } from '@plone/volto/components'; import config from '@plone/volto/registry'; @@ -221,7 +221,10 @@ function Controlpanels({ {map( - filter(filteredControlPanels, { group }), + sortBy( + filter(filteredControlPanels, { group }), + (controlpanel) => controlpanel.title, + ), (controlpanel) => ( diff --git a/src/components/manage/Controlpanels/__snapshots__/Controlpanels.test.jsx.snap b/src/components/manage/Controlpanels/__snapshots__/Controlpanels.test.jsx.snap index dc8f6ee0af..de99eecd17 100644 --- a/src/components/manage/Controlpanels/__snapshots__/Controlpanels.test.jsx.snap +++ b/src/components/manage/Controlpanels/__snapshots__/Controlpanels.test.jsx.snap @@ -33,7 +33,7 @@ exports[`Controlpanels renders a controlpanels component 1`] = ` className="column" >

- Date and Time + Add-Ons

@@ -69,7 +69,7 @@ exports[`Controlpanels renders a controlpanels component 1`] = ` className="column" >

- Language + Database

@@ -105,7 +105,7 @@ exports[`Controlpanels renders a controlpanels component 1`] = ` className="column" >

- Add-Ons + Date and Time

@@ -141,7 +141,7 @@ exports[`Controlpanels renders a controlpanels component 1`] = ` className="column" >

- Database + Language

@@ -177,7 +177,7 @@ exports[`Controlpanels renders a controlpanels component 1`] = ` className="column" >

- Undo + URL Management

@@ -213,7 +213,7 @@ exports[`Controlpanels renders a controlpanels component 1`] = ` className="column" >

- URL Management + Undo

@@ -266,7 +266,7 @@ exports[`Controlpanels renders a controlpanels component 1`] = ` className="column" >

- Editing + Content Rules

@@ -302,7 +302,7 @@ exports[`Controlpanels renders a controlpanels component 1`] = ` className="column" >

- Content Rules + Editing

@@ -338,7 +338,7 @@ exports[`Controlpanels renders a controlpanels component 1`] = ` className="column" >

- Relations + Moderate Comments

@@ -374,7 +374,7 @@ exports[`Controlpanels renders a controlpanels component 1`] = ` className="column" >

- Moderate Comments + Relations

@@ -480,7 +480,7 @@ exports[`Controlpanels renders a controlpanels component 1`] = ` className="column" >

- Users + Groups

@@ -552,7 +552,7 @@ exports[`Controlpanels renders a controlpanels component 1`] = ` className="column" >

- Groups + Users

@@ -815,7 +815,7 @@ exports[`Controlpanels renders an additional control panel 1`] = ` className="column" >

- Undo + URL Management

@@ -851,7 +851,7 @@ exports[`Controlpanels renders an additional control panel 1`] = ` className="column" >

- URL Management + Undo

@@ -940,7 +940,7 @@ exports[`Controlpanels renders an additional control panel 1`] = ` className="column" >

- Relations + Moderate Comments

@@ -976,7 +976,7 @@ exports[`Controlpanels renders an additional control panel 1`] = ` className="column" >

- Moderate Comments + Relations

@@ -1029,7 +1029,7 @@ exports[`Controlpanels renders an additional control panel 1`] = ` className="column" >

- Users + Groups

@@ -1101,7 +1101,7 @@ exports[`Controlpanels renders an additional control panel 1`] = ` className="column" >

- Groups + Users