@mittwald/flow-react-components 1.5.10 → 1.5.12
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.
- package/AGENTS.md +22 -0
- package/dist/assets/component-index.json +1 -1
- package/dist/assets/doc-properties.json +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs +23 -5
- package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/hooks/useTickLabelWidth.mjs +67 -0
- package/dist/js/packages/components/src/components/CartesianChart/hooks/useTickLabelWidth.mjs.map +1 -0
- package/dist/types/components/CartesianChart/hooks/useTickLabelWidth.d.ts +1 -0
- package/package.json +10 -10
package/AGENTS.md
CHANGED
|
@@ -333,6 +333,28 @@ if ("action" in props) {
|
|
|
333
333
|
| `*.test.ts(x)` (unit) | Pure logic in `src/lib/` or component utility functions. |
|
|
334
334
|
| `*.test-types.tsx` | Generic/typed public APIs — `expectTypeOf` plus `@ts-expect-error` negative assertions. |
|
|
335
335
|
|
|
336
|
+
A bug fix gets a regression test when it changes behavior this table covers, or
|
|
337
|
+
rendered output the visual suite covers
|
|
338
|
+
(`packages/remote-react-components/src/tests/visual`, see Definition of Done
|
|
339
|
+
item 4 in the
|
|
340
|
+
[root AGENTS.md](https://github.com/mittwald/flow/blob/main/AGENTS.md#definition-of-done--component-work))
|
|
341
|
+
— not by default. Leave out:
|
|
342
|
+
|
|
343
|
+
- **Wiring of a single prop** — "the consumer `className` reaches the root",
|
|
344
|
+
"`aria-label` is forwarded". A test for one prop is arbitrary: every other
|
|
345
|
+
prop would need the same. A whole class of wiring bugs (`className` merge
|
|
346
|
+
order, a props spread) belongs in a lint rule or a shared contract helper like
|
|
347
|
+
`testFormFieldContract`.
|
|
348
|
+
- **A spy on a function prop the component consumes** — `sortBy`, `filterBy`, a
|
|
349
|
+
formatter. Assert the result it produces, not that it ran. `on*` event props
|
|
350
|
+
are the exception: the call is what the consumer observes, so a spy is the
|
|
351
|
+
assertion.
|
|
352
|
+
- **Tests that pass without the fix.** Revert the fix and watch the test fail
|
|
353
|
+
before committing it. If it cannot fail, it guards nothing; say in the PR how
|
|
354
|
+
you verified the fix instead. The `optimizeDeps` entry under
|
|
355
|
+
[Common failures](https://github.com/mittwald/flow/blob/main/AGENTS.md#common-failures)
|
|
356
|
+
in the root AGENTS.md shows one way a test passes in both directions.
|
|
357
|
+
|
|
336
358
|
Run: `pnpm nx test:unit components`,
|
|
337
359
|
`pnpm nx test:browser components --browser.name=webkit`. The browser targets
|
|
338
360
|
install the Playwright browsers for you **locally**; `pnpm test:browser:prepare`
|