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

Improve layout of code blocks #191

Open
andymatuschak opened this issue Apr 25, 2021 · 0 comments
Open

Improve layout of code blocks #191

andymatuschak opened this issue Apr 25, 2021 · 0 comments
Labels
🚩 Help wanted Particularly amenable/appropriate for contributors 🗂 Polish Type: Polish opportunity (rough visual edges, perf hiccups)

Comments

@andymatuschak
Copy link
Owner

andymatuschak commented Apr 25, 2021

Lines probably shouldn't wrap so much with code blocks. Probably this means that code blocks should use fairly different text metrics than the rest of the prompt.

image

To reproduce

  1. Run: cd packages/ui; yarn storybook
  2. Visit http://localhost:6006/?path=/story/card--basic
  3. Press "A" to open the addons view if necessary, then enter the following into the prompt field:
{"promptType":"qaPrompt","question":{"contents":"What's wrong with this implementation of `sum`?\n\n```\nfunction sum(list: number[]): number {\n    return list.reduce((number, total) => number + total)\n}\n```","attachments":[]},"answer":{"contents":"The arguments to `reduce` are reversed.","attachments":[]}}
@andymatuschak andymatuschak added 🗂 Polish Type: Polish opportunity (rough visual edges, perf hiccups) 🚩 Help wanted Particularly amenable/appropriate for contributors labels Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚩 Help wanted Particularly amenable/appropriate for contributors 🗂 Polish Type: Polish opportunity (rough visual edges, perf hiccups)
Projects
None yet
Development

No branches or pull requests

1 participant