Skip to content

Core: Update change detection terminology from "affected" to "related"#34652

Merged
ghengeveld merged 4 commits into
nextfrom
rename-affected-related
Apr 30, 2026
Merged

Core: Update change detection terminology from "affected" to "related"#34652
ghengeveld merged 4 commits into
nextfrom
rename-affected-related

Conversation

@ghengeveld
Copy link
Copy Markdown
Member

@ghengeveld ghengeveld commented Apr 29, 2026

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.

Screenshot 2026-04-30 at 22 55 14

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end 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

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make 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/core team 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

    • Updated change-detection docs and the statuses URL-parameter table to use "Related" instead of "Affected".
  • Features

    • Sidebar filters, labels, and stories now show "Related" in place of "Affected".
    • URL parameters treat "related" as canonical while still accepting the legacy "affected" for backward compatibility.
    • Simplified the non-direct status icon visuals.
  • Tests

    • Test coverage updated for canonical naming, serialization, parsing, and backward compatibility.

@ghengeveld ghengeveld self-assigned this Apr 29, 2026
@ghengeveld ghengeveld added cleanup Minor cleanup style change that won't show up in release changelog ci:normal labels Apr 29, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 278fad7b-07e0-42d1-af9c-871d32f5aa1a

📥 Commits

Reviewing files that changed from the base of the PR and between ed0c340 and b3365cf.

📒 Files selected for processing (1)
  • code/core/src/manager/components/sidebar/IconSymbols.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • code/core/src/manager/components/sidebar/IconSymbols.tsx

📝 Walkthrough

Walkthrough

Terminology 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 related is canonical while affected is still accepted and mapped to the same status value.

Changes

Cohort / File(s) Summary
Tests
code/core/src/manager-api/tests/statuses.test.ts, code/core/src/manager-api/tests/stories.test.ts
Parse/serialize tests updated to treat related as canonical; added backward-compatibility assertions that affected is accepted and maps to status-value:affected.
Stories / UI examples
code/core/src/manager/components/sidebar/Filter.stories.tsx, code/core/src/manager/components/sidebar/FilterPanel.stories.tsx, code/core/src/manager/components/sidebar/Sidebar.stories.tsx, code/core/src/manager/components/sidebar/Tree.stories.tsx
Story exports and visible labels/descriptions renamed from "Affected" → "Related"; underlying status-value:affected kept.
Sidebar component
code/core/src/manager/components/sidebar/FilterPanel.tsx
Rendering maps entries with entry.shortName === 'affected' to use related for id/title; inclusion/exclusion logic remains based on entry.statusValue.
Status-store mapping
code/core/src/shared/status-store/index.ts
toStatusValue now maps 'related''status-value:affected'; statusValueShortName returns 'related' for 'status-value:affected' (bidirectional aliasing).
Icon
code/core/src/manager/components/sidebar/IconSymbols.tsx
Simplified affected icon: removed stroked arc paths and a small center circle, replaced with a single larger center circle.
Docs
docs/api/main-config/main-config-features.mdx, docs/configure/user-interface/change-detection.mdx, docs/configure/user-interface/features-and-behavior.mdx
Replaced "affected" with "related" in descriptions, examples, and the statuses query-parameter table; preserved exclusion (!) semantics.

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
  • Create stacked PR
  • Commit on current branch

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
code/core/src/manager/components/sidebar/FilterPanel.tsx (1)

87-87: Consider removing duplicated short-name normalization.

useStatusFilterEntries already normalizes status-value:affected to related, 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

📥 Commits

Reviewing files that changed from the base of the PR and between d561c88 and 35de8e7.

📒 Files selected for processing (11)
  • code/core/src/manager-api/tests/statuses.test.ts
  • code/core/src/manager-api/tests/stories.test.ts
  • code/core/src/manager/components/sidebar/Filter.stories.tsx
  • code/core/src/manager/components/sidebar/FilterPanel.stories.tsx
  • code/core/src/manager/components/sidebar/FilterPanel.tsx
  • code/core/src/manager/components/sidebar/Sidebar.stories.tsx
  • code/core/src/manager/components/sidebar/Tree.stories.tsx
  • code/core/src/shared/status-store/index.ts
  • docs/api/main-config/main-config-features.mdx
  • docs/configure/user-interface/change-detection.mdx
  • docs/configure/user-interface/features-and-behavior.mdx

@storybook-app-bot
Copy link
Copy Markdown

storybook-app-bot Bot commented Apr 29, 2026

Package Benchmarks

Commit: b3365cf, ran on 30 April 2026 at 21:04:52 UTC

The following packages have significant changes to their size or dependencies:

storybook

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

@ghengeveld ghengeveld merged commit 0457c86 into next Apr 30, 2026
123 of 125 checks passed
@ghengeveld ghengeveld deleted the rename-affected-related branch April 30, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:normal cleanup Minor cleanup style change that won't show up in release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants