Skip to content
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

Merged
merged 36 commits into from
Jun 27, 2021
Merged

New sketch page layout and previews #39

merged 36 commits into from
Jun 27, 2021

Conversation

pouretrebelle
Copy link
Owner

@pouretrebelle pouretrebelle commented Apr 23, 2021

Blockers for merge:


  • New sketch page layout
  • Live sketch lambda-rendered previews
  • Adding pieces + solve meta
  • Update archive page layout

image

@vercel
Copy link

vercel bot commented Apr 23, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pouretrebelle/jigsaws/EWBdyYLVsaqwQ1AwZeDk6V2L5DuM
✅ Preview: https://jigsaws-git-spike-new-layout-pouretrebelle.vercel.app

@pouretrebelle pouretrebelle changed the title spike: Play with new sketch page layout New sketch page layout May 2, 2021
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.
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.
@pouretrebelle
Copy link
Owner Author

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).

@pouretrebelle pouretrebelle marked this pull request as ready for review June 27, 2021 19:22
@pouretrebelle pouretrebelle merged commit cf9a2aa into main Jun 27, 2021
@pouretrebelle pouretrebelle deleted the spike/new-layout branch June 27, 2021 19:22
@pouretrebelle pouretrebelle mentioned this pull request Aug 1, 2021
5 tasks
@pouretrebelle pouretrebelle mentioned this pull request Sep 3, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant