Skip to content

Conversation

@Priyanshubhartistm
Copy link

@Priyanshubhartistm Priyanshubhartistm commented Jan 8, 2026

What kind of change does this PR introduce?

Refactoring

Issue Number:

Fixes #6168

Snapshots/Videos:

N/A – This PR only includes internal refactoring with no UI changes.

If relevant, did you update the documentation?

Not applicable. No documentation changes were required for this refactor.

Summary

This PR refactors the IconComponent to comply with the reusable shared component policy.
The component was previously located under src/components despite being used by shared components.
It has now been migrated to src/shared-components, with all imports updated accordingly.
The refactor maintains existing functionality and ensures consistency with the project’s shared component architecture.

Does this PR introduce a breaking change?

No. This change is purely a refactor and does not alter any external APIs or component behavior.

Checklist

CodeRabbit AI Review

  • I have reviewed and addressed all critical issues flagged by CodeRabbit AI
  • I have implemented or provided justification for each non-critical suggestion
  • I have documented my reasoning in the PR comments where CodeRabbit AI suggestions were not implemented

Test Coverage

  • I have written tests for all new changes/features
  • I have verified that test coverage meets or exceeds 95% for the affected component
  • I have run the relevant test suite locally and all tests pass

Other information

  • This PR only affects IconComponent.
  • Existing application logic and unrelated tests remain unchanged.
  • Full project test failures are unrelated and pre-existing.

Have you read the contributing guide?

Yes

Summary by CodeRabbit

  • Chores
    • Switched components to use a shared icon implementation and centralized its prop type definition.
  • Tests
    • Updated test mocks to reference the shared icon implementation.
  • Documentation
    • Minor JSDoc and example formatting improvements for the collapsible dropdown component.

✏️ Tip: You can customize this high-level summary in your review settings.

@keploy
Copy link

keploy bot commented Jan 8, 2026

No significant changes currently retry

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Our Pull Request Approval Process

This PR will be reviewed according to our:

  1. Palisadoes Contributing Guidelines

  2. AI Usage Policy

Your PR may be automatically closed if:

  1. Our PR template isn't filled in correctly

  2. You haven't correctly linked your PR to an issue

Thanks for contributing!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

Walkthrough

IconComponent was moved to src/shared-components and its prop type was extracted to src/types/shared-components/IconComponent. Import paths and test mocks were updated to the new location; no runtime behavior or public APIs were changed.

Changes

Cohort / File(s) Summary
Component source files with updated IconComponent imports
src/components/CollapsibleDropdown/CollapsibleDropdown.tsx, src/components/EventStats/EventStatsWrapper.tsx, src/components/LeftDrawerOrg/LeftDrawerOrg.tsx, src/components/UserPortal/UserSidebar/UserSidebar.tsx, src/components/UserPortal/UserSidebarOrg/UserSidebarOrg.tsx, src/screens/AdminPortal/ManageTag/ManageTag.tsx, src/screens/AdminPortal/OrganizationTags/OrganizationTags.tsx, src/screens/AdminPortal/SubTags/SubTags.tsx, src/shared-components/DataGridWrapper/DataGridErrorOverlay.tsx, src/shared-components/EmptyState/EmptyState.tsx
Import path for IconComponent changed from components/IconComponent/IconComponentshared-components/IconComponent/IconComponent. No logic or behavior changes.
Test files with updated mock paths
src/components/CollapsibleDropdown/CollapsibleDropdown.spec.tsx, src/components/LeftDrawerOrg/LeftDrawerOrg.spec.tsx, src/screens/AdminPortal/Users/Users.spec.tsx
Mock module path updated to shared-components/IconComponent/IconComponent. Mock implementations are unchanged.
IconComponent migration and type extraction
src/shared-components/IconComponent/IconComponent.tsx, src/types/shared-components/IconComponent/index.ts
Removed the locally declared IIconComponent interface and now import IIconComponent from types/shared-components/IconComponent. Added new type file exporting IIconComponent.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore
❌ Failed checks (1 error)
Check name Status Explanation Resolution
Test Coverage Validation ❌ Error IconComponent migrated to shared-components lacks dedicated test file (*.spec.tsx) despite requirement for 100% test coverage in issue #6168. Create comprehensive test file at src/shared-components/IconComponent/IconComponent.spec.tsx covering IIconComponent interface properties and rendering behavior.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'refactor: Move IconComponent to shared-components' clearly and specifically describes the main change in the PR—migrating the IconComponent to a shared location.
Description check ✅ Passed The PR description follows the template structure and includes all major required sections: change type (Refactoring), issue number (#6168), summary with motivation, breaking change statement, and completed checklist items.
Linked Issues check ✅ Passed The PR addresses all key objectives from issue #6168: migrated IconComponent from src/components to src/shared-components [#6168], updated all import paths [#6168], placed types in src/types/shared-components [#6168], and preserved existing functionality [#6168].
Out of Scope Changes check ✅ Passed All changes are directly related to migrating IconComponent and updating its import paths; no unrelated modifications detected. JSDoc updates and type extraction are necessary refactoring activities within scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 8, 2026
@Cioppolo14
Copy link
Contributor

@coderabbitai full review and reevaluate all resolved items and include the following points:

  1. Test Coverage & Quality Validation:

    1. Validate whether any updated test files:
      1. Cover all use cases including edge cases, error scenarios, and success paths
      2. Have valid, properly structured tests following Jest and React Testing Library best practices
      3. Provide 100% test code coverage for all modified/added functions, components, and branches
      4. Include proper mocking of GraphQL queries/mutations, external dependencies, and API calls
      5. Test both user interactions and state changes comprehensively
      6. Require any additional tests for uncovered scenarios
    2. For each modified file with logic or UI, verify corresponding test files exist and are updated:
      1. Check that test files follow naming conventions (_.test.tsx, _.test.ts, _.spec.tsx, _.spec.ts)
      2. Validate that tests don't include disabled tests (it.skip, describe.skip) unless explicitly documented
      3. Ensure mock data cleanup is performed (as required by pre-commit hooks)
  2. Code Quality & Repository Standards:

    1. Verify TypeScript compliance:
      1. No use of any type without explicit justification
      2. Proper interface/type definitions for all props, state, and function parameters
      3. No TypeScript errors or warnings
    2. Validate GraphQL implementation:
      1. Queries/mutations are properly typed and follow existing patterns in src/GraphQl/
      2. No duplicate or redundant queries (check for pagination inconsistencies)
      3. Error handling is implemented for all GraphQL operations
    3. Check React component best practices:
      1. Functional components with proper hooks usage
      2. Material-UI component patterns are followed consistently
      3. No prop drilling; proper use of context when needed
      4. Proper cleanup in useEffect hooks
    4. Verify internationalization (i18n):
      1. All user-facing strings use i18next translation keys
      2. New translation keys are added to locale files
      3. No hardcoded English text in UI components
    5. Validate accessibility:
      1. Proper ARIA labels and roles
      2. Keyboard navigation support
      3. Screen reader compatibility
  3. Documentation & Code Comments:

    1. Verify auto-generated documentation is updated (as enforced by Check-AutoDocs job)
    2. Check for adequate JSDoc comments on public functions and complex logic
    3. Ensure README.md or related docs are updated if new features are added
    4. Validate that Table of Contents is updated (as required by pre-commit hooks)
  4. Identify Issues:

    1. Lines of code that are missing tests (list specific line numbers)
    2. Any unnecessary files that have been submitted (build artifacts, node_modules, .env files, IDE configs)
    3. Unused imports or dead code (as checked by knip)
    4. Console.log statements or debug code left in production files
    5. Files that should be excluded from the PR scope
  5. PR Requirements Validation:

    1. Verify the PR meets the requirements of the linked issue:
      1. All acceptance criteria are addressed
      2. No out-of-scope changes are included
    2. Validate compliance with all previously suggested improvements and comments:
      1. All review comments have been addressed
      2. Requested changes have been implemented correctly
    3. Check PR metadata:
      1. Proper title and description
      2. Linked to appropriate issue(s)
      3. Target branch is correct (typically develop)
    4. Verify no sensitive information is exposed (as checked by Check-Sensitive-Files job)
  6. CI/CD Pipeline Compatibility:

    1. Validate that code changes won't break any of the 17+ CI jobs
    2. Ensure pre-commit hook requirements are met:
      1. Code formatting (Prettier)
      2. Linting (ESLint)
      3. Type checking (TypeScript)
    3. Check that changes don't introduce performance regressions for the 12-shard test execution
  7. Security & Best Practices:

    1. No security vulnerabilities introduced
    2. No exposed API keys, tokens, or credentials
    3. Proper input validation and sanitization
    4. No SQL injection or XSS vulnerabilities in any data handling
  8. Implementation Correctness:

    1. For the specific implementation file(s) being tested:
      1. Verify the implementation logic is correct and free of bugs
      2. Validate that queries target the correct database tables/entities
      3. Check that foreign key relationships are correctly enforced
      4. Confirm business logic constraints are properly implemented
      5. Any bugs, logic errors, or incorrect implementations discovered in the file(s) under test MUST be fixed in this PR before approval
  9. Review Decision:

    1. When critical issues are found, clearly state that changes are required in your response but DO NOT append the [approve] tag.
    2. Only append the [approve] tag when ALL criteria are satisfied and zero changes are required:
      1. Complete test coverage (≥95%)
      2. No code quality issues, security concerns, or bugs
      3. Full implementation of issue requirements
      4. No bugs or logic errors in the implementation file(s) under test
      5. Compliance with all previous feedback
      6. No unnecessary files
  10. Approvals:

    1. Approve the PR by appending the text "APPROVED" below your response only if:
    2. All criteria above are fully satisfied
    3. The implementation file(s) under test are correct and bug-free
    4. No changes, even trivial ones, are required
  11. Focus Areas:

    1. Prioritize substantive issues over minor stylistic suggestions
    2. Focus on issues that would cause CI pipeline failures or production bugs
    3. Highlight any deviations from established codebase patterns

Note: Test-focused PRs should maintain clear scope boundaries. However, this does NOT exempt bugs in the specific file(s) being tested - those must be fixed in the same PR. Only bugs in unrelated files may be deferred to separate issues.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 9, 2026

✅ Actions performed

Comments resolved and changes approved.

@Cioppolo14
Copy link
Contributor

@Priyanshubhartistm Please fix the failing tests.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 10, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @src/components/CollapsibleDropdown/CollapsibleDropdown.tsx:
- Around line 18-31: The TSDoc example for CollapsibleDropdown contains
unnecessary backslash-escaped braces that break JSX/TSX syntax; update the
example inside the triple-backtick block to use normal braces (e.g., change
target=\{\{ ... \}\} to target={{ ... }}, replace \{ ... \} array items with {
... }, and convert showDropdown=\{true\} and setShowDropdown=\{setShowDropdown\}
to showDropdown={true} and setShowDropdown={setShowDropdown}) so the example
displays and compiles correctly.
- Around line 7-10: Update the JSDoc for the CollapsibleDropdown component to
use flat @param names that match the destructured function signature: replace
nested tags like @param props.target, @param props.showDropdown, @param
props.setShowDropdown with @param target, @param showDropdown, and @param
setShowDropdown so the editor/parsing correctly associates docs with the
destructured parameters in the CollapsibleDropdown function.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e573fa2 and 91aa1ef.

📒 Files selected for processing (1)
  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
🧰 Additional context used
📓 Path-based instructions (3)
src/**/components/**/*.{ts,tsx}

📄 CodeRabbit inference engine (Custom checks)

All components must follow reusable component policy: No inline interfaces, correct portal placement, wrapper usage

Files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (Custom checks)

Zero TypeScript errors: Run pnpm run typecheck and must pass without errors or warnings

Files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
**/*

⚙️ CodeRabbit configuration file

**/*: Full review and reevaluate all resolved and dismissed items and include the following points:

  1. Test Coverage & Quality Validation:

    1. Validate whether any updated test files:
      1. Cover all use cases including edge cases, error scenarios, and success paths
      2. Have valid, properly structured tests following Jest and React Testing Library best practices
      3. Provide 100% test code coverage for all modified/added functions, components, and branches
      4. Include proper mocking of GraphQL queries/mutations, external dependencies, and API calls
      5. Test both user interactions and state changes comprehensively
      6. Require any additional tests for uncovered scenarios
    2. For each modified file with logic or UI, verify corresponding test files exist and are updated:
      1. Check that test files follow naming conventions (_.test.tsx, _.test.ts, _.spec.tsx, _.spec.ts)
      2. Validate that tests don't include disabled tests (it.skip, describe.skip) unless explicitly documented
      3. Ensure mock data cleanup is performed (as required by pre-commit hooks)
  2. Code Quality & Repository Standards:

    1. Verify TypeScript compliance:
      1. No use of any type without explicit justification
      2. Proper interface/type definitions for all props, state, and function parameters
      3. No TypeScript errors or warnings
    2. Validate GraphQL implementation:
      1. Queries/mutations are properly typed and follow existing patterns in src/GraphQl/
      2. No duplicate or redundant queries (check for pagination inconsistencies)
      3. Error handling is implemented for all GraphQL operations
    3. Check React component best practices:
      1. Functional components with proper hooks usage
      2. Material-UI component patterns are followed consistently
      3. No prop drilling; proper use of context when needed
      4. Proper cleanup in useEffect hooks
    4. Verify internatio...

Files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
🧠 Learnings (4)
📚 Learning: 2025-12-26T20:34:53.912Z
Learnt from: MuhammadUmar7195
Repo: PalisadoesFoundation/talawa-admin PR: 5847
File: src/screens/UserPortal/Volunteer/Invitations/Invitations.tsx:243-243
Timestamp: 2025-12-26T20:34:53.912Z
Learning: In PalisadoesFoundation/talawa-admin, whenever you modify a file (e.g., for migrations, tests, or feature changes), replace inline color attributes like color="grey" with Bootstrap utility classes (e.g., className="text-secondary") to satisfy the CSS-Policy-Check CI. This is a general compliance guideline, not scope creep, and should be applied to all affected TSX files during reviews. Steps: 1) Find inline color attributes in JSX/TSX. 2) Replace with appropriate Bootstrap text/color utility classes. 3) Ensure the visual outcome remains the same. 4) Run CI checks to confirm the policy passes.

Applied to files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
📚 Learning: 2026-01-06T16:39:41.033Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 6199
File: src/shared-components/ProfileForm/ProfileForm.tsx:0-0
Timestamp: 2026-01-06T16:39:41.033Z
Learning: When refactoring or consolidating components (e.g., talawa-admin), remove helper functions that were copied from old files but are not used in the new implementation. Before exporting utilities, verify there are real usages across the codebase (search usages, remove dead code, and keep only necessary exports) to improve maintainability and reduce bundle size.

Applied to files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
📚 Learning: 2026-01-07T09:08:09.150Z
Learnt from: adityai0
Repo: PalisadoesFoundation/talawa-admin PR: 6202
File: src/components/EventManagement/EventAgendaItems/EventAgendaItems.tsx:4-13
Timestamp: 2026-01-07T09:08:09.150Z
Learning: In the talawa-admin repository, document comments with TSDoc in all TSX files. Do not use JSDoc. Write non-standard tags like component and requires as plain text (no leading @). Use standard TSDoc tags such as param, remarks, returns, and example with the leading @. This guideline applies to all TSX components (e.g., src/components/.../*.tsx).

Applied to files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
📚 Learning: 2026-01-08T16:45:49.201Z
Learnt from: adityai0
Repo: PalisadoesFoundation/talawa-admin PR: 6241
File: src/components/AdminPortal/OrgPeopleListCard/OrgPeopleListCard.tsx:12-16
Timestamp: 2026-01-08T16:45:49.201Z
Learning: In TSX components, prefer flat JSDoc parameter documentation format (e.g., param id, param toggleRemoveModal) over the nested format (param props.id). The nested form can break editor parsing. When a component accepts a props object, destructure the props in the function signature to align with the flat JSDoc style (e.g., function MyComp({ id, toggleRemoveModal }: Props) { ... }). Ensure all param tags correspond to the destructured props and reflect actual component props to improve editor support and readability.

Applied to files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
🔇 Additional comments (2)
src/components/CollapsibleDropdown/CollapsibleDropdown.tsx (2)

42-42: Import path is correctly configured.

With baseUrl: "src" configured in tsconfig.json, the import 'shared-components/IconComponent/IconComponent' correctly resolves to src/shared-components/IconComponent/IconComponent.tsx. This is the standard configuration pattern and will compile without errors.


1-132: No changes required - test file properly updated with new IconComponent import path.

The test file has been verified and already contains the correct mock setup. Line 36 of CollapsibleDropdown.spec.tsx properly mocks IconComponent from the new path 'shared-components/IconComponent/IconComponent'. Test coverage is comprehensive with 10+ test suites covering component rendering, dropdown toggle functionality, location-based visibility, icon styling, chevron direction, accessibility attributes, navigation, and button styling. No skipped tests were found, and mock cleanup is properly implemented.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/CollapsibleDropdown/CollapsibleDropdown.tsx (1)

32-32: Remove @ prefix from non-standard TSDoc tag.

The @dependencies tag is not a standard TSDoc tag and should not use the @ prefix. In the talawa-admin repository, non-standard tags should be written as plain text without the leading @.

📝 Proposed fix
-@dependencies
+dependencies

As per TSDoc coding guidelines for this repository, which require standard tags (@param, @returns, @remarks, @example) to use the @ prefix, while non-standard tags should be plain text.

🤖 Fix all issues with AI agents
In @src/components/CollapsibleDropdown/CollapsibleDropdown.tsx:
- Around line 7-11: Update the JSDoc for the CollapsibleDropdown component to
restore precise return type information: change the @returns line to document
the actual React element type (e.g., JSX.Element or React.ReactElement) produced
by the CollapsibleDropdown function so editors can provide accurate
IntelliSense; locate the component declaration named CollapsibleDropdown and
replace the simplified "@returns The collapsible dropdown component." with a
typed description like "@returns {JSX.Element} The rendered collapsible dropdown
element." and keep the existing flat @param entries unchanged.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91aa1ef and c457038.

📒 Files selected for processing (1)
  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
🧰 Additional context used
📓 Path-based instructions (3)
src/**/components/**/*.{ts,tsx}

📄 CodeRabbit inference engine (Custom checks)

All components must follow reusable component policy: No inline interfaces, correct portal placement, wrapper usage

Files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (Custom checks)

Zero TypeScript errors: Run pnpm run typecheck and must pass without errors or warnings

Files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
**/*

⚙️ CodeRabbit configuration file

**/*: Full review and reevaluate all resolved and dismissed items and include the following points:

  1. Test Coverage & Quality Validation:

    1. Validate whether any updated test files:
      1. Cover all use cases including edge cases, error scenarios, and success paths
      2. Have valid, properly structured tests following Jest and React Testing Library best practices
      3. Provide 100% test code coverage for all modified/added functions, components, and branches
      4. Include proper mocking of GraphQL queries/mutations, external dependencies, and API calls
      5. Test both user interactions and state changes comprehensively
      6. Require any additional tests for uncovered scenarios
    2. For each modified file with logic or UI, verify corresponding test files exist and are updated:
      1. Check that test files follow naming conventions (_.test.tsx, _.test.ts, _.spec.tsx, _.spec.ts)
      2. Validate that tests don't include disabled tests (it.skip, describe.skip) unless explicitly documented
      3. Ensure mock data cleanup is performed (as required by pre-commit hooks)
  2. Code Quality & Repository Standards:

    1. Verify TypeScript compliance:
      1. No use of any type without explicit justification
      2. Proper interface/type definitions for all props, state, and function parameters
      3. No TypeScript errors or warnings
    2. Validate GraphQL implementation:
      1. Queries/mutations are properly typed and follow existing patterns in src/GraphQl/
      2. No duplicate or redundant queries (check for pagination inconsistencies)
      3. Error handling is implemented for all GraphQL operations
    3. Check React component best practices:
      1. Functional components with proper hooks usage
      2. Material-UI component patterns are followed consistently
      3. No prop drilling; proper use of context when needed
      4. Proper cleanup in useEffect hooks
    4. Verify internatio...

Files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
🧠 Learnings (4)
📚 Learning: 2025-12-26T20:34:53.912Z
Learnt from: MuhammadUmar7195
Repo: PalisadoesFoundation/talawa-admin PR: 5847
File: src/screens/UserPortal/Volunteer/Invitations/Invitations.tsx:243-243
Timestamp: 2025-12-26T20:34:53.912Z
Learning: In PalisadoesFoundation/talawa-admin, whenever you modify a file (e.g., for migrations, tests, or feature changes), replace inline color attributes like color="grey" with Bootstrap utility classes (e.g., className="text-secondary") to satisfy the CSS-Policy-Check CI. This is a general compliance guideline, not scope creep, and should be applied to all affected TSX files during reviews. Steps: 1) Find inline color attributes in JSX/TSX. 2) Replace with appropriate Bootstrap text/color utility classes. 3) Ensure the visual outcome remains the same. 4) Run CI checks to confirm the policy passes.

Applied to files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
📚 Learning: 2026-01-06T16:39:41.033Z
Learnt from: Jashan32
Repo: PalisadoesFoundation/talawa-admin PR: 6199
File: src/shared-components/ProfileForm/ProfileForm.tsx:0-0
Timestamp: 2026-01-06T16:39:41.033Z
Learning: When refactoring or consolidating components (e.g., talawa-admin), remove helper functions that were copied from old files but are not used in the new implementation. Before exporting utilities, verify there are real usages across the codebase (search usages, remove dead code, and keep only necessary exports) to improve maintainability and reduce bundle size.

Applied to files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
📚 Learning: 2026-01-07T09:08:09.150Z
Learnt from: adityai0
Repo: PalisadoesFoundation/talawa-admin PR: 6202
File: src/components/EventManagement/EventAgendaItems/EventAgendaItems.tsx:4-13
Timestamp: 2026-01-07T09:08:09.150Z
Learning: In the talawa-admin repository, document comments with TSDoc in all TSX files. Do not use JSDoc. Write non-standard tags like component and requires as plain text (no leading @). Use standard TSDoc tags such as param, remarks, returns, and example with the leading @. This guideline applies to all TSX components (e.g., src/components/.../*.tsx).

Applied to files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
📚 Learning: 2026-01-08T16:45:49.201Z
Learnt from: adityai0
Repo: PalisadoesFoundation/talawa-admin PR: 6241
File: src/components/AdminPortal/OrgPeopleListCard/OrgPeopleListCard.tsx:12-16
Timestamp: 2026-01-08T16:45:49.201Z
Learning: In TSX components, prefer flat JSDoc parameter documentation format (e.g., param id, param toggleRemoveModal) over the nested format (param props.id). The nested form can break editor parsing. When a component accepts a props object, destructure the props in the function signature to align with the flat JSDoc style (e.g., function MyComp({ id, toggleRemoveModal }: Props) { ... }). Ensure all param tags correspond to the destructured props and reflect actual component props to improve editor support and readability.

Applied to files:

  • src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
🔇 Additional comments (1)
src/components/CollapsibleDropdown/CollapsibleDropdown.tsx (1)

41-41: Import path change for IconComponent is correctly implemented.

The migration of IconComponent from components/IconComponent/IconComponent to shared-components/IconComponent/IconComponent on line 41 is correct and fully aligned with the PR objective.

Verification confirms:

  • TypeScript type checking passes without errors
  • Test file CollapsibleDropdown.spec.tsx has been properly updated with the mock using the new path: vi.mock('shared-components/IconComponent/IconComponent', ...)
  • No old import references remain in the codebase
  • The new IconComponent path exists with both the component and test files in place

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.

2 participants