A modern, feature-rich table custom field extension for Contentstack marketplace apps. This React-based application provides an intuitive table editing interface that integrates seamlessly with Contentstack's content management system.
- Interactive Table Editor: Full-featured table with row/column operations
- Drag & Drop: Reorder rows and columns with drag and drop
- CSV Import/Export: Import data from CSV files and export table data
- Search & Sort: Search through table data and sort columns
- Header Rows/Columns: Toggle header styling for rows and columns
- Full Screen Mode: Expand table to full screen for better editing
- Accessibility: Full keyboard navigation support
- TypeScript: Fully typed for better development experience
- Testing: Comprehensive test suite with Playwright for E2E testing
- Modern UI: Clean, professional interface using Contentstack's Venus components
- Node.js (v20 or higher)
- npm
- Contentstack account (for marketplace deployment)
# Clone the repository
git clone https://github.com/contentstack/marketplace-table-app.git
cd marketplace-table-app
# Install dependencies
npm install# Start development server
npm start
# Run linting
npm run lint
# Format code
npm run format
# Run unit tests
npm test
# Run E2E tests
npm run test:chrome
npm run test:firefox
npm run test:safari
# Run E2E tests in headed mode
npm run test:chrome-headed# Build the application
npm run build
marketplace-table-app/
βββ src/
β βββ assets/ # SVG icons and static assets
β βββ common/
β β βββ locale/ # Internationalization strings
β β βββ ui/ # Shared UI components
β β βββ utils/ # Utility functions
β βββ components/ # Reusable React components
β β βββ csvImport/ # CSV import dialog
β β βββ ErrorBoundary/ # Error boundary component
β β βββ Home/ # Home page component
β β βββ PageLayout/ # Page layout component
β βββ hooks/ # Custom React hooks
β β βββ useAnalytics.tsx # Analytics tracking hook
β β βββ useAppSdk.ts # Contentstack App SDK hook
β β βββ useJsErrorTracker.tsx # Error tracking hook
β βββ pages/
β β βββ FieldExtension/ # Table field extension
β β βββ cell.tsx # Table cell component
β β βββ header.tsx # Table header component
β β βββ store.tsx # Table state management
β β βββ table.tsx # Main table component
β β βββ fullScreenPage.tsx # Full screen modal
β βββ routes/
β β βββ App/ # Main app router
β βββ styles/ # Global styles
β βββ main.tsx # Application entry point
β βββ vite-env.d.ts # Vite type definitions
βββ tests/
β βββ e2e/ # End-to-end tests
β βββ pages/ # Page objects
β βββ test-spec/ # Test specifications
β βββ utils/ # Test utilities
βββ .husky/ # Git hooks
βββ index.html # HTML entry point
βββ vite.config.ts # Vite configuration
βββ tsconfig.json # TypeScript configuration
βββ playwright.config.ts # Playwright configuration
βββ package.json # Dependencies and scripts
This project includes comprehensive testing:
npm test # Run unit tests
npm run test:watch # Run tests in watch modenpm run test:chrome # Run E2E tests in Chrome
npm run test:firefox # Run E2E tests in Firefox
npm run test:safari # Run E2E tests in Safari
npm run show-report # Show test reportnpm run lint # Run ESLint
npm run lint:check # Check linting issues
npm run format # Format code with Prettier
npm run format:check # Check formatting
npm run typecheck # TypeScript type checkingThe app configuration is defined in update-app-info.json:
{
"name": "Table",
"target_type": "stack",
"ui_location": {
"locations": [
{
"type": "cs.cm.stack.custom_field",
"meta": [
{
"signed": true,
"path": "/field-extension",
"data_type": "json"
}
]
}
]
}
}- Create feature branch from
main - Implement your changes
- Add tests for new functionality
- Update documentation
- Submit pull request
This project uses:
- ESLint for code linting
- Prettier for code formatting
- Husky for git hooks
- lint-staged for pre-commit checks
This project follows Conventional Commits:
feat: add new table feature
fix: resolve table rendering issue
docs: update README with new features
test: add unit tests for cell component
refactor: improve table state management
- Build the application:
npm run build - Package the
builddirectory - Upload to Contentstack marketplace
- Install in your Contentstack stack
For local development with Contentstack:
- npm install
- Run
npm startfor development server
We welcome contributions!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Install dependencies
npm install
# Start development
npm startThis project is licensed under the MIT License - see the LICENSE file for details.
- Contentstack for the marketplace platform
- Table App Documentation for the table functionality
- Vite for the build tool
- Issues: GitHub Issues
- Documentation: Contentstack Developer Hub
- Community: Contentstack Community
Made with β€οΈ by the Contentstack team