-
Notifications
You must be signed in to change notification settings - Fork 6
Host block on template pack profile page #9023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughAdds a Host section UI block to the InnovationPackProfilePage displaying the innovation pack provider's profile using the ContributorCardHorizontal component with existing provider data and a seamless presentation style. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/domain/InnovationPack/InnovationPackProfilePage/InnovationPackProfilePage.tsx (1)
22-22: Remove unnecessary React import.With React 19 and the modern JSX transform (required per coding guidelines), explicitly importing React for JSX is no longer necessary. This import can be safely removed as there are no direct usages of the React object in this file.
Apply this diff:
-import React from 'react';
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/domain/InnovationPack/InnovationPackProfilePage/InnovationPackProfilePage.tsx(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*
⚙️ CodeRabbit configuration file
**/*: Repository overview:
- React 19 + TypeScript single-page app for the Alkemio platform. Uses Vite 5, Apollo Client 3, MUI 7, Emotion, Vitest.
- Large surface (production build transforms ~18k modules). Core implementation lives in src/core, src/domain, and src/main; generated GraphQL hooks reside in src/core/apollo/generated.
- Authoritative docs: README.md, docs/development-setup.md, .specify/memory/constitution.md, agents.md, .github/copilot-instructions.md.
Environment & bootstrap:
- Ensure Node >=20.9.0 (Volta pins 20.15.1) and pnpm >=10.17.1.
- Keep .env (checked in) present; override locally via .env.local.
pnpm install(validated 2025-10-30, ~1s with cached deps). pnpm warns about ignored build scripts (@sentry/cli, esbuild, husky, msw); ignore or runpnpm approve-buildsif required.Validation flow (validated 2025-10-30):
pnpm lint→ runstsc --noEmitthen ESLint onsrc/**/*.ts(x); completed cleanly.pnpm vitest run --reporter=basic.pnpm build→Rewrites.build/docker/.env.baseandpublic/env-config.js; revert before commit. Emits expected large-chunk warnings.pnpm serve:dev→ serves./buildon port 3001 (afterpnpm build).pnpm format→ Prettier forsrc/**/*.ts(x).pnpm codegen→ requires backend GraphQL endpoint athttp://localhost:3000/graphql; regeneratessrc/core/apollo/generatedartifacts.pnpm start→ Vite dev server (app reachable via Traefik onhttp://localhost:3000, Vite listens on 3001). Regeneratespublic/env-config.jseach run.Layout & architecture:
src/index.tsxbootstraps the SPA;src/root.tsxwires Sentry, Apollo, routing, auth, and global state.src/core/houses shared infrastructure (auth, analytics, routing helpers, UI kit, utilities).src/domain/contains domain façades/hooks grouped by business context (space, innovationHub, communication, etc.).src/main/provides routed shells, layouts, notifications, admin flows; keep business rules in `src/domain...
Files:
src/domain/InnovationPack/InnovationPackProfilePage/InnovationPackProfilePage.tsx
src/**/*.{ts,tsx,js}
⚙️ CodeRabbit configuration file
src/**/*.{ts,tsx,js}: Review the React/TypeScript code for correctness and alignment with docs/code-guidelines.md.
Rely on global error handling and logging; only flag missing local try/catch or logging when additional mitigation is required.
Non-null assertions are discouraged except when paired with skip guards on GraphQL queries (see existing patterns).
Watch for security issues (XSS, CSRF, sensitive data exposure) and TypeScript typing violations.
Files:
src/domain/InnovationPack/InnovationPackProfilePage/InnovationPackProfilePage.tsx
🧠 Learnings (2)
📓 Common learnings
Learnt from: bobbykolev
Repo: alkem-io/client-web PR: 7150
File: src/domain/community/virtualContributor/vcProfilePage/VCProfilePageView.tsx:50-53
Timestamp: 2024-11-06T16:19:58.877Z
Learning: In `VCProfilePageView.tsx`, the `ContributorCardHorizontal` component includes the tooltip and click handler functionality for the Host card.
📚 Learning: 2024-11-06T16:19:58.877Z
Learnt from: bobbykolev
Repo: alkem-io/client-web PR: 7150
File: src/domain/community/virtualContributor/vcProfilePage/VCProfilePageView.tsx:50-53
Timestamp: 2024-11-06T16:19:58.877Z
Learning: In `VCProfilePageView.tsx`, the `ContributorCardHorizontal` component includes the tooltip and click handler functionality for the Host card.
Applied to files:
src/domain/InnovationPack/InnovationPackProfilePage/InnovationPackProfilePage.tsx
🔇 Additional comments (1)
src/domain/InnovationPack/InnovationPackProfilePage/InnovationPackProfilePage.tsx (1)
75-78: Verification confirms all implementation details are correct.The GraphQL query
InnovationPackProfilePageincludes theproviderfield with theInnovationPackProviderProfileWithAvatarfragment, which provides access to the profile data. The translation key'community.host'is defined in the i18n resource files and resolves to "Host". The component's use of optional chaining (innovationPack?.provider?.profile) safely handles potential undefined values. All implementation requirements are satisfied.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.