Skip to content

Sorting options - #331

Merged
allison-truhlar merged 18 commits into
JaneliaSciComp:mainfrom
maryLLay:sorting_options
Nov 6, 2026
Merged

allison-truhlar merged 18 commits into
JaneliaSciComp:mainfrom
maryLLay:sorting_options

Conversation

@maryLLay

@maryLLay maryLLay commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Added options to sort alphabetically or by most recent update.

Please look at how sort by last update is implemented: I'm not sure this is the best way to pull this off.

@allison-truhlar allison-truhlar left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@maryLLay I'm going to add some issues that Claude flagged in a review of the code.

Comment thread .github/actions/update-project-dates.js Resolved
Comment thread src/components/projects/FilterMenu.jsx Resolved
Comment thread .github/actions/update-project-dates.js Resolved
Comment thread src/pages/projects/index.astro Resolved
# Conflicts:
#	.github/actions/package-lock.json
#	.github/actions/package.json
#	package-lock.json
The sort options lived inside FilterMenu, which coupled them to the
tag-filter drawer on small screens and made the sidebar spacing
inconsistent with SearchInput. SortMenu now renders standalone on the
projects page, matching the SearchInput and FilterMenu pattern: a
title, a Reset button, and the option list.

On small screens the drawer stays tag-filters only. Sort becomes an
MUI Select beside the "Filter by tag" button, reusing the Select and
Option primitives from ProjectTypeDropdown for consistent styling.
The "No sorting" option acts as the reset there, so no separate
button is needed.

The ecosystems page never wired up sortedTitlesMap, so the sort
options that previously rendered there did nothing. They no longer
render on that page.
The "Filter by tag" heading and Reset button were hidden below the md
breakpoint, so the drawer had no label. The header now shows on all
screen sizes.

On md+ the header top padding and the empty bottom button row added
extra height, so the gap between the filter list and the sort menu
didn't match the gap between the search input and the filter list.
Both gaps are now 32px.
@allison-truhlar

Copy link
Copy Markdown
Collaborator

@maryLLay I also made a couple of commits related to where the "sort by" menu is placed on both smaller and larger screens. These are not required changes, they're mostly stylistic, so I opened a PR against your branch for you to merge if you wish, rather than pushing changes directly into this PR.

@github-actions

Copy link
Copy Markdown

🚩 Potential issue - invalid frontmatter

One or more of your committed Markdown files might be missing frontmatter or have an invalid structure.

If your PR is to add or edit a project file, please double-check your frontmatter is wrapped in triple dashes (---).

  • ****: Error: ENOENT: no such file or directory, open ''

@github-actions

Copy link
Copy Markdown

🎉 Thank you for your contribution!

The website maintainers will review your PR soon.

One renamed, deleted, or private repo made the batched query throw and
the script exit, so no project dates updated. Recover the partial data
from error.data and continue; the per-repo warning below reports the
missing repos. Only exit when no data is returned.

Addresses review feedback on JaneliaSciComp#331.
Pushes made with GITHUB_TOKEN do not fire on: push workflows, so the
site was never redeployed after the weekly date update. Dispatch
deploy-to-github-pages.yml explicitly after a successful push, and
grant the job actions: write.

Addresses review feedback on JaneliaSciComp#331.
allison-truhlar and others added 2 commits November 4, 2026 10:01
Replace the weekly bot that committed update_date into each project's
frontmatter. Branch protection on main requires an approving review and
the validate-content check, so the bot's push would be rejected.

- Fetch each repo's pushedAt during the build with one batched GraphQL
  query (getRepoUpdateDates in githubApiHelper.js), keyed by
  "github link". A list with no parseable links returns early, since an
  empty selection set is a GraphQL syntax error.
- Fail the build if the whole query fails, so the last good deploy stays
  live. A repo that can't be resolved is logged and left undated.
- Add scheduled-deploy.yml to rebuild weekly. It is separate from the
  deploy workflow so the 60-day inactivity disable can't stop deploys
  on push, and it re-enables itself each run to reset that timer.
- Remove update-project-dates.js/.yml, the @octokit/graphql dependency,
  the update_date schema field, and the per-project frontmatter lines.
- Tidy leftovers in CardContainer.jsx and projects/index.astro.
@allison-truhlar
allison-truhlar self-requested a review November 6, 2026 14:52
@allison-truhlar
allison-truhlar merged commit 3045926 into JaneliaSciComp:main Nov 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants