Skip to content

Sort Iconik projects with numbers at the top of the list#1508

Merged
bryophyta merged 3 commits intomainfrom
pf/iconik-project-sort-numbers-first
Apr 1, 2026
Merged

Sort Iconik projects with numbers at the top of the list#1508
bryophyta merged 3 commits intomainfrom
pf/iconik-project-sort-numbers-first

Conversation

@bryophyta
Copy link
Copy Markdown
Contributor

@bryophyta bryophyta commented Mar 19, 2026

What does this change?

  • Sort Iconik projects, commissions, etc. so that all titles starting with numbers go ahead of all other titles. This is because there are commissions where the naming convention has changed over time, so there are lots of old projects called e.g. 'Feb 15', with newer projects having the format 'YYMMDD'. To get the most recent 'YYMMDD' at the top of the list, we want to do reverse-alphabetical sorting. But to avoid having all the old projects above the new ones, we need to put titles beginning with numbers at the top. I'm not aware of any other existing naming conventions that this change would cause an issue for (as things stand, all projects for a commission tend to start either with numbers, or with letters).
  • Also, update the Iconik test script with the new table name.

How has this change been tested?

  • Tested locally and it works as expected, i.e.:
002
001
def
abc

How can we measure success?

Have we considered potential risks?

Images

Accessibility

@bryophyta bryophyta added the feature Departmental tracking: work on a new feature label Mar 19, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 19, 2026

@bryophyta bryophyta marked this pull request as ready for review March 19, 2026 15:58
@bryophyta bryophyta requested a review from a team as a code owner March 19, 2026 15:58
@bryophyta bryophyta changed the title Pf/iconik project sort numbers first Sort Iconik projects with numbers at the top of the list Mar 19, 2026
const rest = projects.filter(project => !startsWithNumber(project.title));
return [
...startWithNumber.sort((a, b) => b.title.localeCompare(a.title)),
...rest.sort((a, b) => b.title.localeCompare(a.title))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this sorts the non-numeric stories into reverse alphabetical order right (ie. the full list will be 9->0,z->a)? any reason not to switch the order for these, so the full order goes 9->0,a->z instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that makes sense yeah, thanks! have pushed an update now 👍

@bryophyta bryophyta force-pushed the pf/iconik-project-sort-numbers-first branch from 72a5643 to 01ccfc0 Compare April 1, 2026 11:55
@bryophyta bryophyta enabled auto-merge April 1, 2026 11:55
@bryophyta bryophyta merged commit ea82e75 into main Apr 1, 2026
5 checks passed
@bryophyta bryophyta deleted the pf/iconik-project-sort-numbers-first branch April 1, 2026 12:00
@gu-prout
Copy link
Copy Markdown

gu-prout Bot commented Apr 1, 2026

Seen on PROD (merged by @bryophyta 6 minutes and 31 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants