Conversation
this removes the need to synchronize if it works
this allows the scheduled publishing function to find waiting submissions
…ject" This reverts commit 7d59c01.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
Enhance submission status handling and enforce review-based cancellation rules across UI and backend.
- Block submission cancellation in the UI and functions once a submission is reviewed or published.
- Extend
getStatusand its tests to surface newsheetPublishedanddataPublishedstates. - Refactor submissions UI into its own component with shared utilities, and standardize structured logging in Cloud Functions.
Reviewed Changes
Copilot reviewed 48 out of 70 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vite.config.js | Update Vitest config to use environment and set emulator host. |
| storage.rules | Grant read access only to the current user’s stored files. |
| src/components/pageElements/utils.js | Introduce dateFormatter and sortFunction for submission lists. |
| src/components/pageElements/Submissions.jsx | Extract Submissions UI, disable Cancel button after review. |
| functions/shared/index.js | Extend getStatus to handle new publication states. |
| functions/shared/index.test.js | Update unit tests for updated status labels and fields. |
| functions/https/postCancelCorner.js | Prevent cancellation of reviewed/published submissions; logging fix. |
| firestore.rules | Allow create operations in stats collection for review app. |
Comments suppressed due to low confidence (9)
src/components/pageElements/utils.js:10
- The newly introduced
sortFunctionis not covered by unit tests. Consider adding tests that validate sorting for each supportedsortOrderto prevent regressions.
export const sortFunction = (sortOrder, transform) => {
src/components/pageElements/mapElements/Township.jsx:3
- The clsx package exports a default function rather than a named export. Change this to
import clsx from 'clsx';to avoid runtime import errors.
import { clsx } from 'clsx';
src/components/pageElements/mapElements/MyLocation.jsx:3
- The clsx package exports a default function rather than a named export. Change this to
import clsx from 'clsx';to avoid runtime import errors.
import { clsx } from 'clsx';
src/components/pageElements/Map.jsx:20
- The clsx package exports a default function rather than a named export. Change this to
import clsx from 'clsx';to avoid runtime import errors.
import { clsx } from 'clsx';
src/components/formElements/Switch.jsx:2
- The clsx package exports a default function rather than a named export. Change this to
import clsx from 'clsx';to avoid runtime import errors.
import { clsx } from 'clsx';
src/components/formElements/Select.jsx:3
- The clsx package exports a default function rather than a named export. Change this to
import clsx from 'clsx';to avoid runtime import errors.
import { clsx } from 'clsx';
src/components/formElements/Inputs.jsx:1
- The clsx package exports a default function rather than a named export. Change this to
import clsx from 'clsx';to avoid runtime import errors.
import { clsx } from 'clsx';
src/components/formElements/FileUpload.jsx:2
- The clsx package exports a default function rather than a named export. Change this to
import clsx from 'clsx';to avoid runtime import errors.
import { clsx } from 'clsx';
src/components/formElements/Buttons.jsx:3
- The clsx package exports a default function rather than a named export. Change this to
import clsx from 'clsx';to avoid runtime import errors.
import { clsx } from 'clsx';
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
stdavis
approved these changes
Jul 16, 2025
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.
updates the submission status component and blocks cancellation after review