feat: extract AuthErrorPopup, InternalErrorPopup, NetworkErrorPopup, AuthPopup, SpotifyAuthErrorPopup - #29
Merged
Conversation
…Popup, SpotifyAuthErrorPopup Extracted from grow/hear-the-music-tree-frontend's near-identical local copies, following the same pattern as BasePopup/TrackUploadPopup: env-var reads and app-specific copy become explicit props (contactEmail, spotifyOnlyDescription/defaultDescription) instead of assumptions this package can't make about a consuming app. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
packages/app-kit's tsc --noEmit only type-checks files under src/, so vitest.setup.ts's runtime `import "@testing-library/jest-dom/vitest"` never reached the type checker, and the new popup tests were the first in this package to use jest-dom matchers (toBeInTheDocument) and hit the gap. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Importing from the "../transport" barrel evaluates its entire module graph (fetch-wrapper, site-urls, query-client, app-error-factory, etc.), pulling files with near-zero test coverage into the v8 coverage report (all: false) and dragging the global 80% threshold down to ~63%.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@behindthemusictree/app-kit/popup, following the same pattern already used forBasePopup/TrackUploadPopup.InternalErrorPopupandSpotifyAuthErrorPopuptake an explicitcontactEmailprop instead of readingprocess.env.NEXT_PUBLIC_CONTACT_EMAILdirectly.AuthPopuptakesspotifyOnlyDescription/defaultDescriptionprops instead of hardcoded copy, since the two apps' wording differs.topOffsetneeds no change — it's already part ofBasePopupPropsand flows through...rest; consuming apps just pass it at the call site as they already do forBasePopupitself.SpotifyAuthErrorPopup'serrorCodeprop — declared/destructured in hear-app's copy but never used in the body.This is step 2/3 of a larger popup-extraction effort (step 1 moved
BasePopup/PopupTitle/PopupButtonsinto app-kit for grow-frontend to consume). Next: bump grow-frontend's app-kit dependency and migrate its call sites to import these from app-kit instead of its local copies.Test plan
*.test.tsxfor each component, ported from grow-frontend's existing behavioral suite