Core: Update change detection terminology from "affected" to "related"#34652
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughTerminology for the change-detection non-direct status was changed from "affected" to "related"; parsing, serialization, status-store mappings, stories, docs, and icon markup were updated so Changes
Sequence Diagram(s)(Skipped — changes are renaming/aliasing, tests, stories, docs, and small mapping updates; no new multi-component control flow requiring visualization.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
code/core/src/manager/components/sidebar/FilterPanel.tsx (1)
87-87: Consider removing duplicated short-name normalization.
useStatusFilterEntriesalready normalizesstatus-value:affectedtorelated, so this local remap can be simplified to keep one source of truth.♻️ Optional simplification
- const shortName = entry.shortName === 'affected' ? 'related' : entry.shortName; + const shortName = entry.shortName;Also applies to: 94-97
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@code/core/src/manager/components/sidebar/FilterPanel.tsx` at line 87, The local normalization in FilterPanel (the line setting const shortName = entry.shortName === 'affected' ? 'related' : entry.shortName and the similar mapping at the later block) duplicates logic already handled by useStatusFilterEntries; remove the local remapping and use entry.shortName directly so the source-of-truth stays in useStatusFilterEntries, updating any references in FilterPanel that expect 'related' to rely on the hook-provided values (verify places where shortName was used and remove the conditional remap).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@code/core/src/manager/components/sidebar/FilterPanel.tsx`:
- Line 87: The local normalization in FilterPanel (the line setting const
shortName = entry.shortName === 'affected' ? 'related' : entry.shortName and the
similar mapping at the later block) duplicates logic already handled by
useStatusFilterEntries; remove the local remapping and use entry.shortName
directly so the source-of-truth stays in useStatusFilterEntries, updating any
references in FilterPanel that expect 'related' to rely on the hook-provided
values (verify places where shortName was used and remove the conditional
remap).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6a038e37-ebc1-40f6-8e18-722c728e34af
📒 Files selected for processing (11)
code/core/src/manager-api/tests/statuses.test.tscode/core/src/manager-api/tests/stories.test.tscode/core/src/manager/components/sidebar/Filter.stories.tsxcode/core/src/manager/components/sidebar/FilterPanel.stories.tsxcode/core/src/manager/components/sidebar/FilterPanel.tsxcode/core/src/manager/components/sidebar/Sidebar.stories.tsxcode/core/src/manager/components/sidebar/Tree.stories.tsxcode/core/src/shared/status-store/index.tsdocs/api/main-config/main-config-features.mdxdocs/configure/user-interface/change-detection.mdxdocs/configure/user-interface/features-and-behavior.mdx
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 50 | 50 | 0 |
| Self size | 20.58 MB | 20.54 MB | 🎉 -45 KB 🎉 |
| Dependency size | 16.56 MB | 16.56 MB | 🎉 -132 B 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/cli
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 184 | 184 | 0 |
| Self size | 836 KB | 782 KB | 🎉 -54 KB 🎉 |
| Dependency size | 68.26 MB | 68.21 MB | 🎉 -53 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/codemod
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 177 | 177 | 0 |
| Self size | 32 KB | 32 KB | 🎉 -36 B 🎉 |
| Dependency size | 66.78 MB | 66.74 MB | 🎉 -45 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
create-storybook
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 51 | 51 | 0 |
| Self size | 1.05 MB | 1.04 MB | 🎉 -7 KB 🎉 |
| Dependency size | 37.14 MB | 37.10 MB | 🎉 -45 KB 🎉 |
| Bundle Size Analyzer | node | node |
@storybook/react-dom-shim
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 0 | 0 | 0 |
| Self size | 19 KB | 19 KB | 🎉 -272 B 🎉 |
| Dependency size | 1 KB | 791 B | 🎉 -312 B 🎉 |
| Bundle Size Analyzer | Link | Link |
What I did
Rewording of user-facing terminology to avoid inaccurate assumptions which may be inferred from the word "affected".
Updated the icon for "related" stories to match the one for "modified", for simplicity and to avoid confusion.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Caution
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>Summary by CodeRabbit
Documentation
Features
Tests