feat(weather-editor): expand inheritance, add indicators#2322
Conversation
…e across full weather widget.
|
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 (2)
📝 WalkthroughWalkthroughWeatherWidget inheritance handling was centralized: new Push/Pop style helpers mark inherited controls, UI panels derive inherited state from flags and clear flags on user edits, and SyncInheritedValuesFromParent()/PropagateToChildren() enable copying from parent and cascading updates to descendants. ChangesWeather Inheritance System Refactoring
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 OpenGrep (1.20.0)OpenGrep fatal error (exit code 2): [00.20][ERROR]: Error: exception Unix_error: No such file or directory stat src/WeatherEditor/Weather/WeatherWidget.h Comment |
|
No actionable suggestions for changed features. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/WeatherEditor/Weather/WeatherWidget.cpp (1)
1-1: PR metadata: consider adding issue-link keywords in the description.Since this PR includes both feature work and bug fixes, adding
Fixes #.../Addresses #...improves traceability and release notes.As per coding guidelines, "Issue References (if PR fixes bugs or implements features): Suggest adding appropriate GitHub keywords."
🤖 Prompt for 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. In `@src/WeatherEditor/Weather/WeatherWidget.cpp` at line 1, The PR needs issue-link keywords added to its description for traceability: edit the PR description to include GitHub keywords like "Fixes #<issue-number>" or "Addresses #<issue-number>" for the bug fixes/features implemented (e.g., reference the WeatherWidget work) and ensure each affected issue number is listed; if multiple issues are covered, add separate keywords for each and keep the description concise so release notes can automatically pick them up.
🤖 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 `@src/WeatherEditor/Weather/WeatherWidget.cpp`:
- Around line 1363-1452: SyncInheritedValuesFromParent/PropagateToChildren can
recurse indefinitely on cyclic parent chains (A→B→A); add a cycle guard by
tracking visited widget IDs (or a recursion depth counter) when propagating so a
child only processes propagation if its parent chain does not contain its own
GetEditorID(), and stop propagation if a cycle is detected; implement this in
PropagateToChildren (and optionally pass a visited set into
SyncInheritedValuesFromParent/ApplyChanges) using settings.parent to walk
parents and EditorWindow::GetSingleton()->weatherWidgets/GetEditorID() to
resolve IDs, and ensure ApplyChanges no longer blindly re-invokes
PropagateToChildren when a cycle was detected.
---
Nitpick comments:
In `@src/WeatherEditor/Weather/WeatherWidget.cpp`:
- Line 1: The PR needs issue-link keywords added to its description for
traceability: edit the PR description to include GitHub keywords like "Fixes
#<issue-number>" or "Addresses #<issue-number>" for the bug fixes/features
implemented (e.g., reference the WeatherWidget work) and ensure each affected
issue number is listed; if multiple issues are covered, add separate keywords
for each and keep the description concise so release notes can automatically
pick them up.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
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 Plus
Run ID: 9d314876-7fb5-4509-a5cb-72537065ab03
📒 Files selected for processing (4)
src/WeatherEditor/Weather/WeatherWidget.cppsrc/WeatherEditor/Weather/WeatherWidget.hsrc/WeatherEditor/WeatherUtils.cppsrc/WeatherEditor/WeatherUtils.h
|
✅ A pre-release build is available for this PR: |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. An unexpected error occurred while generating fixes: Not Found - https://docs.github.com/rest/git/refs#get-a-reference |
|
@coderabbitai the autofix was an accident, don't continue |
|
Tip For best results, initiate chat on the files or code changes.
|
Summary by CodeRabbit
Refactor
New Features
Bug Fixes
Style