Skip to content

Commit 9eec53d

Browse files
committed
Merge remote-tracking branch 'origin/main' into lkostrowski/model-type-icons
# Conflicts: # src/attributes/utils/data.ts # src/modelTypes/components/PageTypeList/PageTypeList.tsx # src/modelTypes/views/PageTypeDetails.tsx # src/modeling/components/ModelTypeTabs/ModelTypeTabs.tsx # src/modeling/components/PageListDatagrid/PageListDatagrid.tsx # src/modeling/views/PageList/PageList.tsx # src/navigationPins/components/NavigationPinButton.tsx # src/navigationPins/components/NavigationPinList.tsx # src/navigationPins/hooks/usePinnedModelTypeNames.ts # src/navigationPins/hooks/useResolvedNavigationPins.ts
2 parents 13bd3b9 + aa79e5b commit 9eec53d

2,211 files changed

Lines changed: 25879 additions & 35533 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"saleor-dashboard": patch
3+
---
4+
5+
Account Settings is now a personal workspace: edit your profile, manage sidebar pins and extension widgets, and reset your password from there.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"saleor-dashboard": patch
3+
---
4+
5+
Fixed replacing or clearing a file attribute value failing with a permission
6+
error for users without attribute-management permissions. The dashboard no
7+
longer calls `attributeValueDelete` before saving products, variants, and
8+
models — Saleor 3.23.30 and above clean up the detached file value as part of the
9+
update itself, and on older versions the update still succeeds.

.changeset/olive-pots-guess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"saleor-dashboard": patch
3+
---
4+
5+
Now the installed extensions list makes freshly added extensions easier to spot. After an extension finishes installing, its row gets a one-off accent highlight that sweeps in from the left — so you can find it even when alphabetical sorting drops it in the middle of the table. Extensions installed in the last 48 hours also get a "New" badge next to their name.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"saleor-dashboard": patch
3+
---
4+
5+
Pinned fullscreen home widgets now appear as their own rows under the sidebar Home section, so you can open one directly instead of going to Home first and picking its tab.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"saleor-dashboard": patch
3+
---
4+
5+
Staff emails now has a **New order alerts** list. Merchants can choose which staff members get an email when a customer completes checkout.
6+
7+
Find it under Configuration → Notifications → Staff emails. Assign or remove people there; the list saves immediately and is separate from the SMTP save bar. Draft orders completed in the Dashboard are not included.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"saleor-dashboard": patch
3+
---
4+
5+
Fixed the browser freezing when adding a value inline to a swatch attribute. The inline add row
6+
handed its colour picker a fresh empty error object on every render, and the picker keys an
7+
effect on that object — so each render wrote the colour back into the form, which triggered
8+
another render, in an unbounded loop. The error object is now stable.

.changeset/tough-pans-attend.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"saleor-dashboard": patch
3+
---
4+
5+
Now the Dashboard fetches the signed-in user once when you log in, instead of twice. Previously `tokenCreate` returned the user and then a separate `UserDetails` request fetched the same user again before the app could render. The login mutations now return the full user and seed the Apollo cache, removing one round trip from the login path.

.github/workflows/pr-automation.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ jobs:
143143
IS_CLOUD_INSTANCE: true
144144
ENABLED_SERVICE_NAME_HEADER: true
145145
ONBOARDING_USER_JOINED_DATE_THRESHOLD: ${{ vars.STAGING_ONBOARDING_USER_JOINED_DATE_THRESHOLD }}
146+
# PR test envs run core unstable/unreleased main, so build against the staging schema
147+
FF_USE_STAGING_SCHEMA: true
146148
run: pnpm run build
147149

148150
- name: Upload Build

.knip.json

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"$schema": "https://unpkg.com/knip@5/schema.json",
33
"rules": {
4-
"types": "warn",
4+
"types": "error",
55
"enumMembers": "off",
6-
"files": "warn",
7-
"exports": "warn",
6+
"files": "error",
7+
"exports": "error",
88
"duplicates": "off",
9-
"classMembers": "warn",
10-
"nsTypes": "warn",
11-
"unresolved": "warn",
12-
"nsExports": "warn",
13-
"unlisted": "warn",
9+
"classMembers": "error",
10+
"nsTypes": "error",
11+
"unresolved": "error",
12+
"nsExports": "error",
13+
"unlisted": "error",
1414
"binaries": "off",
1515
"optionalPeerDependencies": "error",
1616
"dependencies": "error",
@@ -42,23 +42,20 @@
4242
"playwright/**",
4343
"**/*.generated.ts",
4444
"apollo.config.js",
45+
"graphql-lint.config.js",
4546
"codegen*",
46-
"src/graphql/staging/index.ts",
47-
"src/legacy-sdk/apollo/types.ts"
47+
"src/graphql/staging/index.ts"
4848
],
4949
"ignoreDependencies": [
50-
"keycode",
51-
"tslib",
50+
"react-responsive-carousel",
5251
"@types/lodash-es",
5352
"@types/webappsec-credential-management",
5453
"core-js",
5554
"moment",
5655
"history",
57-
"react-transition-group",
5856
"@sentry/cli",
5957
"@react-editor-js/core",
6058
"playwright-ctrf-json-reporter",
61-
"downshift",
6259
"@graphql-codegen/cli",
6360
"@graphql-codegen/fragment-matcher",
6461
"@graphql-codegen/import-types-preset",

AGENTS.md

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Project Overview
44

5-
Saleor Dashboard is a GraphQL-powered, single-page React application built with TypeScript that serves as the admin interface for the Saleor e-commerce platform. It uses modern web technologies including React 17, @saleor/macaw-ui-next, Apollo Client, and Vite for bundling.
5+
Saleor Dashboard is a GraphQL-powered, single-page React application built with TypeScript that serves as the admin interface for the Saleor e-commerce platform. It is built on React, @saleor/macaw-ui-next, Apollo Client and Vite. Check `package.json` to resolve installed package versions and `package.json` `engines` for the required Node/pnpm versions.
66

77
## Development Commands
88

@@ -16,11 +16,13 @@ Saleor Dashboard is a GraphQL-powered, single-page React application built with
1616

1717
Before completing changes make sure you run these commands:
1818

19-
- `pnpm run lint` - Run ESLint with auto-fix on src/ and playwright/ directories
19+
- `pnpm run lint` - Runs every `lint:*` script (ESLint with auto-fix, Prettier write, changeset check). Use `pnpm run lint:eslint` to run ESLint alone.
2020
- `pnpm run test:quiet <file_path>` - Run specific test file with console output suppressed
21-
- `pnpm run check-types` - Run TypeScript type checking
21+
- `pnpm run check-types` - Runs every `check-types:*` script (src + `tsc-strict`, playwright, scripts)
2222
- `pnpm run knip` - Check for unused files/dependencies/exports
2323

24+
See `package.json` `scripts` for the full, current list.
25+
2426
- ALWAYS run linter with autoformatter after you change the code, BEFORE you try to manually fix linter errors
2527

2628
#### Test Scripts
@@ -35,12 +37,14 @@ Before completing changes make sure you run these commands:
3537
- Console output is suppressed in quiet command
3638
- Tests automatically run from the `src/` directory (configured in jest.config.js)
3739
- When writing new fixtures (e.g. any objects used as test inputs) try to figure out their types and explicitly declare them:
38-
`cont fixture: FixtureType = {...}`
40+
`const fixture: FixtureType = {...}`
3941

4042
### GraphQL & Code Generation
4143

42-
- `pnpm run generate` - Generate GraphQL types and hooks, after making changes in queries/mutations or updating schema
43-
- `pnpm run fetch-schema` - Download GraphQL schema from Saleor repository
44+
The dashboard generates against two schemas: **main** (pinned Saleor version, see `config.saleor.schemaVersion` in `package.json`) and **staging** (Saleor `main` branch), selected at runtime by the `FF_USE_STAGING_SCHEMA` feature flag. See `docs/multi-schema.md`.
45+
46+
- `pnpm run generate` - Generate GraphQL types and hooks for both schemas, after making changes in queries/mutations or updating schema
47+
- `pnpm run fetch-schema` - Download both main and staging schemas from the Saleor repository
4448
- `pnpm run fetch-local-schema` - Fetch schema from local Saleor instance
4549

4650
### Internationalization
@@ -54,7 +58,7 @@ Before completing changes make sure you run these commands:
5458
The codebase follows a feature-based architecture with shared components:
5559

5660
- **Feature Modules**: Each business domain (products, orders, customers, etc.) has its own directory containing:
57-
- `index.tsx` - Main feature export
61+
- `index.tsx` - Route definitions for the section (a router component, not a barrel export)
5862
- `views/` - Page components and view logic
5963
- `components/` - Feature-specific components
6064
- `mutations.ts` - GraphQL mutations
@@ -68,23 +72,23 @@ The codebase follows a feature-based architecture with shared components:
6872

6973
### Key Technologies
7074

71-
- **React 17** with TypeScript (strict mode disabled for old views using typescript-strict-plugin, new ones should use strict mode)
72-
- **Apollo Client 3.4** for GraphQL state management
75+
Check `package.json` to resolve installed package versions.
76+
77+
- **React** with TypeScript (strict mode disabled for old views using typescript-strict-plugin, new ones should use strict mode)
78+
- **Apollo Client** for GraphQL state management
7379
- **Vite** for build tooling and development server
7480
- **React Hook Form** for form management
75-
- **React Router v5** for navigation
81+
- **React Router** (v5 API: `Switch`, `RouteComponentProps`) for navigation
7682
- **React Intl** for internationalization
83+
- **Jotai** for shared client state
84+
- **Zod** for schema validation
7785
- **@saleor/macaw-ui-next** for UI components and design system
86+
- **@material-ui/core** (v4) + `makeStyles` — legacy, still present in many older views; do not add new usages
7887

7988
### TypeScript Configuration
8089

81-
- Base URL mapping with path aliases:
82-
- `@dashboard/*``src/*`
83-
- `@assets/*``assets/*`
84-
- `@locale/*``locale/*`
85-
- `@test/*``testUtils/*`
86-
- Strict mode disabled but typescript-strict-plugin provides gradual strictness adoption
87-
- ES2020 target with DOM libraries
90+
- Path aliases are declared in `tsconfig.json` `compilerOptions.paths` (`@dashboard/*`, `@assets/*`, `@locale/*`, `@test/*`, `@storybookUtils/*`) — read that file rather than relying on this list
91+
- Strict mode disabled but typescript-strict-plugin provides gradual strictness adoption; `pnpm run check-strict-null-errors` reports remaining strict-null violations
8892

8993
### Build Configuration
9094

@@ -96,10 +100,10 @@ The codebase follows a feature-based architecture with shared components:
96100

97101
### Testing Setup
98102

99-
- Jest with SWC transformer for fast test execution
103+
- Jest with SWC transformer for fast test execution; config in `jest.config.js` (roots, module name mapping, setup files)
100104
- Testing Library for React component testing
101-
- Playwright for E2E testing
102-
- Canvas mock and localStorage mock for browser APIs
105+
- Playwright for E2E testing — see `docs/running-tests.md` for required env vars
106+
- Storybook stories run under Vitest (`pnpm run test-storybook`)
103107
- JSDOM test environment
104108

105109
## Development Workflow
@@ -122,7 +126,7 @@ The codebase follows a feature-based architecture with shared components:
122126
### Code Standards
123127

124128
- Use existing UI components from `/components/` directory
125-
- Follow Material-UI theming patterns
129+
- Style with `@saleor/macaw-ui-next` tokens and CSS Modules (see Styling below) — do not follow the legacy Material-UI theming patterns still present in older views
126130
- Utilize Apollo Client hooks for GraphQL operations
127131
- Implement proper form validation with React Hook Form
128132
- Add internationalization support for user-facing text
@@ -158,10 +162,7 @@ Add // Arrange // Act // Assert comments in tests to clarify test structure
158162
These files should be regenerated after resolving source conflicts:
159163

160164
- `pnpm-lock.yaml` - Run `pnpm install` after resolving `package.json`
161-
- `src/graphql/hooks.generated.ts` - Run `pnpm run generate` after resolving GraphQL files
162-
- `src/graphql/typePolicies.generated.ts` - Run `pnpm run generate` after resolving GraphQL files
163-
- `src/graphql/fragmentTypes.generated.ts` - Run `pnpm run generate` after resolving GraphQL files
164-
- `src/graphql/types.generated.ts` - Run `pnpm run generate` after resolving GraphQL files
165+
- `src/graphql/*.generated.ts` (main and `*Staging.generated.ts` variants) - Run `pnpm run generate` after resolving GraphQL files
165166

166167
### Package Version Conflicts
167168

@@ -171,7 +172,7 @@ Always use the latest version when resolving package version conflicts between b
171172

172173
This frontend connects to a Saleor GraphQL backend:
173174

174-
- Default backend URL: http://localhost:8000/graphql/
175+
- Default local backend URL: http://localhost:8000/graphql/ (`API_URL`, see `.env.template`)
175176
- Configure via environment variables (see `docs/configuration.md`)
176177
- Default development credentials for local Saleor instance: `admin@example.com` / `admin`
177178
- Use `pnpm run fetch-local-schema` to sync GraphQL schema from local backend
@@ -349,4 +350,4 @@ Not applicable — no agent-driven issue tracker is configured.
349350

350351
### Domain docs
351352

352-
Single-context: one `CONTEXT.md` + `docs/adr/` at the repo root (created lazily by `/domain-modeling`). See `docs/agents/domain.md`.
353+
Single-context: `CONTEXT.md` + `docs/adr/` at the repo root. Read them before exploring an area they cover. See `docs/agents/domain.md`.

0 commit comments

Comments
 (0)