Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/codeql-javascript.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: codeql-javascript

permissions: { }
permissions: {}

on:
push:
Expand All @@ -10,7 +10,7 @@ on:
branches:
- main
schedule:
- cron: '2 5 * * 1'
- cron: "2 5 * * 1"

concurrency:
# Cancels in-progress runs only for pull requests
Expand All @@ -20,7 +20,7 @@ concurrency:
jobs:
analyze:
name: Analyze JavaScript
runs-on: 'ubuntu-latest'
runs-on: "ubuntu-latest"
permissions:
security-events: write
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ permissions: {}

on:
push:
branches: [release/*]
branches: [ release/* ]

jobs:
create-github-release:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ permissions: {}

on:
push:
branches: [release/*]
branches: [ release/* ]

jobs:
publish-npm:
Expand All @@ -20,8 +20,8 @@ jobs:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '26.x'
registry-url: 'https://registry.npmjs.org'
node-version: "26.x"
registry-url: "https://registry.npmjs.org"
package-manager-cache: false
- run: npm install-ci-test
- run: npm publish
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '26.x'
cache: 'npm'
node-version: "26.x"
cache: "npm"
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/zizmor-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
push:
branches:
- main
- 'releases/**'
- "releases/**"
paths:
- '.github/**'
- ".github/**"
pull_request:
paths:
- '.github/**'
- ".github/**"

permissions: {}

Expand Down
47 changes: 29 additions & 18 deletions .ladle/components.module.scss
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
$defaultSansFamily: 'Inter var',
ui-sans-serif,
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
'Helvetica Neue',
Arial,
'Noto Sans',
sans-serif,
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol',
'Noto Color Emoji';
$defaultMonoFamily: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
/* biome-ignore-all lint/correctness/noUnknownUnit: false positive on hex colours in custom properties */
$defaultSansFamily:
"Inter var",
ui-sans-serif,
system-ui,
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
"Helvetica Neue",
Arial,
"Noto Sans",
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
"Noto Color Emoji";
$defaultMonoFamily:
ui-monospace,
SFMono-Regular,
Menlo,
Monaco,
Consolas,
"Liberation Mono",
"Courier New",
monospace;

.wrapper {
font-family: $defaultSansFamily;
background-color: white;
color: #222;

pre, code {
pre,
code {
font-family: $defaultMonoFamily;
}

Expand All @@ -40,4 +51,4 @@ $defaultMonoFamily: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Libe
--cucumber-panel-accent-color: #313442;
--cucumber-panel-text-color: #f8f8f2;
}
}
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ If you need a sample for a use case that isn't covered by the CCK, you can add a
3. Add the `.ndjson` file to the `samples` directory in this repo
4. Run `npm run prepare` to regenerate the TypeScript files

(Please ensure your sample doesn't contain any secrets, proprietary or sensitive information before you commit it!)
(Please ensure your sample doesn't contain any secrets, proprietary or sensitive information before you commit it!)
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The source code for the screenshot above is:
```jsx
import { EnvelopesProvider, FilteredDocuments } from '@cucumber/react-components'

<EnvelopesProvider envelopes={envelopes}>
;<EnvelopesProvider envelopes={envelopes}>
<FilteredDocuments />
</EnvelopesProvider>
```
Expand All @@ -44,7 +44,7 @@ The standard styling comes without any extra providers or configuration. There a
You can provide your own theme with a small amount of CSS. Target the element above your highest-level usage of the components:

```jsx
<div className="dark-theme">
;<div className="dark-theme">
<EnvelopesProvider envelopes={envelopes}>
<FilteredDocuments />
</EnvelopesProvider>
Expand Down Expand Up @@ -92,11 +92,13 @@ Let's say you want to do something totally different with the typography of doc
Then, you can provide an `overrides` prop to the `CustomRendering` component, in the form of an object that declares which class names you're going to override and what with:

```jsx
<CustomRendering overrides={{
DocString: {
docString: 'acme-docstring'
}
}}>
;<CustomRendering
overrides={{
DocString: {
docString: 'acme-docstring',
},
}}
>
<EnvelopesProvider envelopes={envelopes}>
<FilteredDocuments />
</EnvelopesProvider>
Expand All @@ -112,14 +114,16 @@ To change the rendering of some components entirely, you can selectively provide
Staying with the doc string example, you can use the same `overrides` prop, but this time instead of an object with class names, you provide a React functional component, giving you full control over the rendering:

```jsx
<CustomRendering overrides={{
DocString: (props) => (
<>
<p>I am going to render this doc string in a textarea:</p>
<textarea>{props.docString.content}</textarea>
</>
)
}}>
;<CustomRendering
overrides={{
DocString: (props) => (
<>
<p>I am going to render this doc string in a textarea:</p>
<textarea>{props.docString.content}</textarea>
</>
),
}}
>
<EnvelopesProvider envelopes={envelopes}>
<FilteredDocuments />
</EnvelopesProvider>
Expand Down
3 changes: 3 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["./node_modules/@cucumber/biome-config/base.json"],
"files": {
"includes": ["!CHANGELOG.md"]
},
"linter": {
"rules": {
"suspicious": {
Expand Down
106 changes: 71 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading