Skip to content

Refactor imports to use storybook public API#361

Merged
JReinhold merged 12 commits intonextfrom
norbert/cpc-completion
Mar 17, 2025
Merged

Refactor imports to use storybook public API#361
JReinhold merged 12 commits intonextfrom
norbert/cpc-completion

Conversation

@ndelangen
Copy link
Copy Markdown
Member

@ndelangen ndelangen commented Mar 14, 2025

📦 Published PR as canary version: 3.2.7--canary.361.7dca927.0

✨ Test out this PR locally via:

npm install @chromatic-com/storybook@3.2.7--canary.361.7dca927.0
# or 
yarn add @chromatic-com/storybook@3.2.7--canary.361.7dca927.0

This pull request focuses on updating import paths and ensuring consistency in string quoting across multiple files. The main changes involve modifying import paths to use the correct modules and updating double quotes to single quotes for string literals.

Consistency in String Quoting:

  • Updated all string literals to use single quotes instead of double quotes in .storybook/preview.tsx. [1] [2] [3] [4] [5] [6] [7] [8]
  • Updated string literals in scripts/prepublish-checks.mjs to use single quotes. [1] [2] [3]

Correcting Import Paths:

  • Changed import paths from storybook/internal/manager-api and storybook/internal/theming to storybook/manager-api and storybook/theming respectively in multiple files, including src/Panel.tsx, src/TestingModuleDescription.tsx, src/components/Accordions.tsx, src/components/ActionButton.tsx, src/components/Badge.tsx, src/components/Box.tsx, src/components/BrowserSelector.tsx, src/components/BuildProgressBarInline.tsx, src/components/Button.tsx, src/components/ButtonStack.tsx, src/components/Code.tsx, src/components/Container.tsx, src/components/Eyebrow.tsx, src/components/Heading.tsx, src/components/IconButton.tsx, src/components/ModeSelector.tsx, src/components/Placeholder.tsx, and src/components/Screen.tsx. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]

…g' for consistency; update single quotes across multiple files.
@ndelangen ndelangen added DO NOT MERGE Block: Prevent merging this PR dependencies Pull requests that update a dependency file labels Mar 14, 2025
@ndelangen ndelangen self-assigned this Mar 14, 2025
@ndelangen ndelangen requested a review from ghengeveld March 14, 2025 11:08
…hql.web, @adobe/css-tools, @ardatan/relay-compiler, and various Babel packages. Remove outdated entries and add new packages such as universalify and word-wrap. Ensure compatibility with latest versions.
@ndelangen ndelangen marked this pull request as ready for review March 17, 2025 09:31
@ndelangen ndelangen removed the DO NOT MERGE Block: Prevent merging this PR label Mar 17, 2025
@ndelangen ndelangen added release Auto: Create a `latest` release when merged patch Auto: Increment the patch version when merged labels Mar 17, 2025
…ining mock responses. Address type mismatches with TypeScript annotations for better clarity in error handling scenarios.
…n 9.0.0-0 for addon-designs and version 1.4.0 for addon-icons, ensuring compatibility with the latest Storybook features.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2025

Codecov Report

Attention: Patch coverage is 15.90909% with 148 lines in your changes missing coverage. Please review.

Project coverage is 5.84%. Comparing base (9f3d307) to head (7dca927).
Report is 125 commits behind head on next.

Files with missing lines Patch % Lines
public/mockServiceWorker.js 0.00% 35 Missing ⚠️
src/screens/VisualTests/VisualTests.stories.tsx 11.11% 8 Missing ⚠️
src/components/SidebarTopButton.stories.tsx 25.00% 3 Missing ⚠️
src/components/TooltipMenu.stories.tsx 25.00% 3 Missing ⚠️
src/screens/VisualTests/BuildEyebrow.stories.ts 25.00% 3 Missing ⚠️
src/TestingModuleDescription.tsx 0.00% 2 Missing ⚠️
src/components/SidebarBottom.tsx 0.00% 2 Missing ⚠️
src/components/SidebarTop.tsx 0.00% 2 Missing ⚠️
.../screens/Authentication/Authentication.stories.tsx 0.00% 2 Missing ⚠️
src/screens/GuidedTour/GuidedTour.tsx 0.00% 2 Missing ⚠️
... and 77 more
Additional details and impacted files
@@           Coverage Diff            @@
##            next    #361      +/-   ##
========================================
+ Coverage   5.56%   5.84%   +0.28%     
========================================
  Files        177     177              
  Lines      14201   14879     +678     
  Branches     310     310              
========================================
+ Hits         790     870      +80     
- Misses     13252   13920     +668     
+ Partials     159      89      -70     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

… for chromatic to version 11.27.0, vite to version 6.2.2, and vitest to version 3.0.8. Adjust related Babel and prettier packages for improved compatibility and performance.
… checksum and enhancing the message payload structure for integrity checks and mocking status. Improve request handling by refining header manipulation for passthrough requests.
…'@storybook/react' across multiple components and stories. Update package.json and yarn.lock to remove deprecated '@storybook/test' references and ensure compatibility with the latest Storybook version.
@ndelangen ndelangen requested a review from JReinhold March 17, 2025 10:09
…rn.lock to streamline dependencies and ensure compatibility with the latest Storybook version.
… 'storybook/actions' across multiple components and stories for improved consistency and compatibility with the latest Storybook version.
…ncing test reliability and ensuring compatibility with the latest testing practices.
import React, { ComponentProps } from 'react';
import { action } from 'storybook/actions';
import type { StoryContext } from 'storybook/internal/types';
import { findByRole, fireEvent, screen, userEvent, within } from 'storybook/test';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we get rid of screen here too?

import { fireEvent, screen, userEvent, within } from '@storybook/testing-library';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { expect } from 'storybook/test';
import { fireEvent, screen, userEvent, within } from 'storybook/test';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same

@ghengeveld
Copy link
Copy Markdown
Member

@ndelangen I think this should be a major version bump, considering it won't work with older Storybook versions.

@JReinhold
Copy link
Copy Markdown
Contributor

I think this should be a major version bump, considering it won't work with older Storybook versions.

@ghengeveld given that it already targets next, which has a major version bump, that will happen either way.

@JReinhold JReinhold added skip-release Auto: Preserve the current version when merged and removed release Auto: Create a `latest` release when merged labels Mar 17, 2025
@JReinhold JReinhold merged commit c389c37 into next Mar 17, 2025
9 of 11 checks passed
@JReinhold JReinhold deleted the norbert/cpc-completion branch March 17, 2025 13:08
@ghengeveld
Copy link
Copy Markdown
Member

given that it already targets next, which has a major version bump, that will happen either way.

@JReinhold the label is also used to put this PR under the appropriate heading in the changelog.

@JReinhold
Copy link
Copy Markdown
Contributor

given that it already targets next, which has a major version bump, that will happen either way.

@JReinhold the label is also used to put this PR under the appropriate heading in the changelog.

Ah yes sorry, you're absolutely right.

@ghengeveld
Copy link
Copy Markdown
Member

🚀 PR was released in v4.0.0 🚀

@ghengeveld ghengeveld added released Verdict: This issue/pull request has been released and removed prerelease labels May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file patch Auto: Increment the patch version when merged released Verdict: This issue/pull request has been released skip-release Auto: Preserve the current version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants