Skip to content

Conversation

@lanzhenw
Copy link
Contributor

@lanzhenw lanzhenw commented Oct 17, 2025

What changes are proposed in this pull request?

Fixes a regression: cannot save colorscheme to dataset.app_config.colorscheme in the APP due to a missing import

Currently:

Screen.Recording.2025-10-16.at.11.11.27.PM.mov

Looks like an import has been removed by mistake.

How is this patch tested? If it is not, please explain why.

locally

Release Notes

Is this a user-facing change that should be mentioned in the release notes?

Fixes a bug that cannot save colorscheme as a dataset default in the UI

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release
    notes for FiftyOne users.

Fixes a regression: cannot save colorscheme to dataset.app_config.colorscheme in the APP due to a missing import

What areas of FiftyOne does this PR affect?

  • App: FiftyOne application changes
  • Build: Build and test infrastructure changes
  • Core: Core fiftyone Python library changes
  • Documentation: FiftyOne documentation changes
  • Other

Summary by CodeRabbit

  • Refactor
    • Improved internal state management for the color modal component to ensure proper cleanup of selection state when saving.

@lanzhenw lanzhenw self-assigned this Oct 17, 2025
@lanzhenw lanzhenw requested a review from a team as a code owner October 17, 2025 04:24
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Walkthrough

A Recoil state setter is added to the ColorFooter component to explicitly reset the active color modal field to null when the save action is triggered, enabling more direct state management of the modal's active entry.

Changes

Cohort / File(s) Summary
Color Modal State Management
app/packages/core/src/components/ColorModal/ColorFooter.tsx
Introduces useSetRecoilState hook to create a setter for activeColorEntry; uses setter to reset field to null on save action

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Colors saved with gentle care,
State resets float through the air,
Recoil whispers, null takes flight,
Modal fields shine fresh and bright!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed The pull request description comprehensively follows the required template structure with all mandatory sections completed. The "What changes are proposed" section clearly explains the regression and missing import issue. The "How is this patch tested" section provides testing information (locally). The Release Notes section is fully addressed with the user-facing change checkbox marked and relevant description provided, plus the affected area (App) is properly selected. The description is directly on-topic and provides sufficient context for understanding the fix.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title "bugfix: cannot save colorscheme as default due to missing import" directly describes the issue being fixed in this PR. According to the objectives, this PR addresses a regression where saving a colorscheme as a dataset default was broken, and the fix involves adding the missing useSetRecoilState import from recoil to the ColorFooter component. The title is concise, specific, and clearly communicates both the user-facing symptom (cannot save colorscheme) and the technical root cause (missing import), making it immediately clear to reviewers scanning the history what this change addresses.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/cannot_save_default_colorscheme

Comment @coderabbitai help to get the list of available commands and usage tips.

@lanzhenw lanzhenw changed the title cannot save colorscheme as default due to missing import bugfix: cannot save colorscheme as default due to missing import Oct 17, 2025
@lanzhenw lanzhenw added bug Bug fixes app Issues related to App features labels Oct 17, 2025
@lanzhenw lanzhenw changed the base branch from develop to release/v1.9.0 October 17, 2025 04:31
@lanzhenw lanzhenw changed the base branch from release/v1.9.0 to develop October 17, 2025 04:37
@lanzhenw lanzhenw merged commit 848a69c into develop Oct 17, 2025
14 checks passed
@lanzhenw lanzhenw deleted the bugfix/cannot_save_default_colorscheme branch October 17, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Issues related to App features bug Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants