Skip to content

Commit 4846603

Browse files
committed
feat: sort startup feature toggle checkboxes alphabetically in the Developer Menu
1 parent e648ee5 commit 4846603

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/webapp/src/script/components/ConfigToolbar/ConfigToolbar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export function createLocationUrl(pathname: string, search: string, hash: string
4040

4141
export function ConfigToolbar() {
4242
const {fireAndForgetInvoker, applicationNavigation, isFeatureToggleEnabled} = useApplicationContext();
43+
const alphabeticallySortedStartupFeatureToggleNames = [...startupFeatureToggleNames].sort();
4344
const [showConfig, setShowConfig] = useState(false);
4445
const [isResettingMLSConversation, setIsResettingMLSConversation] = useState(false);
4546
const [isGzipEnabled, setIsGzipEnabled] = useState(window.wire?.app.debug?.isGzippingEnabled() ?? false);
@@ -331,7 +332,7 @@ export function ConfigToolbar() {
331332
<fieldset style={{margin: 0, border: 0, padding: 0}}>
332333
<legend style={{fontWeight: 'bold', marginBottom: '8px'}}>Startup Feature Toggles</legend>
333334
<ul style={{listStyle: 'none', margin: 0, padding: 0}}>
334-
{startupFeatureToggleNames.map(featureToggleName => {
335+
{alphabeticallySortedStartupFeatureToggleNames.map(featureToggleName => {
335336
const featureToggleCheckboxIdentifier = `startup-feature-toggle-checkbox-${featureToggleName}`;
336337

337338
return (

0 commit comments

Comments
 (0)