Repository navigation
fix(config-ui): sort connection tiles alphabetically within each section - #9479
Open
leninworld wants to merge 1 commit into
Open
leninworld wants to merge 1 commit into
leninworld wants to merge 1 commit into
Conversation
Order each A-N / O-Z group on the Connections page by the displayed name, case-insensitively, with the plugin id as a tie-break, instead of the plugin configs' numeric sort values. The memoized split now depends on the plugin list itself. Closes apache#9478
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes issue #9478.
Summary
The Connections page splits the data sources into A-N and O-Z (by the displayed name since #9130), but inside each section the tiles keep the order of each plugin config's numeric
sortvalue, which is not alphabetical. Onmaintoday, A-N reads ArgoCD, Azure DevOps, Bamboo, Bitbucket Cloud, Bitbucket Server, CircleCI, ClickUp, Datadog, Claude Code, Cursor, GitHub Copilot, GitHub, GitLab, Jenkins, Jira, Asana, Kiro, Linear, GLPI, incident.io, Grafana IRM, and O-Z reads Opsgenie, PagerDuty, Slack, SonarQube, TAPD, Rootly, Testmo, Zephyr, ZenTao, Redmine, Tempo, YouTrack, Teambition.splitPluginsByInitialnow sorts a copy of the plugin list by the displayed name before splitting it:localeCompare(..., 'en', { sensitivity: 'base' })), soincident.iosits among the I names;The
useMemoaround the split depended on a filtered array that was rebuilt on every render, so it never reused its result. The webhook filter now runs inside the memo, which depends onplugins.With the current plugin configs the page now shows:
The Codecov tile in the issue's screenshot comes from a downstream build (there is no Codecov plugin in this repo); a plugin added there is sorted the same way.
Does this close any open issues?
Closes #9478
Screenshots
None: the change only reorders existing tiles; the resulting order is listed above.
Other Information
Tests (
config-ui/src/__tests__/connections-grouping.test.ts): the first existing case now expects alphabetical order inside A-N, and new cases cover exact A-N and O-Z order for the real plugin names in their currentsortorder, no mutation of the input, case-insensitive ordering, and the id tie-break (including names that differ only by case).Run in
config-ui(Node 26.7, Yarn 4.18.1):yarn vitest run src/__tests__/connections-grouping.test.ts: 9 passed; with theconnections.tsxchange reverted, 5 of the 9 fail.yarn vitest run: 13 files, 97 tests passed.yarn tsc --noEmit -p .,yarn eslintandyarn exec prettier --checkon the two files: clean.Not changed: the plugin configs'
sortvalues, and other places that list plugins (for example the data-source pickers), which keep their current order.