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

[wip] refactor playground editor #76

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ahdinosaur
Copy link
Owner

@ahdinosaur ahdinosaur commented Oct 6, 2023

TODO:

  • types
    • span
      • sourceId
      • from
      • to
    • label
      • span
      • message
    • note
      • message
    • report
      • id
      • span
      • labels
      • notes
  • understand state of codemirror/diagnostic
  • state
    • reports
    • activeReportId
  • remove diagnostic panel from codemirror/diagnostic
  • add similar panel as React component
    • using react-resplit for a resizable panel
    • using Chakra List for correct aria attributes
  • decide on keyboard shortcuts to navigate diagnostics
  • decide on which messages (transactions or effects) can be sent to CodeMirror diagnostics
    • setReports
    • setActiveReportId
  • decide on what state will be received back
    • activeReportId

rendering a diagnostic report:

{span} : {message}

{labels.map(({ span, message }) => (
  {span} : { message}
)}

click on a span, and your cursor highlights the span range.

@ahdinosaur ahdinosaur added the work in progress This is currently being worked on label Oct 6, 2023
@vercel
Copy link

vercel bot commented Oct 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rimu-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2023 3:05am
rimu-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2023 3:05am

@ahdinosaur
Copy link
Owner Author

i should see how vscode does error messages. keen to find multi-span error diagnostics in the wild. here's something interesting: microsoft/TypeScript#25257

@ahdinosaur
Copy link
Owner Author

ahdinosaur commented Oct 7, 2023

is there a way to use CodeMirror Tooltips with React Portals? or we just render the tooltip with a standalone React render.

uses CodeMirror view.hoverTooltip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress This is currently being worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant