feat(crowdfunding): implement crowdfunding module with API integration (DO NOT MERGE)#749
feat(crowdfunding): implement crowdfunding module with API integration (DO NOT MERGE)#749emlimlf wants to merge 22 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds crowdfunding domain types/constants, mock fixtures, routes, a shared donut-chart, many UI components for initiatives and donations, and sidebar support for collapsible nav groups. ChangesCrowdfunding Infrastructure and Sidebar Groups
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR introduces the foundational scaffolding for a new Crowdfunding area in LFX One by adding shared types/constants and wiring an initial (lazy) route, alongside sidebar support for collapsible “group” navigation items.
Changes:
- Added Crowdfunding-related shared interfaces, enums, and constants to
@lfx-one/shared. - Added UI mock data for Crowdfunding screens to enable frontend work before backend APIs land.
- Registered a new lazy-loaded
/crowdfundingroute and extended sidebar navigation primitives to support “group” items.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/shared/src/interfaces/index.ts | Re-exports new Crowdfunding + donut chart interfaces. |
| packages/shared/src/interfaces/donut-chart.interface.ts | Adds donut chart ring types. |
| packages/shared/src/interfaces/crowdfunding.interface.ts | Adds Crowdfunding domain interfaces. |
| packages/shared/src/interfaces/components.interface.ts | Extends SidebarMenuItem with isGroup. |
| packages/shared/src/enums/index.ts | Re-exports new crowdfunding.enum. |
| packages/shared/src/enums/crowdfunding.enum.ts | Adds FundType enum. |
| packages/shared/src/constants/index.ts | Re-exports new crowdfunding constants. |
| packages/shared/src/constants/crowdfunding.constants.ts | Adds fund-type labels/icons/colors/constants. |
| apps/lfx-one/src/app/shared/components/sidebar/sidebar.component.ts | Adds state management for collapsible nav groups. |
| apps/lfx-one/src/app/shared/components/sidebar/sidebar.component.html | Renders group items (toggle + children). |
| apps/lfx-one/src/app/modules/crowdfunding/crowdfunding.routes.ts | Adds lazy module route scaffold (currently empty). |
| apps/lfx-one/src/app/modules/crowdfunding/crowdfunding.mock.ts | Adds Crowdfunding mock datasets for UI development. |
| apps/lfx-one/src/app/layouts/main-layout/main-layout.component.ts | Adds Crowdfunding entry to Me-lens sidebar items. |
| apps/lfx-one/src/app/app.routes.ts | Registers lazy-loaded /crowdfunding route. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/shared/src/interfaces/crowdfunding.interface.ts (1)
81-81: ⚡ Quick winTighten
DonationHistoryItem.fundTypetoFundType.Using
stringhere allows invalid fund types and weakens the shared contract.Proposed change
export interface DonationHistoryItem { id: string; initiativeName: string; initiativeIcon: string; - fundType: string; + fundType: FundType; fundTypeIcon: string; date: string; kind: DonationKind; amount: number; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/shared/src/interfaces/crowdfunding.interface.ts` at line 81, The DonationHistoryItem interface currently types fundType as string; change its type to the shared FundType enum (replace "fundType: string" with "fundType: FundType") and add the necessary import or reference to FundType so the interface compiles; then update any code, tests, or usages that construct DonationHistoryItem (or parse/serialize it) to use valid FundType values instead of arbitrary strings to ensure type safety.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/shared/src/constants/crowdfunding.constants.ts`:
- Line 4: Replace the relative enum import with the shared package alias: change
the current import of FundType (import { FundType } from
'../enums/crowdfunding.enum') to use the shared alias path (import { FundType }
from '`@lfx-one/shared/enums/crowdfunding.enum`') so the constants file imports
the FundType enum via the shared package alias per guidelines.
In `@packages/shared/src/interfaces/crowdfunding.interface.ts`:
- Line 4: The import in crowdfunding.interface.ts uses a relative path for the
enum; replace "import { FundType } from '../enums/crowdfunding.enum';" with the
shared package alias import using "`@lfx-one/shared/`..." so it becomes "import {
FundType } from '`@lfx-one/shared/enums/crowdfunding.enum`';" (update the import
statement referencing FundType in the file to use the shared alias to match
project conventions).
---
Nitpick comments:
In `@packages/shared/src/interfaces/crowdfunding.interface.ts`:
- Line 81: The DonationHistoryItem interface currently types fundType as string;
change its type to the shared FundType enum (replace "fundType: string" with
"fundType: FundType") and add the necessary import or reference to FundType so
the interface compiles; then update any code, tests, or usages that construct
DonationHistoryItem (or parse/serialize it) to use valid FundType values instead
of arbitrary strings to ensure type safety.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 88e59634-1ed0-438d-a8bf-f0387c2f654a
📒 Files selected for processing (14)
apps/lfx-one/src/app/app.routes.tsapps/lfx-one/src/app/layouts/main-layout/main-layout.component.tsapps/lfx-one/src/app/modules/crowdfunding/crowdfunding.mock.tsapps/lfx-one/src/app/modules/crowdfunding/crowdfunding.routes.tsapps/lfx-one/src/app/shared/components/sidebar/sidebar.component.htmlapps/lfx-one/src/app/shared/components/sidebar/sidebar.component.tspackages/shared/src/constants/crowdfunding.constants.tspackages/shared/src/constants/index.tspackages/shared/src/enums/crowdfunding.enum.tspackages/shared/src/enums/index.tspackages/shared/src/interfaces/components.interface.tspackages/shared/src/interfaces/crowdfunding.interface.tspackages/shared/src/interfaces/donut-chart.interface.tspackages/shared/src/interfaces/index.ts
Address review comments from @MRashad26: - main-layout.component.ts: delete 14 lines of commented-out Crowdfunding group config (isGroup/expanded/items block) — commented-out code violates CLAUDE.md one-line-max comment rule (per @MRashad26) - crowdfunding.interface.ts: tighten DonationHistoryItem.fundType from string to FundType enum for type safety (per @MRashad26) - crowdfunding.mock.ts: update MOCK_DONATION_HISTORY entries to use FundType enum values instead of free-text strings; map 'Project' entry (no enum equivalent) to FundType.GENERAL_FUND (per @MRashad26) - sidebar.component.ts: collapse 3-line comment to single line (per @MRashad26) Resolves 6 review threads (3 unique issues, each duplicated by MRashad26). Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Review Feedback AddressedCommit: f3cc46b Changes Made
No Change Needed
Threads Resolved11 of 11 unresolved threads addressed in this iteration. |
🚀 Deployment StatusYour branch has been deployed to: https://ui-pr-749.dev.v2.cluster.linuxfound.info Deployment Details:
The deployment will be automatically removed when this PR is closed. |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (2)
apps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donation-history-table/donation-history-table.component.ts (1)
9-9: ⚡ Quick winMove
PAGE_SIZEout of module scope into@lfx-one/shared.
PAGE_SIZEis currently a module-level constant inapps/lfx-one/src/. Please define it in shared constants and import it here to align with the app-layer constant policy.As per coding guidelines
apps/lfx-one/src/**/*.{ts,tsx}: All shared constants and interfaces live in@lfx-one/shared— no module-level consts or local interface Foo {} inside apps/lfx-one/.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donation-history-table/donation-history-table.component.ts` at line 9, The module-level constant PAGE_SIZE should be moved into the shared package and imported; create/augment a shared constant (e.g., export const PAGE_SIZE = 10) in `@lfx-one/shared` (a suitable file like constants or pagination constants), remove the local PAGE_SIZE from donation-history-table.component.ts and replace it with an import from `@lfx-one/shared`, updating any references in DonationHistoryTableComponent to use the imported symbol PAGE_SIZE so the app-layer constant policy is followed.apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-finance-summary/initiative-finance-summary.component.ts (1)
49-52: ⚡ Quick winReplace hard-coded ring colors with shared theme tokens.
Lines 50-51 embed hex literals directly in component logic, which makes theming brittle. Please source these colors from shared brand/color tokens instead.
As per coding guidelines, "
apps/lfx-one/src/app/**/*.{html,scss,component.ts}: Use brand color scales (lfxColors), reference Tailwind config, no hard-coded hex values."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-finance-summary/initiative-finance-summary.component.ts` around lines 49 - 52, The component currently hard-codes ring colors in the rings array ({ value: donatedPct, color: '`#006BFF`' } and '{ value: spentPct, color: '`#1e293b`' }); replace these hex literals with shared brand color tokens from your design system (e.g., import and use lfxColors or the Tailwind config color scale) inside InitiativeFinanceSummaryComponent so theming follows the lfxColors scale (use the appropriate blue and slate/neutral token that match '`#006BFF`' and '`#1e293b`'); update the import at the top of initiative-finance-summary.component.ts and use those token references when constructing the rings array.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-finance-summary/initiative-finance-summary.component.html`:
- Line 30: The arrow character "↑" in initiative-finance-summary.component.html
isn't reliably announced by screen readers; wrap the visible arrow in a <span
aria-hidden="true"> and add an accessible label (e.g., a visually-hidden span or
aria-label) that conveys the same meaning (like "increase") next to the text
that uses initiative() and formattedMonthlyDelta() so screen readers read the
alternate text while sighted users still see the arrow.
In
`@apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-overview-sidebar/initiative-overview-sidebar.component.html`:
- Line 7: Replace the inline style gradient on the div with Tailwind gradient
utility classes that use the project's lfx color scale; remove the style
attribute on the element with data-testid="matching-banner" and add classes like
bg-gradient-to-br plus the appropriate from-<lfx color token> and to-<lfx color
token> that map to the brand colors in Tailwind config (use the lfxColors tokens
defined in your Tailwind config), ensuring you reference the same element in
initiative-overview-sidebar.component.html so no hard-coded hex values remain.
In
`@apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-settings-drawer/initiative-settings-drawer.component.html`:
- Line 193: The Save button in the template isn't wired to any handler; add a
(click)="onSave()" to the <lfx-button> in
initiative-settings-drawer.component.html and implement an onSave() method on
the InitiativeSettingsDrawerComponent class that validates the form (e.g.,
this.settingsForm or this.formGroup), stops if invalid, and then either emits
the validated payload via the component `@Output` (e.g., save or saveSettings) or
calls the existing persistence method/service (e.g.,
initiativeService.saveSettings) to persist changes and handle success/error
responses.
In
`@apps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donation-history-table/donation-history-table.component.html`:
- Around line 9-13: The actions column currently has an empty <th>, which is
inaccessible to screen readers; update the table header in
donation-history-table.component.html by adding a descriptive, visually-hidden
label (e.g., "Actions") and include scope="col" on that <th> to improve
accessibility—target the empty <th> element in the donation-history-table
component and replace it with a header containing a hidden span/class for screen
readers (sr-only or equivalent) that reads "Actions".
In
`@apps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donations-stats-bar/donations-stats-bar.component.html`:
- Line 33: The recurring amount is rendered raw via
stats().activeRecurringAmount causing inconsistent money formatting; update the
template to use the same money formatter used by the other monetary stat in this
component—wrap stats().activeRecurringAmount with the component's formatting
helper or pipe (e.g., call formatMoney(stats().activeRecurringAmount) or apply
the existing | moneyPipe) so grouping/precision matches the other stat while
keeping the "/mo" suffix.
In
`@apps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiative-card/initiative-card.component.html`:
- Around line 59-63: The template currently falls back to '#' when
initiative().publicUrl is missing; instead, conditionally render the anchor only
when initiative().publicUrl is truthy and render a non-clickable element (e.g.,
a span or button with the same classes and aria-disabled attribute) when it's
absent. Locate the element using initiative() and publicUrl in
initiative-card.component.html, keep the (click)="$event.stopPropagation()"
behavior on the non-navigating element, and ensure the disabled state visually
matches the anchor (same utility classes) while omitting href and target
attributes to avoid a no-op navigation.
In
`@apps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiatives-stats-bar/initiatives-stats-bar.component.ts`:
- Around line 21-23: The current compact formatting in
initiatives-stats-bar.component.ts uses (value / 1000).toFixed(0) which can
round up and overstate amounts; change this branch to format using one-decimal
precision (e.g., (value / 1000).toFixed(1)) and then trim a trailing ".0" so
1000 becomes "1K" while 1500 becomes "1.5K" (keep the leading "$"); update the
formatting logic where the value >= 1000 check exists to use the one-decimal
approach and remove the trailing ".0" when present.
---
Nitpick comments:
In
`@apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-finance-summary/initiative-finance-summary.component.ts`:
- Around line 49-52: The component currently hard-codes ring colors in the rings
array ({ value: donatedPct, color: '`#006BFF`' } and '{ value: spentPct, color:
'`#1e293b`' }); replace these hex literals with shared brand color tokens from
your design system (e.g., import and use lfxColors or the Tailwind config color
scale) inside InitiativeFinanceSummaryComponent so theming follows the lfxColors
scale (use the appropriate blue and slate/neutral token that match '`#006BFF`' and
'`#1e293b`'); update the import at the top of
initiative-finance-summary.component.ts and use those token references when
constructing the rings array.
In
`@apps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donation-history-table/donation-history-table.component.ts`:
- Line 9: The module-level constant PAGE_SIZE should be moved into the shared
package and imported; create/augment a shared constant (e.g., export const
PAGE_SIZE = 10) in `@lfx-one/shared` (a suitable file like constants or pagination
constants), remove the local PAGE_SIZE from donation-history-table.component.ts
and replace it with an import from `@lfx-one/shared`, updating any references in
DonationHistoryTableComponent to use the imported symbol PAGE_SIZE so the
app-layer constant policy is followed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b7175bca-a6e7-41b7-9269-b46b09a12adb
📒 Files selected for processing (60)
apps/lfx-one/src/app/modules/crowdfunding/crowdfunding.routes.tsapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-announcements/initiative-announcements.component.htmlapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-announcements/initiative-announcements.component.scssapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-announcements/initiative-announcements.component.tsapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-detail-header/initiative-detail-header.component.htmlapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-detail-header/initiative-detail-header.component.scssapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-detail-header/initiative-detail-header.component.tsapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-finance-summary/initiative-finance-summary.component.htmlapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-finance-summary/initiative-finance-summary.component.scssapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-finance-summary/initiative-finance-summary.component.tsapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-financials/initiative-financials.component.htmlapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-financials/initiative-financials.component.scssapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-financials/initiative-financials.component.tsapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-overview-sidebar/initiative-overview-sidebar.component.htmlapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-overview-sidebar/initiative-overview-sidebar.component.scssapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-overview-sidebar/initiative-overview-sidebar.component.tsapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-overview/initiative-overview.component.htmlapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-overview/initiative-overview.component.scssapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-overview/initiative-overview.component.tsapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-settings-drawer/initiative-settings-drawer.component.htmlapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-settings-drawer/initiative-settings-drawer.component.scssapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-settings-drawer/initiative-settings-drawer.component.tsapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/initiative-detail.component.htmlapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/initiative-detail.component.scssapps/lfx-one/src/app/modules/crowdfunding/initiative-detail/initiative-detail.component.tsapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/add-payment-card-dialog/add-payment-card-dialog.component.htmlapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/add-payment-card-dialog/add-payment-card-dialog.component.scssapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/add-payment-card-dialog/add-payment-card-dialog.component.tsapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donation-history-table/donation-history-table.component.htmlapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donation-history-table/donation-history-table.component.scssapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donation-history-table/donation-history-table.component.tsapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donations-stats-bar/donations-stats-bar.component.htmlapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donations-stats-bar/donations-stats-bar.component.scssapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donations-stats-bar/donations-stats-bar.component.tsapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/payment-method-card/payment-method-card.component.htmlapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/payment-method-card/payment-method-card.component.scssapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/payment-method-card/payment-method-card.component.tsapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/payment-methods/payment-methods.component.htmlapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/payment-methods/payment-methods.component.scssapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/payment-methods/payment-methods.component.tsapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/recurring-donations-list/recurring-donations-list.component.htmlapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/recurring-donations-list/recurring-donations-list.component.scssapps/lfx-one/src/app/modules/crowdfunding/my-donations/components/recurring-donations-list/recurring-donations-list.component.tsapps/lfx-one/src/app/modules/crowdfunding/my-donations/my-donations.component.htmlapps/lfx-one/src/app/modules/crowdfunding/my-donations/my-donations.component.tsapps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiative-card/initiative-card.component.htmlapps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiative-card/initiative-card.component.scssapps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiative-card/initiative-card.component.tsapps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiatives-list/initiatives-list.component.htmlapps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiatives-list/initiatives-list.component.scssapps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiatives-list/initiatives-list.component.tsapps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiatives-stats-bar/initiatives-stats-bar.component.htmlapps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiatives-stats-bar/initiatives-stats-bar.component.scssapps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiatives-stats-bar/initiatives-stats-bar.component.tsapps/lfx-one/src/app/modules/crowdfunding/my-initiatives/my-initiatives.component.htmlapps/lfx-one/src/app/modules/crowdfunding/my-initiatives/my-initiatives.component.tsapps/lfx-one/src/app/shared/components/donut-chart/donut-chart.component.htmlapps/lfx-one/src/app/shared/components/donut-chart/donut-chart.component.scssapps/lfx-one/src/app/shared/components/donut-chart/donut-chart.component.tspackages/shared/src/interfaces/crowdfunding.interface.ts
✅ Files skipped from review due to trivial changes (18)
- apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-overview-sidebar/initiative-overview-sidebar.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-financials/initiative-financials.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-announcements/initiative-announcements.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-detail-header/initiative-detail-header.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/my-donations/components/payment-methods/payment-methods.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-settings-drawer/initiative-settings-drawer.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiatives-stats-bar/initiatives-stats-bar.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/my-donations/components/recurring-donations-list/recurring-donations-list.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donation-history-table/donation-history-table.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiative-card/initiative-card.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-overview/initiative-overview.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/components/initiative-finance-summary/initiative-finance-summary.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/initiative-detail/initiative-detail.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/my-donations/components/add-payment-card-dialog/add-payment-card-dialog.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/my-donations/components/payment-method-card/payment-method-card.component.ts
- apps/lfx-one/src/app/modules/crowdfunding/my-initiatives/components/initiatives-list/initiatives-list.component.scss
- apps/lfx-one/src/app/modules/crowdfunding/my-donations/components/donations-stats-bar/donations-stats-bar.component.scss
- apps/lfx-one/src/app/shared/components/donut-chart/donut-chart.component.scss
Address review comments from @MRashad26: - main-layout.component.ts: delete 14 lines of commented-out Crowdfunding group config (isGroup/expanded/items block) — commented-out code violates CLAUDE.md one-line-max comment rule (per @MRashad26) - crowdfunding.interface.ts: tighten DonationHistoryItem.fundType from string to FundType enum for type safety (per @MRashad26) - crowdfunding.mock.ts: update MOCK_DONATION_HISTORY entries to use FundType enum values instead of free-text strings; map 'Project' entry (no enum equivalent) to FundType.GENERAL_FUND (per @MRashad26) - sidebar.component.ts: collapse 3-line comment to single line (per @MRashad26) Resolves 6 review threads (3 unique issues, each duplicated by MRashad26). Signed-off-by: Efren Lim <elim@linuxfoundation.org>
7ab6094 to
4d571eb
Compare
🧹 Deployment RemovedThe deployment for PR #749 has been removed. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 86 out of 87 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
apps/lfx-one/src/server/server.ts:340
- The runtime config object now includes
stripePublishableKey, but the debug log that immediately follows is still named/message-scoped to Intercom (intercom_ssr_context/ "Intercom SSR inputs resolved"). This makes logs misleading when debugging runtime-config issues unrelated to Intercom (e.g., Stripe Elements failing to load).
🧹 Deployment RemovedThe deployment for PR #749 has been removed. |
…d sidebar navigation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Address review comments from @MRashad26: - main-layout.component.ts: delete 14 lines of commented-out Crowdfunding group config (isGroup/expanded/items block) — commented-out code violates CLAUDE.md one-line-max comment rule (per @MRashad26) - crowdfunding.interface.ts: tighten DonationHistoryItem.fundType from string to FundType enum for type safety (per @MRashad26) - crowdfunding.mock.ts: update MOCK_DONATION_HISTORY entries to use FundType enum values instead of free-text strings; map 'Project' entry (no enum equivalent) to FundType.GENERAL_FUND (per @MRashad26) - sidebar.component.ts: collapse 3-line comment to single line (per @MRashad26) Resolves 6 review threads (3 unique issues, each duplicated by MRashad26). Signed-off-by: Efren Lim <elim@linuxfoundation.org>
… and stats bar (#750) * feat(crowdfunding): add my initiatives list page with initiative card and stats bar Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address PR #750 review feedback Address review comments from @MRashad26: - initiative-card.component.ts: extract progressPercent inline computed to private initProgressPercent(); add formattedRaised and formattedGoal computed signals; move formatCurrency to private (per @MRashad26) - initiative-card.component.html: replace formatCurrency() template calls with formattedRaised()/formattedGoal() signal reads; add Space keydown handler to role=button container; stop Enter/Space propagation on View Public link to prevent double-navigation (per @MRashad26, copilot[bot]) - initiatives-stats-bar.component.ts: add formattedTotalRaised and formattedMonthlyGain computed signals; move formatCurrency to private (per @MRashad26) - initiatives-stats-bar.component.html: replace formatCurrency() template calls with signal reads (per @MRashad26) - initiatives-list.component.ts: extract statusCounts and filterOptions inline multi-line computeds to private initStatusCounts() and initFilterOptions() (per @MRashad26) - my-initiatives.component.ts: extract stats inline multi-line computed to private initStats() (per @MRashad26) Resolves 10 review threads. Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat(crowdfunding): add initiative detail page, sub-components, settings drawer, and donut chart (#751) * feat(crowdfunding): add initiative detail page, sub-components, settings drawer, and donut chart Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: pr comments Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat(crowdfunding): add my donations page with recurring donations, history, and payment methods (#752) * feat(crowdfunding): add my donations page with recurring donations, history, and payment methods Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: pr issue comments Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: missing initiatives list card border Signed-off-by: Efren Lim <elim@linuxfoundation.org> --------- Signed-off-by: Efren Lim <elim@linuxfoundation.org> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> --------- Signed-off-by: Efren Lim <elim@linuxfoundation.org> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> --------- Signed-off-by: Efren Lim <elim@linuxfoundation.org> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
* feat(crowdfunding): add shared types, mock data, routing scaffold, and sidebar navigation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address PR #749 review feedback Address review comments from @MRashad26: - main-layout.component.ts: delete 14 lines of commented-out Crowdfunding group config (isGroup/expanded/items block) — commented-out code violates CLAUDE.md one-line-max comment rule (per @MRashad26) - crowdfunding.interface.ts: tighten DonationHistoryItem.fundType from string to FundType enum for type safety (per @MRashad26) - crowdfunding.mock.ts: update MOCK_DONATION_HISTORY entries to use FundType enum values instead of free-text strings; map 'Project' entry (no enum equivalent) to FundType.GENERAL_FUND (per @MRashad26) - sidebar.component.ts: collapse 3-line comment to single line (per @MRashad26) Resolves 6 review threads (3 unique issues, each duplicated by MRashad26). Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added my initiatives endpoint using mock data Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added initiative stats endpoint with mock data Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: logo url display Signed-off-by: Efren Lim <elim@linuxfoundation.org> * chore: change my initiatives card click to use slug instead of id Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: pr preflight issues Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address PR #781 review feedback Address review comments from copilot-pull-request-reviewer[bot]: - crowdfunding.interface.ts: update header comment to reflect these are normalized/proxied DTOs, not a direct mirror of the upstream contract (server maps snake_case BackendInitiative into camelCase InitiativeBase) - crowdfunding.route.ts: remove misleading inline comment about /:id-style route ordering — no such routes exist in this router - initiative-card.component.html/.ts: remove commented-out fund type icon element and corresponding unused fundTypeIcon computed signal + CROWDFUNDING_FUND_TYPE_ICONS import - initiatives-list.component.ts: rename onCardClick parameter from id to slug to match what the card emits (per suppressed copilot-pull-request-reviewer[bot] note) Resolves 4 review threads. Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: bring back initiative card icon Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address PR #781 type-safety review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: address pr comments Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: incorrect empty response page size Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat(crowdfunding): add initiative detail and transactions mock endpoints (#782) * feat: added initiative detail endpoint with mock data Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added transactions list mock endpoint Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: wired the financials tab to the mocked transactions endpoint Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added initiative detail endpoint with mock data Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added transactions list mock endpoint Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: wired the financials tab to the mocked transactions endpoint Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: style lint issues Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address PR #782 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address PR #782 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address PR #782 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address PR #782 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address PR #782 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat(crowdfunding): add my donations mock endpoints (#783) * fix(crowdfunding): address PR #782 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added initiative detail endpoint with mock data Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added transactions list mock endpoint Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: style lint issues Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added donation history endpoint with mock data Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: implement my donations pagination Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added recurring donations endpoint with mock data Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added donation stats mock endpoint Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: implement get payment method with mock data Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added donation history endpoint with mock data Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added recurring donations endpoint with mock data Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: pr issue comments Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address PR #782 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address PR #783 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address PR #783 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: pr comments 3rd round Signed-off-by: Efren Lim <elim@linuxfoundation.org> --------- Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): move EMPTY_TRANSACTION_STATE to shared constants Move module-level constant out of apps/lfx-one/ and into the shared constants package to comply with CLAUDE.md convention. - packages/shared/src/constants/crowdfunding.constants.ts: add EMPTY_TRANSACTION_STATE export alongside EMPTY_TRANSACTION_LIST - initiative-financials.component.ts: remove local const, import EMPTY_TRANSACTION_STATE from @lfx-one/shared/constants Resolves 1 review thread (per @MRashad26). Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): add UTC timezone to DatePipe in overview sidebar Signed-off-by: Efren Lim <elim@linuxfoundation.org> --------- Signed-off-by: Efren Lim <elim@linuxfoundation.org> --------- Signed-off-by: Efren Lim <elim@linuxfoundation.org> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
…view comments Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
#797) * feat(crowdfunding): integrate Stripe Elements into add-payment-card-dialog Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(review): address PR #797 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): pr 797 issue comments Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): address copilot PR #797 review comments Address review comments from copilot-pull-request-reviewer: - stripe.service.ts: merge duplicate @angular/core imports into one - add-payment-card-dialog.component.ts: surface stripeError when getStripe() returns null (missing publishable key); add elementsReady signal set after successful mount and reset on destroy; add formReady computed combining elementsReady + per-field completion flags - add-payment-card-dialog.component.html: add id to each field label and aria-labelledby on the Stripe container divs for screen-reader association; disable submit button via [disabled]="!formReady()" Resolves 5 review threads. Signed-off-by: Efren Lim <elim@linuxfoundation.org> --------- Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
…#901) * feat(crowdfunding): add shared types, mock data, routing scaffold, and sidebar navigation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Efren Lim <elim@linuxfoundation.org> * refactor(crowdfunding): extract generic client credentials token util Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat(crowdfunding): implement me-api endpoints and fix token auth Signed-off-by: Efren Lim <elim@linuxfoundation.org> * refactor(crowdfunding): extract token to middleware, remove setup-intent Signed-off-by: Efren Lim <elim@linuxfoundation.org> * refactor(auth): add scope to token exchange and extract param interfaces Signed-off-by: Efren Lim <elim@linuxfoundation.org> * refactor(crowdfunding): replace mock endpoints with real cf-api calls Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: prettier changes Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(review): address PR #901 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * chore: change initiatives endpoint Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(crowdfunding): replace refresh-token exchange with auth-code flow Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(review): address PR #901 review feedback Address review comments from copilot-pull-request-reviewer[bot]: - apps/lfx-one/src/server/types/crowdfunding.types.ts: make BackendDonation.initiative_id optional (string | undefined) to match upstream shape — usage in mapCfDonationToMyDonation and donation-stats already treats the field as absent-able (per copilot-pull-request-reviewer[bot]) - apps/lfx-one/src/server/middleware/auth.middleware.ts: outdated comment re: refresh_token exchange — extractCrowdfundingToken was replaced with a session read; the authorization_code flow now handles CF token acquisition in CrowdfundingAuthService Resolves 2 review threads. Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat(crowdfunding): wire cancel subscription and clean up recurring donations menu Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat(crowdfunding): add confirmation dialogs for cancel donation and remove payment method Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(review): address PR #901 review feedback Address review comments from copilot-pull-request-reviewer[bot]: - auth.middleware.ts: add explicit tokenRequired: false entry for /api/crowdfunding/auth/start so the CF auth-code redirect works when the bearer token is missing/expired (per copilot-pull-request-reviewer[bot]) Resolves 1 of 4 review threads (3 addressed via response, no code change). Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(review): address PR #901 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(review): address PR #901 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix: initiative drawer field size and added dropdown values for categories Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat: added call to patch initiative data Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat(crowdfunding): wire initiative settings drawer to PATCH API Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat(crowdfunding): add fund distribution section to initiative settings Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(review): address PR #901 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(review): address PR #901 review feedback (round 2) Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat(crowdfunding): wire public page links and fix fund distribution display Signed-off-by: Efren Lim <elim@linuxfoundation.org> * feat(crowdfunding): wire public page links and fix fund distribution display Signed-off-by: Efren Lim <elim@linuxfoundation.org> * fix(review): address PR #901 review feedback Signed-off-by: Efren Lim <elim@linuxfoundation.org> --------- Signed-off-by: Efren Lim <elim@linuxfoundation.org> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Summary
Implements the complete crowdfunding module, wiring four pages to the crowdfunding API with user-scoped token auth. This branch served as the integration base for a series of stacked PRs — the full feature landed here before targeting main.
Pages
Components and drawers
Backend
/api/crowdfunding/*)CrowdfundingAuthService— exchanges Auth0 tokens for user-scoped crowdfunding API tokensCrowdfundingMapper— normalises API response shapes into shared interfacesShared package (
@lfx-one/shared)crowdfunding.interface.ts— all shared types (initiatives, donations, transactions, payment methods, stats)crowdfunding.constants.ts— empty states, palette, defaultscrowdfunding.enum.ts— fund type and initiative status enumscrowdfunding.utils.ts—getDonorAvatarClassdonor avatar helperInfrastructure
STRIPE_PUBLISHABLE_KEYadded to Helm chart values and.env.exampleNotes