1351 Commits
Author SHA1 Message Date
Vishal Kumar SinghandBassel Kanso 6e7e28306c fix(admin): use ISO 639-1 da for Danish admin locale (#26322)
* fix(admin): use ISO 639-1 da for Danish admin locale

Rename admin translation bundles from dk to da, normalize legacy dk in
app config, custom translation keys, localStorage, and stored user language.

Closes #25761

* fix(admin): add dk json fallback and admin user language migration

Register internal migration admin::migrate-prefered-language-dk-to-da to
rewrite admin_users.prefered_language from dk to da.

Export importLocaleJsonWithLegacyDkFallback from strapi-admin and use it in
core loadAdminTrads plus every bundled plugin registerTrads so third-party
plugins that still ship only dk.json keep loading when the UI locale is da.

Add @strapi/admin devDependency where the helper is imported from JS or
packages that did not already list it.

Refs #26322

* fix(types): add importLocaleJson to strapi-admin registerTrads typing

* fix(admin): expand plugin locale list and merge under canonical codes

Moves legacy dk handling into StrapiApp.loadTrads (flatMap + uniq + normalize merge) so registerTrads keeps a stable API without importLocaleJson. Core admin bundles use try/catch dynamic imports per locale code.

* fix(admin): route plugin translations through importLocaleJson

Pass StrapiApp.importLocaleJson into registerTrads so core and third-party plugins share legacy locale JSON fallback (da -> dk) and one-shot deprecation warnings. Relax admin test console.warn filter for those messages. Refs #26322.

* fix(admin): keep plugin locale fallback internal

---------

Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
2026-05-29 18:26:00 +03:00
e2e46f74b9 future(upload): edit asset info (#26366)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Mark Kaylor <mark.kaylor@strapi.io>
2026-05-27 12:53:20 +00:00
Filip ÓnodiandBassel Kanso e7772d621e feat(i18n): update and create Slovak translations (#25831)
Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
2026-05-26 15:10:41 +03:00
Andrei L b5452ab89f chore(eslint): migrate .eslintrc + .eslintignore to .eslintrc.cjs (#26216)
* chore(eslint): migrate .eslintrc + .eslintignore to .eslintrc.cjs

Consolidates the per-package ESLint setup into a single typed
`.eslintrc.cjs` file across the monorepo (177 files touched).

Why
- `.eslintignore` is removed in ESLint v9/v10. Folding ignore patterns
  into `ignorePatterns` inside the rc file is the supported migration
  path and unblocks future ESLint upgrades (which will likely be needed
  alongside the in-flight TypeScript 6 migration).
- `.cjs` extension is explicit about module format, so the configs keep
  working if any package later adopts `"type": "module"` (no CJS/ESM
  surprises).
- Wrapping each config in `// @ts-check` + a `Linter.Config`-typed
  `const config` block gives editor autocomplete and catches typos.
  Surfaced two real duplicates in
  `eslint-config-custom/back/typescript.js`
  (`node/no-unsupported-features/es-syntax`,
  `node/no-missing-import`), now deduplicated.
- `extends` references switched from the `custom/*` shorthand to the
  explicit `eslint-config-custom/*` package name. ESLint resolves both,
  but the explicit form makes the source unambiguous.
- Added `coverage/` to `ignorePatterns` so coverage output produced
  inside a workspace is not linted.

Misc
- `examples/kitchensink` had ESLint configured but no `lint` script;
  added one so the config actually runs.
- `nx.json` hash inputs updated:
  - removed `.eslintignore` (no longer exists)
  - replaced `{projectRoot}/.eslintrc.js` with
    `{projectRoot}/**/.eslintrc.cjs` so nested package configs are also
    part of the cache key (the previous glob missed them).
- `packages/utils/upgrade/tsconfig.eslint.json` include path updated
  from `.eslintrc.js` to `.eslintrc.cjs`.

Verification
- `eslint --print-config` resolves cleanly on sampled back/front
  packages (admin, users-permissions, upload).
- Full `pnpm -r lint` is clean.

* chore(eslint): set tsconfigRootDir for vscode-eslint typed linting

CLI lint resolved tsconfig paths via cwd, but vscode-eslint runs from
the workspace root and could not locate per-package tsconfigs. Set
parserOptions.tsconfigRootDir to __dirname in each package's
.eslintrc.cjs so the editor resolves typed-lint configs correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(eslint): self-ignore configs, scope coverage to jest packages

- Replace `env: { es6: true }` workaround with `.eslintrc.cjs` in
  ignorePatterns so eslint never lints the config file itself
  (root cause of the "const is not a keyword" parse error in es5)
- Add `.eslintrc.cjs` to ignorePatterns across all configs that
  were missing it
- Restrict `coverage/` ignorePatterns to workspace roots that
  actually run jest; drop from non-test packages and admin/server
  subdir configs (tests run from the workspace root)
2026-05-12 07:32:12 +00:00
6d83054647 chore(deps): migrate msw 1.x → 2.13.4 across admin test suites (#26065)
* chore(deps): bump msw to 1.3.5 and typedoc to 0.25.13

Widens TypeScript peer ranges in msw (>= 4.4.x) and typedoc (adds 5.4.x),
unblocking a future bump to typescript 5.6 required by react-intl 7.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(deps): bump msw to 2.13.4 across admin test suites

Migrates 8 workspaces (admin, content-manager, content-releases, upload,
review-workflows, plugin-i18n, plugin-documentation, plugin-users-permissions)
from msw 1.3.5 to 2.13.4; bumps email's unused dep for consistency.

Handler changes:
- rest.X((req, res, ctx) => res(ctx.json(X))) → http.X(() => HttpResponse.json(X))
- res(ctx.status(N)) → new HttpResponse(null, { status: N })
- res.once(...) → http.X(path, handler, { once: true })
- res.networkError(...) → HttpResponse.error()
- await req.json<T>() / casts → http.METHOD<Params, Body>(...) generics
- RequestHandler → HttpHandler
- Empty 200 responses use HttpResponse.json({}) to avoid cross-realm
  SyntaxError instanceof check in getFetchClient.ts

Jest setup (per msw frequent-issues guide):
- jest-preset.front.js: customExportConditions: [''] so msw/node resolves
  under jsdom; .mjs swc transform; ESM allow-list for msw deps
  (rettime, @open-draft, outvariant, until-async, etc.)
- packages/admin-test-utils/src/environment.ts: polyfill Node fetch +
  streams + BroadcastChannel + URL into jsdom global. Blob/File/FormData
  intentionally left as jsdom's — Strapi app code threads them through
  jsdom-only APIs (FileReader, Image, HTMLFormElement) where realm matters.
  Comment in env.ts documents the trade-off.

Verified vs develop+msw@1.3.5 baseline: 0 net regressions across all 7
workspaces with msw test files; TypeScript clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Revert "chore(deps): bump typedoc to 0.25.13"

The typedoc bump was bundled with the msw 1.3.5 bump in 39d169cfbb but
isn't required for the msw v2 migration. Reverting the docs/ and
core/types typedoc dep back to 0.25.10 to keep this branch focused on
the msw upgrade.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(tests): type msw handler params via generics

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(tests): address review feedback on msw v2 migration

- env.ts: snapshot jsdom globals in setup(), restore in teardown() so
  per-test mutations cannot leak across files in a Jest worker.
- env.ts: collapse polyfill list and value map into a single NODE_GLOBALS
  source of truth; document the fetch trade-off (Node undici vs jsdom).
- handlers: replace `<never, Body>` generics with `<Record<string, never>,
  Body>` (msw v2 convention; `{}` blocked by ban-types).
- email: drop unused msw devDep entirely (zero source usage in workspace).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(tests): use realm-agnostic SyntaxError check; drop URL polyfill

Two follow-ups to the msw v2 migration:

- `getFetchClient.responseInterceptor` now matches `error?.name === 'SyntaxError'`
  rather than `instanceof SyntaxError`. Constructor identity differs across JS realms
  (under jsdom + Node fetch, an empty 200 throws a Node-realm `SyntaxError` that
  fails the jsdom-realm `instanceof` check; the same is true in browsers when the
  Response originates from a service worker / iframe). Name comparison is realm-
  agnostic. With this in place, empty 200 handlers can return `new HttpResponse()`
  again (closer to v1's `res(ctx.status(200))`) instead of the `HttpResponse.json({})`
  workaround.

- Drop `URL` / `URLSearchParams` from the env.ts polyfill list. jsdom already
  provides browser-spec versions, and Node's `URL.createObjectURL` only accepts
  Node-realm `Blob` — replacing it broke the "from computer" upload path in
  `LogoInput.tsx`. MSW v2's interceptor doesn't require these to come from Node.

env.ts comments restructured: all polyfill rationale lives in one top-of-file block
so the body is short and the trade-offs are documented in one place.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(tests): switch content-type-builder jest env to shared polyfilled env

`aiClient.test.ts` constructs `new Response(...)` which jsdom does not provide
spec-compliantly. Align CTB with the other admin test suites by using
`@strapi/admin-test-utils/environment`, which polyfills Node's
`fetch`/`Request`/`Response`/streams into the jsdom global.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(tests): make msw v2 + undici body + jsdom realms work together

Three regressions surfaced by running the full front test suite under
jsdom + Node's undici fetch polyfill:

1. `TypeError: Body is unusable: Body has already been read` in every
   handler doing `await request.json()`. MSW v2's `RequestHandler.run()`
   calls `request.clone()` before invoking the resolver (to keep a copy
   for post-hoc logging). Under Node's undici, `Request.clone()` tees the
   underlying `ReadableStream` and locks the original body, so the
   resolver's `.json()` throws. Fix in `environment.ts`: wrap the global
   `Request` constructor to stash the stringified body on every instance
   and patch `Request.prototype.json` / `.text` to return the stash when
   present. Handlers now get the body regardless of how many times msw
   clones internally.

2. `expect.any(Array)` and `toStrictEqual` failing with "serializes to
   the same string" against msw response bodies. `Response.prototype.json`
   runs Node's `JSON.parse`, so the resulting objects carry Node-realm
   `Object`/`Array` prototypes; jsdom's `instanceof`/strict-equality
   matchers reject them. Patch `Response.prototype.json` to parse with
   the jsdom-realm `JSON`.

3. `useWidgets > should handle network errors gracefully` expected the
   toast text "Network error", which msw v1's `res.networkError('Network
   error')` surfaced verbatim. v2's `HttpResponse.error()` drops the
   custom message and fetch throws `TypeError: Failed to fetch`; update
   the assertion accordingly.

Also: `UIDInput` uses `jest.useFakeTimers()`. Adding `doNotFake:
['queueMicrotask', 'setImmediate']` keeps per-test runtime at ~1s
instead of ~10s (plain fake timers stall undici's internal microtasks
between request emission and handler resolution), and an `afterEach`
restores real timers so a failing test cannot leak fake timers into
the next one.

Verified with `nx run-many --target=test:front --parallel=1` across all
12 projects — all suites green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test(admin): assert toast container in Widgets error tests

Replace text-match (`findByText('Server error' | 'Failed to fetch')`) with
`[data-sonner-toast]` container assertion. Decouples the test from toast
copy and from msw v1/v2 network-error message differences.

Addresses @jhoward1994's review comment on PR #26065.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test(admin): assert toast text, scope msw handlers, use jsdom env

- Widgets tests: match actual toast text (Server error / fetch failure
  regex) instead of data-sonner-toast container.
- ConfirmBulkActionDialog: mark msw runtime handlers { once: true } so
  they do not leak across cases.
- content-type-builder: jest testEnvironment back to jsdom.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(tests): split jest env patches into modules

Refactor packages/admin-test-utils/src/environment.ts by extracting
the msw v2 + undici body + jsdom realm shims into dedicated modules
under src/patches/ (node-globals, request-body-stash,
response-json-realm, types).

Co-Authored-By: Jamie Howard <jhoward1994@gmail.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 08:45:04 +00:00
Andrei LandBassel Kanso 90623baa6f fix(admin): clean up lazy component registration warnings (#25015)
* fix(admin): don't warn when Component is missing in addMenuLink/addSettingsLink

* fix: add some missing StrapiApp types

* fix(admin): clean up lazy component registrations

---------

Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
2026-04-30 16:27:48 +03:00
akash-dabhi-qedandAdrien Lepoutre 4d3719a327 fix: contain absolute descendants in OverflowingItem (#26133)
Co-authored-by: Adrien Lepoutre <3693028+Adzouz@users.noreply.github.com>
2026-04-28 11:50:23 +02:00
Jan Willem Keizer 0c912f071b feat(i18n): complete Dutch (nl) translations for admin panel (#25932)
Add missing Dutch translations across all core packages and plugins,
bringing coverage from ~50% to ~100%.

Changes:
- core/admin: 301 new translations added (564 → 863 keys)
- core/content-manager: 169 new translations added (190 → 359 keys)
- core/content-type-builder: 62 new translations added (226 → 288 keys)
- core/upload: new nl.json with 220 translations
- core/email: 43 translations added (was empty)
- core/content-releases: new nl.json with 104 translations
- core/review-workflows: new nl.json with 15 translations
- plugins/users-permissions: 39 new translations added (42 → 81 keys)
- plugins/i18n: new nl.json with 84 translations
- plugins/cloud: new nl.json with 19 translations

Also standardizes existing translations to use informal "je/jouw"
consistently (was mixed "u/uw" and "je/jouw"), matching Strapi's
informal, developer-friendly tone of voice.
2026-04-20 10:29:25 +01:00
Nico André bc0b0e9449 feat(core/*): introduce strapi.ai namespace (#25886) 2026-04-17 08:46:33 +02:00
markkaylor 9f7e061b65 fix(upload): cache busting for cross-origin images in crop (#25950) 2026-04-09 17:00:58 +02:00
mathildeleg 708acdef81 fix: adjust typo in test (#25960) 2026-04-08 20:42:45 +00:00
Michał Kleszczyński 62023de80d chore: update Polish language translations (#23762) 2026-04-08 15:29:18 +02:00
Yohaan Narayanan 865f58605c fix: fixed 9 typos, spelling errors, and duplicate words. (#25936) 2026-04-08 10:16:23 +02:00
Tony 949eeba5a4 fix: typo in Russian translation for upload button (#25946) 2026-04-07 13:57:19 +00:00
akash-dabhi-qed d8f642cc68 fix(upload): allow upload of files with empty MIME type (#25844) 2026-03-30 08:14:09 +00:00
Shuhrat Dehkanov d331f8fc34 fix(upload): row duplicate-key warning (#25670)
when rows array is a mixed list of folders and assets,
a folder and an asset can have a same id and emit a duplicate-key warning
2026-03-18 13:56:14 +00:00
e3b43de861 fix(upload): allow removal of file type filter in media library (#25399)
Co-authored-by: Kai Gritun <kai@kaigritun.com>
Co-authored-by: Adrien Lepoutre <thewebsdoor@gmail.com>
2026-03-17 11:24:32 +01:00
jeanvierandAdrien Lepoutre a208c2eb5e fix(upload): add crossOrigin attribute to image preview (#24946)
Co-authored-by: Adrien Lepoutre <thewebsdoor@gmail.com>
2026-03-05 16:51:31 +01:00
Adrien LandIñigo Zulueta 9ef7aa5f21 fix: es translations (#25655)
Co-authored-by: Iñigo Zulueta <eggamer131@gmail.com>
2026-03-05 16:03:00 +01:00
markkaylor c1b52ed675 chore(upload): add import from url (#25496) 2026-02-27 09:33:24 +01:00
Jorrit Schippers 024a45babc fix: folder subtitles for folders without assets or subfolders (#22694) 2026-02-26 13:29:59 +00:00
Jamie Howard 4fe538996e Future media lib folder creation (#25532)
* future(upload): add folder creation functionality in AssetsPage

* future(upload): update CreateFolderDialog to use props for open state and folder name

* future(upload): front/e2e tests for folder creation + error handling
2026-02-25 17:35:06 +00:00
Adrien L 903f4410ed future(upload): asset details drawer (#25498) 2026-02-24 17:02:08 +00:00
Jamie Howard d5083788f2 future(upload): folder list/grid view + navigation (#25468)
* future(upload): folder list/grid view + navigation

* future(upload): streamline folder navigation

* future(upload): update hover background primary100

* future(upload): set Page.Main width to 100%

* future(upload): refactor folder display to use grid layout in AssetsGrid

* future(upload): enhance folder title handling

* future(upload): add unit tests for folder navigation and title hooks

* future(upload): rename FolderItemComponent to FolderCard

* future(upload): dropfilesmessage to show current folder name

* future(upload): remove width attribute
2026-02-19 16:12:15 +00:00
mathildelegandAdrien Lepoutre 126c2c347e fix: improve subnav on mobile so it works with banner (#25450)
* fix: improve subnav on mobile so it works with banner

* fix: subnav is scrollable even on tablet

* fix: layout with banner

* fix: sticky banner; tests

---------

Co-authored-by: Adrien Lepoutre <thewebsdoor@gmail.com>
2026-02-17 12:09:55 +00:00
markkaylor cf7633da6b future(upload): small chores (#25470) 2026-02-16 15:48:34 +01:00
markkaylor e5475e965e future(upload): add upload progress dialog (#25378) 2026-02-13 15:23:15 +01:00
Jamie Howard ea0cb18727 future(upload): infinite asset loading (#25397)
* future(upload): infinite asset loading

* future(upload): fix tests for pagination

* future(upload): useInfiniteAssets uses currentData

* future(upload): re-organise useInfiniteAssets

* future(upload): fix useInfiniteAssets tests
2026-02-12 11:30:29 +00:00
Ben Irvin eac316c672 test(front): auto-wrap act; fix rerender with stable data router and auto-wrap act (#25410) 2026-02-10 17:56:47 +01:00
Jamie Howard 3a6698c923 future: implement grid view media library (#25365)
* future(upload): grid view, table view mobile responsiveness

* future(upload): inline compos in AssetsGrid

* future(upload): streamline asset previews, unit tests, e2e tests for grid view

* future(upload): check for presentation images

* future(upload): add grid display e2e test

* future(upload): improved styling and structure

* future(upload): fix test switch to table view

* future(upload): rename list to table

* future(upload): isMobile refactor

* future(upload): tidy up
2026-02-09 15:02:36 +00:00
Adrien L 4d52f2a5f5 future(upload): dnd upload file (#25364)
* future(upload): dnd upload file

* fix: positionning of the info message

* fix: added e2e test

* fix: drop files anywhere in the whole page

* fix: created context for dnd
fix: updated test to make it work on safari

* fix: remove translations

* fix: rename and refactor context for dnd upload

* fix: use ref instead of querySelector to target content
2026-02-06 19:15:44 +01:00
Adrien L cff45c3624 fix: responsive drawer for content history (#25344) 2026-02-03 17:23:04 +01:00
Jamie Howard d11d6c8a60 future: implement assetlist component table view (#25297)
* future: implement assetlist component table view

* chore: refactor to assetspage

* chore: re add note regarding layout

* chore: add border to table

* chore(upload): revert to MediaLibraryPage

* chore(upload): use getTranslationKey

* chore(upload): refactor to AssetsPage

* test(upload): add unit tests for AssetsList

* test(upload): e2e verification for uploaded files

* fix(test): setup

* chore(test): improve document queries
2026-02-03 15:30:59 +00:00
jayesh70599andBen Irvin 4cbb3221f5 fix(upload): prevent asset deletion when clicking cancel on EditAssetDialog (#25318)
* fix(upload): prevent asset deletion when clicking cancel in RemoveAssetDialog

* test: check handleCloseSpy not called with null

* test(e2e): add cancel deletion test

* test(e2e): fix flaky test

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-02-02 16:42:38 +01:00
markkaylor e62f45eea4 future(upload): add upload via filepicker (#25256) 2026-01-30 11:59:48 +01:00
Schero D. 0fa379f225 feat(upload): add focal point picker for images (#25267) 2026-01-30 10:10:05 +01:00
Harshavardhan BajoriaandBassel Kanso 9cb5ee9e4c Fix: password validation error messages showing regex patterns [CMS-213] (#24538)
* Fix password validation error messages showing regex patterns

* Fixed error messages in password validation

* fix: linting issues

* fix: password validation message

* fix: settings page test

* fix: docs fixed

* fix: format message properly for error handling password validation on signup

* docs: revert doc changes

* test: revert api tests

* test: revert seetings page frontend tests

---------

Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
2026-01-27 00:13:33 +02:00
markkaylor 732dcee636 feat(upload): add retroactive ai metadata generation (#25066) 2026-01-23 16:54:40 +01:00
markkaylor 8bf1f1f1c3 chore(upload): setup future flag for media lib redesign work (#25229) 2026-01-23 10:33:14 +01:00
Adrien L 3615e59020 fix: responsive cm header (#25203) 2026-01-21 13:55:26 +01:00
Lukas Eipert 3d9d4b0209 feat: update german translations for various components (#24143) 2026-01-21 11:58:39 +01:00
Maksim Zhukau 2f59ed58b4 fix: added multiple prop for medialibrarydialog (#25069) 2026-01-16 16:11:13 +01:00
Adrien L 2629db1107 chore: bump design-system to v2.1.2 (#25174) 2026-01-14 18:31:32 +01:00
HichamELBSI 115aba1855 chore: remove unused media lib files 2025-12-22 10:46:38 +01:00
Maksim Zhukau 83cb416993 feat(i18n): add Russian translations for all admin components (#24077) 2025-12-13 11:53:27 +01:00
e520b8b062 enhancement: use sonner for notification rendering (#24792)
* enhancement: use sonner for notification rendering

* chore: pr feedback

* fix: snapshots

* fix: releases test

* fix: nps survey test

* fix: ignore act warnings for sonner

* Revert "fix: ignore act warnings for sonner"

This reverts commit ef4664d259.

* chore: update tests

* chore: add ignore act back

* chore: update snapshot

* chore: update snapshots

* chore: update uploda test

---------

Co-authored-by: Rémi de Juvigny <remidej@users.noreply.github.com>
Co-authored-by: Mark Kaylor <mark.kaylor@strapi.io>
2025-12-12 17:42:53 +01:00
Mohamed osama 41aae86fcc fix: layout header to properly handle long text without breaking the layout (#24191) 2025-12-11 17:12:18 +01:00
Deepak gupta 051d1af8c2 fix: added scrollbar in media modal (#24856) 2025-12-11 15:28:35 +00:00
Adrien L f0f19e1d53 fix: enter key trigger in edit view form (#24744) 2025-12-01 09:14:54 +01:00
markkaylor 4310e958c5 chore(admin): isolate ai apis to ee folder (#24834) 2025-11-20 11:01:48 +01:00