-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Board editor: export position as image #14551
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for the PR.
I actually interpreted the linked issue to mean when they share the link on a service that shows an OpenGraph preview, to show the thumbnail. That's why I mentioned the og:image meta tag. But now that I re-read it, I suppose it's not clear and it could be interpreted the way you did too :)
ui/editor/src/ctrl.ts
Outdated
| } | ||
|
|
||
| makeImageUrl(fen: string, orientation: Color = 'white'): string { | ||
| const url = `https://lichess1.org/export/fen.gif?fen=${fen}&color=${orientation}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ui/editor/src/ctrl.ts
Outdated
| } | ||
|
|
||
| makeImageUrl(fen: string, orientation: Color = 'white'): string { | ||
| const url = `https://lichess1.org/export/fen.gif?fen=${fen}&color=${orientation}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you url encode the FEN string? either with underscores like the URL above it has or urlencoding.
ui/editor/src/view.ts
Outdated
| }), | ||
| ]), | ||
| h('p', [ | ||
| h('strong.name', 'IMAGE'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to align the labels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of showing the raw URL would be nicer to have the same design as under game analysis, shown here #14551 (comment)
|
Thanks for the feedback. I will make sure to implement these changes |
|
Looks good. Yeah how about "Image" as the label and then re-use button on the right |
* master: New Crowdin updates (lichess-org#14547) don't add json null field Game json: division - don't send null multiboard eval tick: remove unncesseray inlined style/CSS attribute Added visual indicator for showing advantage in mini-board broadcast monitor firebase data msgs separately fix push notification recipient add game division to game json export add source field to game json export only export reports created by the player fix typos scalachess 15.7.6 Acpl chart: live update and spinner for studies
Displays the url for the image which can be easily copy and pasted. URL updates as the position is updated. I think its probably better than displaying the image itself as that might mess up the UI. Close #14521
