Skip to content

Commit 3417dd7

Browse files
committed
Update docs
1 parent ea52bec commit 3417dd7

1 file changed

Lines changed: 20 additions & 7 deletions

File tree

CONTRIBUTING.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,18 +163,31 @@ npm run schema
163163
#### Step 9: REGL - Review & commit potential changes to precompiled regl shaders
164164

165165
If you are implementing a new feature that involves regl shaders, or if you are
166-
making changes that affect the usage of regl shaders, you would need to run
166+
making changes that affect the usage of regl shaders, you would need to regenerate the precompiled regl shader code.
167+
168+
This is needed because regl performs codegen in runtime which breaks CSP
169+
compliance, and so for strict builds we pre-generate regl shader code here.
170+
171+
The CI pipeline will automatically detect when regl-related files have changed and
172+
run the codegen process. If the precompiled shaders are out of date, the
173+
`check-regl-codegen` job will fail and upload a `regl-codegen` artifact containing
174+
the updated files. To fix this:
175+
176+
1. Download the `regl-codegen` artifact from the failed workflow run
177+
2. Copy the updated files into your working tree
178+
3. Commit and push the changes to your pull request
179+
180+
Alternatively, you can regenerate the code locally by running:
167181

168182
```bash
169183
npm run regl-codegen
170184
```
171185

172-
to regenerate the regl code. This will prompt you to open a browser window. This will then run through all
173-
traces with 'regl' in the tags, and store the captured code into
174-
[src/generated/regl-codegen](https://github.com/plotly/plotly.js/blob/master/src/generated/regl-codegen). If no updates are necessary, it will be a no-op, but if there are changes, you will need to commit them.
175-
176-
This is needed because regl performs codegen in runtime which breaks CSP
177-
compliance, and so for strict builds we pre-generate regl shader code here.
186+
This will prompt you to open a browser window, run through all traces with 'regl'
187+
in the tags, and store the captured code into
188+
[src/generated/regl-codegen](https://github.com/plotly/plotly.js/blob/master/src/generated/regl-codegen).
189+
If no updates are necessary, it will be a no-op, but if there are changes, you
190+
will need to commit them.
178191

179192
#### Other npm scripts that may be of interest in development
180193

0 commit comments

Comments
 (0)