Skip to content

Conversation

@ascibisz
Copy link
Contributor

@ascibisz ascibisz commented Nov 18, 2025

Problem

Sorting the editable fields list and the recipe dropdown to be in alphabetical order.

It's a tiny change, but Thao had asked for it and it's nice that now the recipes that have the same editable fields will have them rendered consistently in the same order. Also this makes the multiple spheres editable fields easier to read.

@github-actions
Copy link

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 19.62% 368 / 1875
🔵 Statements 19.62% 368 / 1875
🔵 Functions 39.34% 24 / 61
🔵 Branches 70.43% 81 / 115
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/components/Dropdown/index.tsx 0% 0% 0% 0% 1-2, 12-18, 20-27, 29, 31
src/utils/firebase.ts 25.85% 62.5% 25% 25.85% 36-37, 42-43, 77-79, 82-92, 95-99, 102-110, 114-127, 130-135, 138-140, 143-168, 176-186, 188-199, 206-218, 232-233, 236-246, 248-257, 259, 261-265, 267-272
Generated in workflow #191

@github-actions
Copy link

PR Preview Action v1.6.2

🚀 View preview at
https://AllenCell.github.io/cellpack-client/pr-preview/pr-161/

Built to branch gh-pages at 2025-11-18 20:04 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@ascibisz ascibisz marked this pull request as ready for review November 19, 2025 15:15
@ascibisz ascibisz requested a review from Copilot November 19, 2025 15:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements alphabetical sorting for both the editable fields list and recipe dropdown options to improve consistency and readability across the application.

Key Changes:

  • Added sortBy utility from lodash-es to sort lists alphabetically
  • Applied sorting to editable fields returned from Firebase by the "name" property
  • Applied sorting to dropdown options by the "label" property

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/utils/firebase.ts Sorts editable fields list alphabetically by name before returning from getEditableFieldsList
src/components/Dropdown/index.tsx Sorts recipe dropdown options alphabetically by label before rendering in Select component

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ascibisz ascibisz requested review from meganrm and rugeli November 19, 2025 15:16
Copy link
Contributor

@rugeli rugeli left a comment

Choose a reason for hiding this comment

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

lgtm!

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.

4 participants