Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
gustavlrsn
reviewed
Mar 27, 2025
f63b330 to
a6eac27
Compare
Member
|
Policies are not being saved, investigating. |
Betree
reviewed
Mar 27, 2025
There was a problem hiding this comment.
Pull Request Overview
This pull request adds a dedicated grant flow to the expense system while introducing new sections, schema changes, and UI adjustments for grant expenses. Key changes include:
- New React components for grant submission (InvitationNoteSection, InstructionsSection, GrantProviderSection, SubmitGrantFlowSteps).
- Updates to the expense form logic and validation in useExpenseForm.ts, including a new grant title generator.
- Adjustments in UI components (SummarySection, SubmittedExpense, collective navbar, RichTextEditor, and Policies) to support grant-specific behavior.
Reviewed Changes
Copilot reviewed 42 out of 45 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| components/submit-grant/sections/InvitationNoteSection.tsx | Introduces InvitationNoteSection using the ExpenseInviteRecipientNote component. |
| components/submit-grant/sections/InstructionsSection.tsx | Adds instructions UI for grant submission. |
| components/submit-grant/sections/GrantProviderSection.tsx | Implements a section for selecting the grant provider via ExpenseAccountItem. |
| components/submit-grant/SubmitGrantFlowSteps.tsx | Establishes a dedicated step flow for grant submission. |
| components/submit-expense/useExpenseForm.ts | Adds grant-related form fields, validation refinements, and a new generateGrantTitle function. |
| components/submit-expense/form/SummarySection.tsx | Updates summary components to generate the grant title and display exchange rate warnings. |
| components/submit-expense/form/ExpenseItemsSection.tsx | Updates expense item handling based on grant configurations. |
| components/submit-expense/SubmittedExpense.tsx | Conditionally renders FAQ for non-grant expenses. |
| components/submit-expense/SubmitExpenseFlowSteps.tsx | Exposes StepHeader and StepItem as exported functions for the flow. |
| components/submit-expense/SubmitExpenseFlow.tsx | Refactors onSubmit logic and separates success and error handling for grant flows. |
| components/expenses/ExpenseInviteWelcome.tsx | Switches to a named export for ExpenseInviteRecipientNote. |
| components/expenses/Expense.tsx | Adjusts navigation to use a dedicated grant flow when appropriate. |
| components/edit-collective/sections/Policies.js | Introduces grant expense policy fields and messages to the policies section. |
| components/edit-collective/sections/EditCollectivePage.js | Adds grantPolicy to the settings query. |
| components/collective-navbar/index.js | Updates navigation actions to include a new grant flow option. |
| components/collective-navbar/ActionsMenu.js | Adds grant flow support to the actions menu link logic. |
| components/RichTextEditor.tsx | Adds a flag to control Trix initialization and ensures correct initialization behavior. |
Files not reviewed (3)
- lang/ca.json: Language not supported
- lang/cs.json: Language not supported
- lang/de.json: Language not supported
Comments suppressed due to low confidence (2)
components/submit-expense/useExpenseForm.ts:2228
- The generateGrantTitle function does not handle cases when both 'payee' and 'invitee' are undefined, resulting in a title with 'undefined'. Consider adding a fallback or validating input values before generating the title.
export function generateGrantTitle(account, payee, invitee): string {
components/RichTextEditor.tsx:290
- [nitpick] Relying on 'hasRunBeforeInitialize' to conditionally initialize Trix may delay editor initialization on the component's first mount if the flag is not set. Verify that the initialization logic correctly triggers when expected.
} else if (!this.isReady && this.state.hasRunBeforeInitialize) {
gustavlrsn
approved these changes
Mar 27, 2025
5da9efb to
649540e
Compare
649540e to
7fffdea
Compare
7fffdea to
1f913af
Compare
1f913af to
85114b0
Compare
85114b0 to
4d9d604
Compare
This was referenced Apr 1, 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.
Require opencollective/opencollective-api#10747
Resolve opencollective/opencollective#7884
Resolve opencollective/opencollective#7889
Resolve opencollective/opencollective#7883
Resolve opencollective/opencollective#7888
Resolve opencollective/opencollective#7891
Resolve opencollective/opencollective#7887