-
Notifications
You must be signed in to change notification settings - Fork 264
feat: added filter out document schemas & updated document schema(bump after review) #3443
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: dev
Are you sure you want to change the base?
feat: added filter out document schemas & updated document schema(bump after review) #3443
Conversation
WalkthroughThe changes introduce a new optional property, Changes
Suggested reviewers
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
apps/backoffice-v2/src/domains/documents/hooks/adapters/useWorkflowDocumentsAdapter/useWorkflowDocumentsAdapter.tsx(1 hunks)apps/backoffice-v2/src/lib/blocks/components/EditableDetails/EditableDetails.tsx(1 hunks)apps/backoffice-v2/src/lib/blocks/components/EditableDetails/types.ts(1 hunks)apps/backoffice-v2/src/pages/Entity/hooks/useEntityLogic/utils.ts(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/backoffice-v2/src/domains/documents/hooks/adapters/useWorkflowDocumentsAdapter/useWorkflowDocumentsAdapter.tsx
🧰 Additional context used
📓 Path-based instructions (1)
`apps/backoffice-v2/**/*.{ts,tsx}`: Use functional components with TypeScript. Implement smart/dumb component pattern. Place components in feature-based directories. Use compound c...
apps/backoffice-v2/**/*.{ts,tsx}: Use functional components with TypeScript.
Implement smart/dumb component pattern.
Place components in feature-based directories.
Use compound components for complex UIs.
Follow atomic design principles.
Use React Query for server state and API calls.
Use Context for shared state.
Implement state machines for complex flows.
Use local state for UI-only state.
Follow unidirectional data flow.
Use strict TypeScript configuration.
Define interfaces for all props.
Use discriminated unions for state.
Leverage type inference.
Use Radix UI for accessible components.
Implement proper ARIA attributes.
Follow consistent styling patterns.
Use composition over inheritance.
Keep components small and focused.
Use React Hook Form for forms.
Implement Zod for validation.
Handle form submission states.
Show validation feedback.
Use controlled inputs when needed.
Implement proper loading states for data fetching.
Handle error states gracefully.
Cache responses appropriately.
Type API responses.
Use error boundaries.
Implement fallback UI.
Handle async errors.
Show user-friendly error messages.
Log errors appropriately.
Use React.memo wisely.
Implement proper code splitting.
Use lazy loading for routes.
Optimize re-renders.
Profile performance regularly.
Write unit tests for components.
Use React Testing Library.
Mock external dependencies in tests.
Maintain good test coverage.
Follow feature-based organization.
Use index files for exports.
Keep related files together.
Use consistent naming.
Implement barrel exports.
Use Tailwind CSS for styling.
Follow utility-first approach for styling.
Use CSS variables for theming.
Keep styles maintainable.
Use CSS modules when needed.
Document complex logic.
Write clear component documentation.
Keep documentation up to date.
Use JSDoc when helpful.
Follow ESLint rules.
Use consistent formatting.
Write clear variable names.
Keep functions pure.
Use meaningful types.
Validate user input.
Implement proper authentication.
Handle sensitive data carefully.
Follow security best practices.
Use HTTPS for API calls.
Follow WCAG guidelines for accessibility.
Use semantic HTML.
Test with screen readers.
Ensure keyboard navigation.
Provide proper focus management.
apps/backoffice-v2/src/lib/blocks/components/EditableDetails/types.tsapps/backoffice-v2/src/lib/blocks/components/EditableDetails/EditableDetails.tsxapps/backoffice-v2/src/pages/Entity/hooks/useEntityLogic/utils.ts
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Analyze (javascript)
- GitHub Check: build (ubuntu-latest)
- GitHub Check: lint
- GitHub Check: test_linux
🔇 Additional comments (6)
apps/backoffice-v2/src/lib/blocks/components/EditableDetails/types.ts (1)
6-6: LGTM! Clean type extension.The optional
hiddenproperty addition is well-designed and maintains backward compatibility while enabling the dropdown filtering functionality.apps/backoffice-v2/src/pages/Entity/hooks/useEntityLogic/utils.ts (3)
1-1: Good cleanup of unused imports.Removing the unused
AnyArrayimport keeps the code clean and follows good maintenance practices.
33-33: Clean destructuring addition.Adding
hiddenInto the destructuring follows the existing pattern and maintains code consistency.
54-54: Correct implementation of hidden property logic.The boolean conversion
hiddenIn === 'backoffice'correctly maps the schema property to the dropdown option's hidden state, enabling proper filtering in the UI.apps/backoffice-v2/src/lib/blocks/components/EditableDetails/EditableDetails.tsx (2)
396-396: Clean destructuring pattern for hidden property.The destructuring follows existing patterns and maintains code consistency.
404-404: Correct implementation of conditional rendering.The early return pattern for hidden options is the right approach for conditional rendering in React and efficiently prevents hidden options from being rendered.
Summary by CodeRabbit
New Features
Refactor