-
Notifications
You must be signed in to change notification settings - Fork 0
Let's keep Xray alive #1
Description
As posted in the original repository letting Xray die would be a real pity.
I was hoping in a response from its maintainers – I still have questions about where Memo should fit into Xray or next steps towards JS extensions, but I also believe it's time to prove the real interest from the community if there is some.
I apologise in advance if the notification for this post was undesired for some tagged users! My purpose is to gather some enthusiastic developers to help me keep Xray alive and to get maintainers' "blessing".
The purpose of this fork is mainly to show real interest, and hopefully, it will be eventually merged back.
Below, I will explain the steps that, to me, seem a natural continuation of the project.
It should be needless to say that the "roadmap" must not be taken as a given and suggestion are more than welcome!
Planning
While they are focusing on better shaping Memo, I think a good starting point would be merging the outstanding pull-requests.
-
Initial Appveyor Config atom-archive/xray#57 @chgibb
Better to push this for later (until named pipes are implemented) -
Add mouse "click and drag" to select text atom-archive/xray#107 @pranaygp
Covered in Add/implement mouse selections #3 -
Add multi cursor click selections atom-archive/xray#108 @pranaygp
-
Buffer Selection Clipping atom-archive/xray#132 @coler706
Covered in Clip selection #5 -
Fix panic at index out of bound atom-archive/xray#172 @hourann
Covered in Hourann/fix panic at index out of bound #4
Tests should be added, where needed, to ensure future proof.
Would be great to have the above PRs redirected to here!
There are few simple TODO
s around the codebase that could be implemented easily:
More complex one that may need some background:
Memo has some too. This may be sent to the main repo straight away:
To better engage the whole community, Windows support could be helpful:
- Use named pipes for Windows OSs
Along those, fixes and improvements to headless feature will be needed.
As first, the browser version should work.
-
I spent quite some time investigating this issue – I'm not a Rust expert and also not super comfortable with low-level programming. Eventually, I was able to workaround this issue setting up an overly-big frame size.
// ... let transport = codec::length_delimited::Builder::new() .max_frame_length(2 * 1024 * 1024 * 1024) // 😱 .new_framed::<_, Bytes>(socket); // ...
Still code on my local machine
The code above solve handling connection to Xray repository, but it would be great to have some help from some Rustacean that knows how to implement a streamed representation for in-memory trees, as suggested in the linked issue comment.
It would be great to add the possibility to connect the Electron app through socket as well if it is not there yet (I may have missed that).
- Headless connection from Electron
The repository is still quite small and experimental, therefore breaking changes are not a problem and until is not a real product keeping dependencies up to date should be straight forward.
-
Update JavaScript/WASM dependencies
-
xray_ui
-
xray_browser
-
xray_electron
-
xray_wasm
-
I personally think that TypeScript is a great tool to build solid production ready products. An effort will be made to move the above packages to rely on static typing, but not until the initial direction/rationale gets more clear.
The issue I found trying this out is the absence of typings for styletron
libraries – at least, until v5 will be released. Since waiting for the new version to be released wouldn't be ideal, the possibilities are two:
- write typings along the way for used
styletorn
features, or - move to a TypeScript supported CSS-in-Js library
Before even considering moving to a different library, I would love to understand the rationale
behind choosing styletorn
in the first place.
Once the current version will be totally ported to TypeScript, React should be updated – Context API, memo, hooks...
-
Context API
- Re-design App Context
- Re-design Action Context
- Re-design Theme Context
- Re-design View Context
-
Hooks
Alongside JavaScript/TypeScript migration, would be great to update Rust crates. Also here, some help from the Rust community would be great.
- Update to latest dependencies
- Migrate to 2018 edition
And now more seirous stuff where help from maitainers would definitely be needed to implement the following properly:
- Implement syntax highlight (tree-sitter)
- Implement Memo into Xray
- Refactor and enable
discussions
To make the editor a little bit usable, additional basic features are needed:
- Undo history
- Find and replace in a buffer
- Local project-wide search
- Remote project-wide search
With the above tasks completed, it should be possible to eat our own dog's food: use Xray to make Xray a hackable editor.
-
Clarify theming
-
JS extensions
- spawn-server
- Investigate Deno
I'm not sure if spawn-server was actually an initial experiment behind Xray's JS extensions, but after looking at @ry's talk about deno
I started thinking it could be a good fit for this purpose.
/cc @nathansobo @as-cii @HotelCalifornia @fuunnx @sadovnychyi @b-fuze @mikemcbride @max-sixty @Avi-D-coder @deankevorkian @Pustelto