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

Add CodeArea to Wirecloud #537

Merged
merged 16 commits into from
Jun 5, 2024
Merged

Add CodeArea to Wirecloud #537

merged 16 commits into from
Jun 5, 2024

Conversation

oxixes
Copy link
Contributor

@oxixes oxixes commented Mar 11, 2024

Proposed changes

Adds a CodeArea styled element that is a full-fledged code editor supporting syntax highlighting of many languages and code completion of a few. Additionally, this allows the use of CodeArea as a preference type for widgets/operators (allowing to specify the language) as well as TextArea.

For this to be possible, the monaco editor has been used (MIT License), which is the same that VS Code uses (it is extracted from its source code). In case monaco fails to load, the CodeArea will be a simple TextArea.

Types of changes

What types of changes does your code introduce to the project:

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation
  • Any dependent changes have been merged and published in downstream modules

Further comments

For monaco to be loaded, webpack has been used. A script was created so that a single command (docs in README) can build monaco and prepare it for Wirecloud.

This is still a work in progress, as tests are still missing. This is ready for review.

Happy coding!

@coveralls
Copy link

coveralls commented Mar 11, 2024

Coverage Status

coverage: 88.985% (+0.001%) from 88.984%
when pulling 20dd55e on oxixes:v2-editor
into 01e171a on Wirecloud:develop.

@oxixes oxixes marked this pull request as ready for review March 14, 2024 14:03
@oxixes oxixes marked this pull request as draft March 14, 2024 16:57
@oxixes oxixes marked this pull request as ready for review March 16, 2024 16:37
@aarranz aarranz merged commit b197d37 into Wirecloud:develop Jun 5, 2024
36 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants