@gravitee/graphene-core 3.31.1 → 3.32.0-fix-found-404-flow-form-sheet-ids.7628e0c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/USAGE_GUIDE.md +5 -1
  2. package/package.json +2 -1
package/USAGE_GUIDE.md CHANGED
@@ -1054,7 +1054,7 @@ The platform e2e suite selects elements by `data-testid` only. These are the rul
1054
1054
 
1055
1055
  - **One attribute.** The test id is the `data-testid` attribute, on every component, base and composed. There is no `testId` or `testIdPrefix` prop, and no `data-test`, `data-cy` or `id` alias.
1056
1056
  - **Your id wins.** The id you pass always wins. An element you compose yourself (a `DialogClose`, a `SelectItem`, a `Button` placed in a slot such as `actions` or `children`) keeps your own id.
1057
- - **No default ids.** Graphene never sets an id when you pass none.
1057
+ - **No default ids.** Graphene never sets an id when you pass none. The one exception is `PolicyStudio` (below).
1058
1058
  - **Where the id lands.**
1059
1059
  - Form fields: the native control (`button`, `input`, `textarea`, the `button[role=checkbox|switch|radio]`).
1060
1060
  - Anything that opens an overlay: the trigger.
@@ -1071,6 +1071,10 @@ The platform e2e suite selects elements by `data-testid` only. These are the rul
1071
1071
 
1072
1072
  A toast is created by a function call, so pass `toast(message, { testId })`. Sonner renders it as `data-testid` on the toast element. It is the only entry point that is not the `data-testid` attribute. Sonner's built-in close and action buttons can't be tagged.
1073
1073
 
1074
+ **Exception: `PolicyStudio`**
1075
+
1076
+ `PolicyStudio` sets ids without one from you, because you can't tag anything inside it. Its ids derive from the prefix `policy-studio`; a `data-testid` on `PolicyStudio` replaces that prefix. Two studios on one page each need their own `data-testid`. The sub-exports (`FlowsSidebar`, `PolicyStudioLayout`, …) set no default: they take the prefix from a `data-testid` on `PolicyStudioProvider`. Every studio id is listed in the studio's id map, `packages/policy-studio/docs/test-ids.md`.
1077
+
1074
1078
  ## Common mistakes to avoid
1075
1079
 
1076
1080
  - Importing `@gravitee/graphene-core/styles` **before** the app Tailwind entry when using Tier 2 (preflight can override Graphene base styles such as default border color).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitee/graphene-core",
3
- "version": "3.31.1",
3
+ "version": "3.32.0-fix-found-404-flow-form-sheet-ids.7628e0c",
4
4
  "type": "module",
5
5
  "description": "Gravitee's Graphene design system: accessible React components, design tokens, icons, and shared ESLint/TypeScript configs. Built on shadcn/ui and Tailwind.",
6
6
  "keywords": [
@@ -103,6 +103,7 @@
103
103
  },
104
104
  "peerDependencies": {
105
105
  "@fontsource/dm-sans": ">=5.0.0",
106
+ "@gravitee/graphene-core": "3.32.0-fix-found-404-flow-form-sheet-ids.7628e0c",
106
107
  "@monaco-editor/react": "^4.7.0",
107
108
  "@tanstack/react-table": "^8.0.0",
108
109
  "@testing-library/dom": ">=10.0.0",