feat: add custom colors and thresholds for CountryMap plugin
SUMMARY
Add a JSON-based customisation block that allows to override linearColorScheme colors and thresholds.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
A new setting is available is "Chart Options" panel
TESTING INSTRUCTIONS
- Cut sample rules in "Custom Color Scale": the overrided configuration is removed, resulting in the original linear Color Scheme to apply.
- Edit sample values to update colors and thresholds, or add/remove thresholds: the new configuration should apply.
ADDITIONAL INFORMATION
- [x] Has associated issue: mentioned in https://github.com/apache/superset/discussions/34427
- [ ] Required feature flags:
- [x] Changes UI: new setting added, modal for editing
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
Code Review Agent Run #3fbf4f
Actionable Suggestions - 0
Review Details
-
Files reviewed - 4 · Commit Range:
58885b0..58885b0- superset-frontend/plugins/legacy-plugin-chart-country-map/src/CountryMap.js
- superset-frontend/plugins/legacy-plugin-chart-country-map/src/ReactCountryMap.jsx
- superset-frontend/plugins/legacy-plugin-chart-country-map/src/controlPanel.ts
- superset-frontend/plugins/legacy-plugin-chart-country-map/src/transformProps.js
-
Files skipped - 0
-
Tools
- Eslint (Linter) - ✔︎ Successful
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].
Documentation & Help
Latest commit fixes an unwanted interpolation issue that would create scales between custom-defined steps (while we want ranges with the same color instead).
Hi, Latest commit fixes an unwanted behaviour, which would interpolate colors between the custom defined steps. Also removed a feature that added default colors to zones without data - which should remain white and blank. And a small french typo. Thank you
Looks like pre-commit might clear up some of the CI issues.
Thank you @rusackas i installed and setup pre-commit for the project, and should update the PR in the beginning of the week
Hello @rusackas, I see that there are ongoing updates (https://github.com/apache/superset/commit/67cf287c033cd88c59695bb4337478a36dcb1a27) on the country map plugin with the rc4 release, and wonder what would be the best way to integrate this in the upcoming 6.0.0 release: I am wondering whether I should keep updating this PR, or rather create on a new one on rc4 base code? (latest seems easier than reconcialiating changes, especially after latest UI additions)
CodeAnt AI is reviewing your PR.
CodeAnt AI finished reviewing your PR.
💡 Enhance Your PR Reviews
We noticed that 3 feature(s) are not configured for this repository. Enabling these features can help improve your code quality and workflow:
🚦 Quality Gates
Status: Quality Gates are not enabled at the organization level Learn more about Quality Gates
🎫 Jira Ticket Compliance
Status: Jira credentials file not found. Please configure Jira integration in your settings Learn more about Jira Integration
⚙️ Custom Rules
Status: No custom rules configured. Add rules via organization settings or .codeant/review.json in your repository Learn more about Custom Rules
Want to enable these features? Contact your organization admin or check our documentation for setup instructions.
Hi, I've converted this PR to draft to handle master changes merge and produce a more readable PR.
Hi, The changes have been reintegrated for a cleaner integration based on rc4 master, and proposed in a new PR: https://github.com/apache/superset/pull/36732