Skip to content

Fix Storybook follow-up cleanup and boolean attribute alignment#83

Open
vagxrth wants to merge 1 commit into
saiy2k:mainfrom
vagxrth:fix/storybook-followup-cleanup
Open

Fix Storybook follow-up cleanup and boolean attribute alignment#83
vagxrth wants to merge 1 commit into
saiy2k:mainfrom
vagxrth:fix/storybook-followup-cleanup

Conversation

@vagxrth

@vagxrth vagxrth commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR completes the focused Storybook follow-up cleanup for issue #57 without widening into unrelated refactors.

It cleans up Storybook testing taxonomy, removes repeated testing config, aligns boolean-attribute handling between Storybook and runtime behavior, and deduplicates shared no-data fixtures.

Closes #57.

What Changed

Shared Storybook cleanup

  • added a shared testing-parameters helper for Storybook test/a11y config
  • added shared dynamic-story tags and disabled Chromatic snapshots for dynamic stories
  • replaced repeated testing config across Follow, Profile, Profile Badge, Post, Zap, Livestream, and Like stories
  • replaced StoryObj<any> usages with StoryObj<typeof meta>

Boolean attribute alignment

  • extended Storybook parameter metadata with boolean handling modes
  • updated shared code generation to serialize boolean attributes correctly
  • updated shared dynamic-story behavior so it no longer writes "false" for presence-style booleans
  • preserved livestream’s explicit "false" semantics for:
    • show-participants
    • show-participant-count

Targeted runtime consistency fixes

  • nostr-profile now uses shared boolean parsing for:
    • show-npub
    • show-follow
  • nostr-post now uses shared boolean parsing for:
    • show-stats
  • nostr-follow-button now uses shared boolean parsing for:
    • show-avatar

Storybook taxonomy and story cleanup

  • normalized testing titles to use:
    • Component/Testing/Valid
    • Component/Testing/Invalid
    • Component/Testing/No Data
    • Component/Testing/Dynamic
    • Component/Testing/Dashboard
  • fixed the follow-button fast-switching story to update data-theme instead of theme
  • added missing dynamic-story tags
  • cleaned up small naming and import issues in stories
  • improved parameter description wording for current boolean controls

Shared no-data fixtures

  • extracted duplicated no-data values into a shared Storybook fixture module
  • updated profile, profile-badge, follow-button, and post no-data stories to use the shared fixtures

Verification

Ran:

  • npm test -- --run
  • npm run build-storybook

Results:

  • tests passed
  • Storybook build completed successfully

@coderabbitai

coderabbitai Bot commented Apr 20, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@vagxrth has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 31 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 15 minutes and 31 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fcf6c58d-6240-4016-ba93-222d8c86035c

📥 Commits

Reviewing files that changed from the base of the PR and between dfc22e5 and daa4165.

📒 Files selected for processing (72)
  • src/nostr-follow-button/nostr-follow-button.ts
  • src/nostr-post/nostr-post.ts
  • src/nostr-profile/nostr-profile.ts
  • stories/common/code-generator.ts
  • stories/common/comprehensive-dynamic.ts
  • stories/common/no-data.ts
  • stories/common/parameters.ts
  • stories/common/testing.ts
  • stories/common/utils.ts
  • stories/nostr-follow-button/NostrFollowButton.stories.tsx
  • stories/nostr-follow-button/NostrFollowButton.styling.stories.tsx
  • stories/nostr-follow-button/NostrFollowButton.testing.dashboard.stories.tsx
  • stories/nostr-follow-button/NostrFollowButton.testing.dynamic.stories.tsx
  • stories/nostr-follow-button/NostrFollowButton.testing.invalid.stories.tsx
  • stories/nostr-follow-button/NostrFollowButton.testing.no-data.stories.tsx
  • stories/nostr-follow-button/NostrFollowButton.testing.valid.stories.tsx
  • stories/nostr-follow-button/test-cases-no-data.ts
  • stories/nostr-follow-button/utils.ts
  • stories/nostr-like/NostrLike.stories.tsx
  • stories/nostr-like/NostrLike.styling.stories.tsx
  • stories/nostr-like/NostrLike.testing.dashboard.stories.tsx
  • stories/nostr-like/NostrLike.testing.dynamic.stories.tsx
  • stories/nostr-like/NostrLike.testing.invalid.stories.tsx
  • stories/nostr-like/NostrLike.testing.no-data.stories.tsx
  • stories/nostr-like/NostrLike.testing.valid.stories.tsx
  • stories/nostr-like/utils.ts
  • stories/nostr-livestream/NostrLivestream.stories.tsx
  • stories/nostr-livestream/NostrLivestream.styling.stories.tsx
  • stories/nostr-livestream/NostrLivestream.testing.dashboard.stories.tsx
  • stories/nostr-livestream/NostrLivestream.testing.dynamic.stories.tsx
  • stories/nostr-livestream/NostrLivestream.testing.invalid.stories.tsx
  • stories/nostr-livestream/NostrLivestream.testing.valid.stories.tsx
  • stories/nostr-livestream/parameters.ts
  • stories/nostr-livestream/utils.ts
  • stories/nostr-post/NostrPost.stories.tsx
  • stories/nostr-post/NostrPost.styling.stories.tsx
  • stories/nostr-post/NostrPost.testing.dashboard.stories.tsx
  • stories/nostr-post/NostrPost.testing.dynamic.stories.tsx
  • stories/nostr-post/NostrPost.testing.invalid.stories.tsx
  • stories/nostr-post/NostrPost.testing.no-data.stories.tsx
  • stories/nostr-post/NostrPost.testing.valid.stories.tsx
  • stories/nostr-post/parameters.ts
  • stories/nostr-post/test-cases-no-data.ts
  • stories/nostr-post/utils.ts
  • stories/nostr-profile-badge/NostrProfileBadge.stories.tsx
  • stories/nostr-profile-badge/NostrProfileBadge.styling.stories.tsx
  • stories/nostr-profile-badge/NostrProfileBadge.testing.dashboard.stories.tsx
  • stories/nostr-profile-badge/NostrProfileBadge.testing.dynamic.stories.tsx
  • stories/nostr-profile-badge/NostrProfileBadge.testing.invalid.stories.tsx
  • stories/nostr-profile-badge/NostrProfileBadge.testing.no-data.stories.tsx
  • stories/nostr-profile-badge/NostrProfileBadge.testing.valid.stories.tsx
  • stories/nostr-profile-badge/parameters.ts
  • stories/nostr-profile-badge/test-cases-no-data.ts
  • stories/nostr-profile-badge/utils.ts
  • stories/nostr-profile/NostrProfile.stories.tsx
  • stories/nostr-profile/NostrProfile.styling.stories.tsx
  • stories/nostr-profile/NostrProfile.testing.dashboard.stories.tsx
  • stories/nostr-profile/NostrProfile.testing.dynamic.stories.tsx
  • stories/nostr-profile/NostrProfile.testing.invalid.stories.tsx
  • stories/nostr-profile/NostrProfile.testing.no-data.stories.tsx
  • stories/nostr-profile/NostrProfile.testing.valid.stories.tsx
  • stories/nostr-profile/parameters.ts
  • stories/nostr-profile/test-cases-no-data.ts
  • stories/nostr-profile/utils.ts
  • stories/nostr-zap/NostrZap.stories.tsx
  • stories/nostr-zap/NostrZap.styling.stories.tsx
  • stories/nostr-zap/NostrZap.testing.dashboard.stories.tsx
  • stories/nostr-zap/NostrZap.testing.invalid.stories.tsx
  • stories/nostr-zap/NostrZap.testing.no-data.stories.tsx
  • stories/nostr-zap/NostrZap.testing.valid.stories.tsx
  • stories/nostr-zap/utils.ts
  • stories/post-data.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Storybook - Address minor issues

1 participant