Repository navigation
refactor: replace custom Table component with markdown tables and improve test accessibility - #83
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for derekw ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
wghglory
left a comment
There was a problem hiding this comment.
Code Review Summary
Reviewed all changes in this PR. The refactoring is well-executed and follows best practices.
✅ Positive Changes
-
Table Component Removal: Successfully removed custom Table component in favor of standard markdown tables, which is more maintainable and follows standard practices.
-
ESLint Configuration: Properly excludes e2e Playwright tests from testing-library rules, preventing false positives.
-
E2E Test Improvements: Excellent migration to semantic selectors using
getByRole(), which improves:- Accessibility testing
- Test maintainability
- Alignment with Playwright best practices
-
Content Updates: All markdown tables are properly formatted and maintain readability.
-
Test Simplification: Removed brittle text assertions in unit tests, making them more maintainable.
Code Quality
- No linting errors
- No type safety issues
- Proper code organization
- Good test coverage maintained
No Issues Found
All changes follow project standards and best practices. Ready to merge! 🚀
Summary
This PR refactors the codebase to use standard markdown table syntax instead of a custom React Table component, improves test accessibility by using semantic selectors, and updates ESLint configuration to properly handle e2e tests.
Changes
Core Changes
components/share/MdxComponents/Table.tsx)Content Updates
angular-component.mdxangular-form.mdxangular-pipe.mdxangular-service.mdxangular-structural-directive.mdxTest Improvements
E2E tests (
e2e/home.spec.ts):locator()calls with semanticgetByRole()selectorsUnit tests (
components/hero/HeroSection.test.tsx):Configuration Updates
eslint.config.mjs):ignores: ['e2e/**']to testing-library rulesDocumentation
docs/markdown-tables-support.md:Breaking Changes
None. This is a refactoring that maintains the same visual output while using standard markdown syntax.
Testing Instructions
Verify markdown tables render correctly:
Run test suites:
npm test npm run test:e2eCheck linting:
Code Review Notes
Files Changed
.cursor/rules/post.mdc- Updated table generation rulescomponents/share/MdxComponents/Table.tsx- Deletedcomponents/share/MdxComponents/index.tsx- Removed Table exportcomponents/hero/HeroSection.test.tsx- Simplified assertionscontent/posts/*.mdx- Updated 5 posts to use markdown tablesdocs/markdown-tables-support.md- Updated documentatione2e/home.spec.ts- Improved accessibility selectorseslint.config.mjs- Added e2e test exclusion