Frontend for Calendar Filter
A frontend application for managing and filtering calendar events using FullCalendar.
Usage
-
Clone the repository:
git clone https://git.ldlda.com/lda/cal_filter_fe.git -
Install dependencies:
npm install -
Start the development server:
npm run dev
Features
- FullCalendar integration for event visualization.
- UI for managing event sources and applying filters.
- Responsive design with Bootstrap.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
ass pull
Got it! Let’s create a long-term plan to improve your project. The goal is to make it feature-rich, maintainable, and user-friendly while leveraging FullCalendar’s capabilities and your existing backend.
Long-Term Plan
1. Frontend Filtering
Move filtering logic (date, regex, etc.) to the frontend using FullCalendar’s getEvents() and eventDataTransform.
Steps:
- Use
getEvents()to retrieve all events from the calendar. - Apply filters (date range, regex, etc.) directly on the frontend.
- Add a UI for users to specify filters (e.g., date pickers, regex input).
- Use
eventDataTransformto preprocess events when they are fetched.
2. Loading State
Replace the current placeholder/spinner logic with FullCalendar’s built-in loading callback.
Steps:
- Use the
loadingcallback to show/hide a spinner or loading message. - Remove manual spinner logic from your code.
3. List of Event Sources
Display a list of all added event sources and allow users to:
- Remove sources.
- Refetch events from a source.
- Toggle visibility of events from a source.
Steps:
- Use
getEventSources()to retrieve all sources. - Display them in a list with controls (e.g., remove, refetch, toggle).
- Use
EventSource::remove()andEventSource::refetch()for interactivity.
4. Improve CORS Handling
If the backend is only for bypassing Google Calendar’s CORS issues, consider:
- Adding a proxy endpoint for other calendar services.
- Allowing users to directly fetch events from public calendars without needing the backend.
5. Modularize Calendar Configuration
Centralize FullCalendar configuration into a reusable function or object.
Steps:
- Create a
getCalendarConfig()function that returns the calendar configuration. - Pass dynamic options (e.g., theme, initial view) as arguments.
6. Add Advanced Features
Enhance the app with the following features:
- Event Editing: Allow users to edit event details (e.g., title, date).
- Event Creation: Add a form to create new events.
- Export Events: Allow users to export filtered events as
.icsfiles.
7. Improve UI/UX
Make the app more user-friendly:
- Add tooltips for buttons and inputs.
- Improve responsiveness for mobile devices.
- Add a dark mode toggle.
8. Clean Up CSS
- Remove hacky CSS rules (e.g.,
padding-bottom: 1emfor#calendar). - Use consistent spacing and alignment.
- Add comments to explain key styles.
9. Testing
Add automated tests for:
- Filtering logic.
- Event source management.
- UI interactions.
Implementation Plan
Phase 1: Frontend Filtering
- Add a filter UI (date pickers, regex input).
- Use
getEvents()to retrieve events and apply filters. - Update the calendar dynamically based on the filtered events.
Phase 2: Loading State
- Replace manual spinner logic with FullCalendar’s
loadingcallback. - Test loading behavior with multiple event sources.
Phase 3: Event Source Management
- Use
getEventSources()to display a list of sources. - Add controls for removing, refetching, and toggling sources.
Phase 4: Advanced Features
- Add event editing and creation forms.
- Implement event export functionality.
Phase 5: UI/UX Improvements
- Add tooltips and improve responsiveness.
- Implement dark mode.
Phase 6: Cleanup and Testing
- Refactor CSS and JavaScript for maintainability.
- Add automated tests.
Next Steps
Let me know which phase you’d like to start with, and I’ll help you implement it step by step!