feat(sanity-plugin-media): transfer plugin to monorepo#858
Draft
Copilot wants to merge 531 commits into
Draft
Conversation
…ent z-index clashing
…uploads with native inputs
… dedicated selected reducer
Correction of typos
Hey Robin 👋 `@sanity/base` is using `@sanity/ui: ^0.33.6`, which forces package managers to download two versions of the library when this plugin is installed. This is making studios throw an error `Cannot read property 'sanity' of undefined`. For more context, see sanity-io/sanity#2190 I'd suggest moving `@sanity/ui` and `styled-components` into `peerDependencies` as those are shipped with Sanity studio. This will make your plugin more resilient in the long run :)
…t with scoped provider
* fix: allow sanity v5 as peer dependency * fix(types): match client version, allow only image/file types - not video
…utils (#290) * chore: setup vitest and test the main plugin actions, components and utils * fix: lint issues * fix: copilot pr comments * fix: add generic error payload for notifications
* feat: add localization support to media plugin configuration and components You can now enable localization support by passing a `locales` array to the plugin config
- Use addEventListener instead of onXxx assignment (uploadSanityAsset, generatePreviewBlobUrl) - Use throwError factory function instead of deprecated direct value (uploadSanityAsset, checkTagName, debugThrottle) - Migrate studioTheme.color to studioTheme.v2.color (getSchemeColor) - Migrate studioTheme.container to studioTheme.v2.container (useBreakpointIndex) - Import ThemeColorSchemeKey and Theme from @sanity/ui/theme (getSchemeColor, sanity-ui.d.ts) - Use indexed access for index signature types (getDocumentAssetIds) - Remove unsafe type assertions in type guards (typeGuards) - Fix isHotkey import to named export (useKeyPress) - Add useMemo for context values (AssetSourceDispatchContext, DropzoneDispatchContext) - Simplify useMemo deps for React Compiler (ToolOptionsContext) - Add null check for ORDER_DICTIONARY access (orders) - Fix useEffect deps and ref.current in cleanup (useOnScreen, useBreakpointIndex) - Remove unused @ts-expect-error (plugin.tsx) - Remove unnecessary type argument (modules/index) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
Fix TS2532, no-unsafe-type-assertion, no-deprecated, no-unsafe-optional-chaining, no-unnecessary-type-conversion, and TS4111 errors across all redux module files. - Add null guards for Record indexing (TS2532) - Replace AnyAction with UnknownAction (no-deprecated) - Replace deprecated empty() with EMPTY (no-deprecated) - Remove unsafe optional chaining in destructuring (no-unsafe-optional-chaining) - Remove unnecessary String() conversions and as HttpError assertions - Use bracket notation for index signature properties (TS4111) - Add type guard filters on selectors (TS2322) - Add oxlint-disable comments for necessary type assertions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pedrobonamin
April 29, 2026 07:55
View session
…LOG header, remove temp files Agent-Logs-Url: https://github.com/sanity-io/plugins/sessions/fc6d92ed-0c3d-43ad-8464-336b07920570
- Migrate from deprecated studioTheme/fonts/space/radius to v2 theme API via buildTheme() - Fix TS2345/TS2532 by adding null coalescing (0) for possibly undefined theme values - Fix TS4111 by using bracket notation for index signature properties (source, opt) - Fix TS2322/TS18048 by adding non-null assertions where values are guarded - Add oxlint-disable comments for necessary type assertions - Extract Footer from render function to inline JSX element (static-components) - Move renderDialogs to module level (consistent-function-scoping) - Add null check for dialog in Dialogs component - Suppress no-deprecated for WithReferringDocuments (migration not feasible now) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot stopped work on behalf of
pedrobonamin due to an error
April 29, 2026 09:54
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.
pnpm generate "copy plugin"(git subtree, history preserved){/* oxlint-disable-next-line */}doesn't work - needs to be// oxlint-disable-next-linestyle)pnpm formatto completion (blocked by syntax error above)Status: Significant progress but NOT complete
What's done:
What still needs work:
{/* oxlint-disable-next-line */}JSX comment syntax which doesn't work for oxlint directives (must use// oxlint-disable-next-lineJS comments)