-
Notifications
You must be signed in to change notification settings - Fork 2
Ba 2270 clickable profile in comments #224
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
Ba 2270 clickable profile in comments #224
Conversation
|
WalkthroughThis pull request updates the Changes
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
packages/components/cypress/support/types.tsOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /packages/components/.eslintrc.js
packages/components/modules/comments/web/Comments/__tests__/Comments.cy.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /packages/components/.eslintrc.js
packages/components/cypress/support/commands.tsOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /packages/components/.eslintrc.js
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (5)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (6)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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: 2
🧹 Nitpick comments (1)
packages/components/modules/comments/web/CommentItem/index.tsx (1)
39-39: Consider making the default profile path configurable.While '/profile' is a reasonable default, consider making it configurable through environment variables or constants for better maintainability.
- profilePath = '/profile', + profilePath = process.env.NEXT_PUBLIC_PROFILE_PATH || '/profile',Also applies to: 46-46
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
packages/components/modules/comments/web/CommentItem/index.tsx(4 hunks)packages/components/modules/comments/web/CommentItem/types.ts(1 hunks)packages/components/package.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
packages/components/modules/comments/web/CommentItem/types.ts (1)
37-37: LGTM! Well-structured interface extension.The optional
profilePathprop is correctly typed and maintains backward compatibility.packages/components/modules/comments/web/CommentItem/index.tsx (1)
5-9: LGTM! Appropriate imports for navigation.The imports align well with the feature requirements, using Next.js built-in components for client-side navigation.
packages/components/package.json (1)
69-100: LGTM! Explicit version pinning improves reproducibility.Moving from catalog references to specific versions helps ensure consistent builds across environments.
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
🧹 Nitpick comments (1)
packages/components/modules/comments/web/Comments/__tests__/Comments.cy.tsx (1)
32-42: Standardize test setup pattern across all test cases.The test setup pattern varies across test cases. Consider extracting the common setup into a beforeEach hook or helper function for consistency.
Example refactor:
describe('Comments', () => { const setupTest = () => { const { environment, resolveMostRecentOperation } = createTestEnvironment() return cy.mockNextRouter() .then((router) => { cy.mount( <AppRouterContext.Provider value={router}> <CommentsForTesting environment={environment} /> </AppRouterContext.Provider>, ) return { environment, resolveMostRecentOperation } }) } it('should render comments...', () => { setupTest().then(({ resolveMostRecentOperation }) => { resolveMostRecentOperation({ mockResolvers: commentsResolver }) // rest of the test }) }) })Also applies to: 190-200, 244-254
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
packages/components/cypress/support/commands.ts(2 hunks)packages/components/cypress/support/types.ts(1 hunks)packages/components/modules/comments/web/CommentItem/index.tsx(4 hunks)packages/components/modules/comments/web/Comments/__tests__/Comments.cy.tsx(4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/components/modules/comments/web/CommentItem/index.tsx
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Build and Lint Packages
- GitHub Check: Component Test Packages
🔇 Additional comments (3)
packages/components/cypress/support/types.ts (1)
1-9: LGTM! Well-structured type definition for router mocking.The
RouterChainabletype correctly defines all necessary router methods and properties needed for mocking the Next.js router in Cypress tests.packages/components/cypress/support/commands.ts (2)
47-60: LGTM! Well-implemented router mocking command.The command thoroughly stubs all router methods with proper aliasing for test assertions and returns a correctly typed mock router object.
62-68: LGTM! Proper type declaration for the custom command.The global type declaration ensures TypeScript support for the new command.
packages/components/modules/comments/web/Comments/__tests__/Comments.cy.tsx
Show resolved
Hide resolved
6e43ea0 to
67817d2
Compare
|
* BA-2270: clickable profile



Acceptance Criteria
As a user, I would like to be able to click on users's profile photo and name in the comments so I can be redirected to their profile.
Users should be able to click on a user's avatar and name in the comments and comment thread and be redirected to the user-they-clicked-on's profile page in the same window/tab
Summary by CodeRabbit
New Features
Chores
Tests