feat: add default showed categories#384
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughBackend database and API layers now return category default selections. The frontend parses these into ChangesDefault-checked categories support
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Backend
participant CategoriesAPI
participant HttpService
participant FiltersForm
participant CategoriesProvider
participant Markers
participant LocationsAPI
Backend->>CategoriesAPI: Provide categories_default_checked
CategoriesAPI->>HttpService: Return default_checked per category
HttpService->>FiltersForm: Return categories and defaultChecked
FiltersForm->>CategoriesProvider: Initialize selected filters
Markers->>LocationsAPI: Fetch filtered locations after initialization
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 94-96: Specify the JSON language identifier on the fenced code
block containing the accessible_by example by changing its opening fence to
json. Preserve the example content and closing fence.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 69c26e0d-ea17-4404-91b2-2b5c6632b77e
📒 Files selected for processing (5)
README.mddocs/quickstart.rste2e-tests/e2e_test_data_initial.jsone2e-tests/tests/basic/test_left_panel.pyexamples/e2e_test_data.json
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/src/components/FiltersForm/FiltersForm.jsx`:
- Around line 187-195: Update the category-loading flow in FiltersForm so a
rejected getCategoriesData request does not set initialization complete. Catch
the request error, establish the component’s explicit fallback or retry state,
and only call setIsInitialized(true) after categories data has been loaded
successfully; keep loader cleanup in the failure path without allowing location
fetching with uninitialized filters.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3c405ee5-3f6a-41c6-b326-7dccabb836ca
📒 Files selected for processing (8)
frontend/src/components/Categories/CategoriesContext.jsxfrontend/src/components/FiltersForm/FiltersForm.jsxfrontend/src/components/Map/components/Markers.jsxfrontend/src/services/http/httpService.jsfrontend/tests/FiltersForm.test.jsxfrontend/tests/Map/MapComponent.test.jsxgoodmap/core_api.pytests/unit_tests/test_core_api.py
🚧 Files skipped from review as they are similar to previous changes (4)
- frontend/src/services/http/httpService.js
- frontend/tests/FiltersForm.test.jsx
- tests/unit_tests/test_core_api.py
- goodmap/core_api.py
|



Summary by CodeRabbit
default_checkeddata to drive the initial filter state.categories_default_checked, including related help/options configuration and examples.