-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New sketch page layout and previews #39
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pouretrebelle/jigsaws/EWBdyYLVsaqwQ1AwZeDk6V2L5DuM |
6d8d3a3
to
9c5a126
Compare
9c5a126
to
a4c071c
Compare
a4c071c
to
b7edc21
Compare
db012c6
to
ebdb72d
Compare
ebdb72d
to
f51f459
Compare
f51f459
to
5e723f9
Compare
e2a4f8a
to
39c80c5
Compare
abd9cb4
to
8c38cfc
Compare
The hsl notation with the alpha channel was working in the browser but not with node-canvas. I spotted this because the node-canvas outputs of 029 were much more saturated than expected.
I was getting 500s on the lambda with the error 'cannot open shared object file: No such file or directory', it looks like it's something to do with node-canvas so here's a weird hack. Automattic/node-canvas#1448 (comment) vercel/vercel#3460 (comment) Added zlib-devel after 'Error: /lib64/libz.so.1: version `ZLIB_1.2.9' not found' error on above changes'
I'm still getting binary build errors from node-canvas, this fix is recommended here Automattic/node-canvas#1448 (comment)
It's impossible to read files in serverless functions from outside the src folder. I've tried a lot of things, including various import workarounds and converting the api route into a separate lambda. This is the most elegant solution for now. See: - vercel/next.js#8251 - vercel/next.js#8251 (comment) - vercel/vercel#3083 (comment)
Vercel has a 10s maximum execution time on hobby plans, so more complex puzzle previews may time out. This adds a cute little sad face if that happens, and improves handling of the loader timeout. See: - https://vercel.com/docs/platform/limits#serverless-function-execution-timeout - https://vercel.com/docs/platform/limits#general-limits
This includes the context.getTransform method which is needed in the preview lambda See: - Automattic/node-canvas#1769 - https://github.com/Automattic/node-canvas/blob/HEAD/CHANGELOG.md#280
On Windows this was copying into src/.temp/sketches/000 but on remote I think it was copying into src/.temp/000, Brian thinks this may fix it.
08c49a2
to
1c0bb35
Compare
1c0bb35
to
fe1e770
Compare
fe1e770
to
62d77f1
Compare
731d93f
to
f99bf0f
Compare
I really want to ship these layout changes but continue to have issues with zlib (see Automattic/node-canvas#1779) which I won't have the capacity to investigate or solve for at least a few weeks. Hiding these features and merging until I can look into it fully.
f99bf0f
to
7eff3cf
Compare
Going to merge this now without my wonderful preview sketches because I want the new layout and this is getting stale. I'll find that zlib fix if it's the last thing I do (but maybe not for a few weeks). |
Blockers for merge:
Next.js API routes (and pages) should support reading files vercel/next.js#8251Workarounds b0ab7b1 aa7de56 f717eba