Add sort-by-Release-Plan-ID option to Release Plan Dashboard#15527
Add sort-by-Release-Plan-ID option to Release Plan Dashboard#15527
Conversation
Adds an optional sort dropdown to the Release Plans tab allowing users to sort by "SDK Release Month" (default) or "Release Plan ID" (newest first). This helps users quickly identify and track newly incoming releases. Fixes #9874 Agent-Logs-Url: https://github.com/Azure/azure-sdk-tools/sessions/8a446f8a-c2be-4e01-8b4b-71e82fa6ca81 Co-authored-by: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the Release Plan Dashboard UI/render pipeline to support sorting the Release Plans view either by SDK Release Month (existing behavior) or by Release Plan ID (new), enabling users to more easily spot newly added plans.
Changes:
- Added a new
filters.sortvalue in the Alpine store (defaulting to"month"). - Added a Release Plans–only sort
<select>in the tab bar and corresponding styling. - Updated render logic to select a sort comparator (
monthvsid) and wired sort changes into the Alpine reactive effect to trigger re-renders.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/release-plan-dashboard/public/style.css | Extends existing global filter dropdown styling to the new sort dropdown. |
| tools/release-plan-dashboard/public/index.html | Adds filters.sort default and a Release Plans–only sort dropdown in the tab bar. |
| tools/release-plan-dashboard/public/app.js | Introduces sort selection logic and registers sort as a reactive dependency for re-rendering. |
Co-authored-by: Praveen Kuttappan <55455725+praveenkuttappan@users.noreply.github.com>
| } | ||
|
|
||
| function sortByReleasePlanId(a, b) { | ||
| return (a.releasePlanId || 0) - (b.releasePlanId || 0); |
There was a problem hiding this comment.
hm I don't think this is quite what we want assuming two things:
- releasePlanId is a string
- we want descending order (largest IDs first)
If (1) is true, any non-numeric strings will cause it to silently fail sorting (because they will end up as NaN). This may be fine if we truly expect IDs to be a stringified number but might as well be safe and avoid implicit casts
If (2) is true, then I think we need to flip a and b here (b - a) instead of (a - b)
I sketched out this playground to show what I mean which is hopefully helpful to clarify
The Release Plans tab only sorted by SDK Release Month. Users need to sort by Release Plan ID (descending) to quickly spot newly incoming releases.
Changes
sort: 'month'tofilters(default unchanged)<select>dropdown in the tab bar, visible only on the Release Plans tab, with options for "SDK Release Month" and "Release Plan ID"sortByReleasePlanIdcomparator (descending) and asortFnselector that replaces hardcodedsortByReleaseMonthcalls insplitByStatestore().filters.sortin the Alpine effect so sort changes trigger re-render.global-sort-orderto existing filter dropdown style rule