iodide-project / iodide-editor-webextension Goto Github PK
View Code? Open in Web Editor NEWA browser extension designed to allow Iodide to communicate with client-side text editors
A browser extension designed to allow Iodide to communicate with client-side text editors
I'm playing with Atom's editor now as I can't find much about changes tracking in vscode, but all of a sudden I'm wondering whether it makes sense to have a websocket server included in each plugin. It would continue to greatly simplify setup, but also it means that there's redundancy where there doesn't have to be? More thoughts are appreciated here.
@bcolloran @hamilton
I thought I would create an issue to discuss the question of granularity for the extension to support. In reality, I now know enough about the code base to support single char deletion and insertion all the way up to just slapping the whole editor buffer into Iodide any time something happens in the external editor. I'm not suggesting that the latter be our approach, but I want to convey the full range of options.
That said, I would like to use whole buffer updates to initially cover some of the more problematic edge cases. For instance, line by line or char by char updates are fine when working within existing content of an editor. When the line count is changed and lines effectively shift their numbering is when this gets to be tricky. An option to tackle this could be creating more types of message to be sent from the external editor to iodide. However, I figure it would make the most sense that the documentation suggests and the proof of concept implements a case where deletion and insertion events on the line by line scale trigger whole buffer updates.
So here's a question: can we imagine scenarios when this would be the wrong thing to do? In cases where the document being worked on is very large this could present a problem, but I haven't tried to test out what the performance hits are when working with a large document. I can make that a todo though. Any thoughts to add here?
Also, is it wise to keep the api in #1 as slim as possible? Or would it be ultimately better to have messages that the editor plugin can share when these specific events occur? It'd be more things that people would have to implement when creating new external editor plugins too.
Anyways, I'm just putting some questions out there to get your inputs. Thanks!
This issue relates to an attempt to send information about multicharacter ranges to iodide from the external editor. What has me the most stuck at the moment is where to start in terms of creating a reducer that can actually access and make calls to the monaco editor instance running in the Iodide Notebook. @bcolloran any thoughts to offer here?
Messages that the webextension should listen for from text-editor-plugins
{ type: “REPLACE_ALL_JSMD”, textContent }
{ type: “INSERT_TEXT”, cursorPosition, text }
{ type: “DELETE_TEXT”, cursorPosition, numCharsToDelete }
{ type: “EVALUATE_CHUNK”, cursorPosition }
Messages that the webextension would send to text-editor-plugins from iodide
{ type: “TEXT_UPDATE_FROM_IODIDE”, textContent }
for some reason this triggers both a deletion and then an insertion both with text == ""
It will be noted that errors in connection can leave the python socket server up and running in the background, and lsof -i :9876 is required to find the process to kill.
Investigation is needed to find out how to shut down cleanly when certificates errors or other problems are encountered.
typing "ee" and then using the vim vscode extension "yy" to yank the line then "5p" to paste the line 5x leads to only 2 lines showing in Iodide.
This Mozilla repository has been identified as lacking a license. Consistent with Mozilla's Licensing Policy an open source license should be applied to the code in this repository.
Please add an appropriate LICENSE.md file to the root directory of the project. In general, Mozilla's licensing policies are as follows:
Client-side products created by Mozilla employees or contributors should use the Mozilla Public License, Version 2.0 (MPL).
Server-side products or utilities that support Mozilla products may use either the MPL or the Apache License 2.0 (Apache 2.0).
In special cases, another license might be appropriate. If the repository is a fork of another repository it must apply the license of the original. Similarly, another license might be appropriate to match that of a broader project (for example Rust crates that Firefox depends on are published under an Apache 2.0 / MIT dual license, as that is the dual license used by the Rust programming language and projects).
Please ensure that any license added to the LICENSE.md file matches other licensing information in the repository (for example, it should match any license indicated in a setup.py or package.json file).
Mozilla staff can access more information in our Software Licensing Runbook – search for “Licensing Runbook” in Confluence to find it.
If you have any questions you can contact Daniel Nazer who can be reached at dnazer on Mozilla email or Slack.
OPENLIC-2023-01
Want the extension to be able to connect to the editor at any point and sync the content of the notebook to the editor, or vice versa
In order for the neovim plugin to actually connect to the browser socket with wss: these files must be created and placed in the /tmp directory of the computer running the external editor. It isn't clear to me whether these are files each user should create or have included in the repo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.