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

CodeMirror implementation of GraphNodeComment #11585

Merged
merged 25 commits into from
Nov 21, 2024
Merged

Conversation

kazcw
Copy link
Contributor

@kazcw kazcw commented Nov 18, 2024

Pull Request Description

CodeMirror-based implementation of GraphNodeComment; removes Lexical dependency.

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

kazcw and others added 15 commits November 14, 2024 19:31
Also:
- Separate parser for our flavor of Markdown from the CodeMirror integration;
  move the parser into ydoc-shared and use for Markdown line-wrapping.
- Introduce our own version of yCollab extension; initially just the upstream
  version translated to Typescript and our code style.
- Refactor CodeEditor.
Also a little refactoring in preparation for new implementation.
Eliminates Lexical dependency. Stacked on #11575 and #31607.
@kazcw kazcw added the CI: No changelog needed Do not require a changelog entry for this PR. label Nov 18, 2024
@kazcw kazcw self-assigned this Nov 18, 2024
@kazcw kazcw marked this pull request as ready for review November 18, 2024 23:42
@kazcw kazcw mentioned this pull request Nov 19, 2024
5 tasks
@kazcw kazcw linked an issue Nov 19, 2024 that may be closed by this pull request
Comment on lines +67 to +75
{
markdown: '[Link text](<https://www.example.com/index.html>)',
expectedLinks: [
{
text: 'Link text',
href: 'https://www.example.com/index.html',
},
],
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may consider adding cases for:

  1. Link with spaces and <>
  2. Link with spaces without <> (invalid case)
    Or we may assume that those cases in image are sufficient. But then I would consider moving them here, as "link" seems to me more basic that images.

'(a@b.cd)',
],
neither: [
'https://💩.la/',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆

@kazcw kazcw added CI: Ready to merge This PR is eligible for automatic merge and removed CI: Ready to merge This PR is eligible for automatic merge labels Nov 21, 2024
@@ -48,7 +49,7 @@ export function AssetDocsContent(props: AssetDocsContentProps) {

for (const statement of module.statements()) {
if (statement instanceof ast.MutableFunctionDef && statement.name.code() === 'main') {
return statement.documentationText() ?? ''
return normalizedMarkdownToStandard(statement.mutableDocumentationMarkdown().toJSON())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we turn this into a json? We expect a md string to parse it and display

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toJSON method of Y.Text returns the unformatted text content as a string.

@kazcw kazcw added the CI: Ready to merge This PR is eligible for automatic merge label Nov 21, 2024
@jdunkerley jdunkerley merged commit 7af5403 into develop Nov 21, 2024
49 of 51 checks passed
@jdunkerley jdunkerley deleted the wip/kw/cm-comments branch November 21, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eliminate lexical dependency
4 participants