visual-editor
xilem
visual-editor | xilem | |
---|---|---|
10 | 14 | |
268 | 2,798 | |
- | 5.8% | |
4.0 | 8.9 | |
7 days ago | 2 days ago | |
Dart | Rust | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
visual-editor
-
I believe you'll find this presentation as great food for thought. I'm presenting the various challenges of designing the state store for a rich text library in Flutter. The public API of the library imposes quite some serious limitations which were quite challenging to bypass.
A few words about Visual Editor. This editor is built around the powerful Quilljs Delta document format originally developed by QuillJs. Delta documents can be easily converted to JSON, the encoding is easy to read and modify and offers many extensibility options.
-
Rich Text Editor with support for \t tabs
There's a fork of flutter_quill called visual-editor. It switches to the next widget in the focus sequence, which is one way to properly handle the key.
-
Suitable Rust GUI Library for Code Editor?
Flutter also isn't great for text editors, but there are a few implementations like visual-editor for formatted text that's acceptable. Also, the xterm package is pretty amazing from its capabilities (even runs full vim!).
-
flutter_eval v0.5: Web support, EvalPad, tear-offs, and a tale of 8,000 icons
There's visual-editor, but that one has a different focus than a programming editor.
-
I've migrated a text editor library (13K LOC) from no state management (spaghetti code) to state management. I'm sharing here my experience and a breakdown of the architectural decisions that I took (long read)
Two months ago I decided to fork the Quill rich text editor because the architecture is extremely difficult to follow. Since I desperately need for my own project, a strong rich text editor that can be easily extended with more features I took the decision to byte the bullet and refactor Quill from the ground up. There are numerous extremely good features in Quill yet the overall architecture was a total train wreck. In this article I'll be explaining in detail what were the issues and how I attempted to improve them. You can find the source code at Visual Editor Github. I've documented the entire process and I'll be releasing deep dive Flutter architecture episodes at Visual Coding YouTube. Enough shameless plugs, let's get going.
- Proiecte open source romanesti?
-
The best spaced-repetition platform that is seamlessly integrated with Youtube
You are right, we have programmed the app with Flutter and are very happy with the framework. Two years ago, when we started, many libraries were still missing in the community, especially the text editors were problematic. That's why I contributed a lot to the community to improve the status. At the moment I am very excited about the libraries SuperEditor and VisualEditor. Otherwise, the tooling with Flutter is excellent and it's a lot of fun to program with it. We programmed the server with NestJS, use a PostgreSQL database and GraphQL as the query language.
- I've decided to fork Flutter Quill Rich text editor and to do a general cleanup, add docs, tests and new features. During the refactoring I'll be recording YouTube episodes about code quality and software architecture in Flutter
-
I've decided to fork Flutter Quill Rich text editor and do a general cleanup, add docs, tests and new features. During the refactoring I'll be recording YouTube episodes about code quality and software architecture in Flutter
Visual Editor Gihub Repo - Freshly forked, already many changes, to be published in pub dev.
xilem
- Xilem – An experimental Rust architecture for reactive UI
-
Graphite: In-development raster and vector 2D graphics editor that is FOSS
The web browser gives us an extremely frictionless development and deployment process. Our CI generates a fully deploy at a unique link for every commit which lets us open and test PRs with a single click. It deploys updates to users without needing to make them go through an updater. In these relatively early stages of our development process, the importance of the velocity that gives us cannot be understated. Plus, the ability for users to try it out in one second is quite helpful.
I've designed the whole architecture specifically to avoid the web UI "feeling like a web app" with the subtle latency of interacting with the site. I wrote all-custom UI components using the minimal amount of HTML and CSS to achieve the requirements instead of depending on an external component framework which always loves nesting dozens of `div`s inside each other to achieve what should be doable in one or two. And our highly-lightweight JS which calls into Rust (Wasm) lets it keep the slow logic out of slow JS. And we are using Svelte to move most of the frontend DOM management logic from runtime to compile time. This architecture really helps us keep performance levels as close as possible to feeling native despite using the web for its GUI rendering; and I believe it has succeeded at feeling responsive by comparison to most other web apps you use (even Slack, for example, which shouldn't be nearly as complex).
Web lets us build fast, deploy the latest version to users fast, leverage prevalent developer experience with HTML/CSS for creating GUIs, and avoid getting stuck in a box with Rust's currently-immature GUI ecosystem. That's the tradeoff we had to make early on, and it was a good decision. But we will eventually move towards a fully native version...
In the short term, we plan to use [Tauri](https://tauri.app/) which is sort of a hybrid between Electron and a native application. It uses the OS's webview to shrink the shipped binary to only a few megabytes and reuse shared memory resources with other webviews at runtime. It also runs all our Rust code natively instead of through WebAssembly so all the business logic in Graphite runs natively and only the thin UI layer becomes dependent on web tech for the GUI display.
In the long term, we plan to rewrite the entire GUI in [Xilem](https://github.com/linebender/xilem) which is the up-and-coming Rust GUI that I believe will finally get everything right, including performance (which is something many desktop GUI frameworks are actually bad it, and sometimes even worse than web). We'll still deploy a web version but at that point, it will become native-first.
Hopefully that roadmap and explanation of the architectural decisions clears up any worries about the short and long term state of our GUI.
-
Is it possible to create Android apps using Rust?
That said, Xilem is very close to that idea, but it's in its very early stages and nowhere near Flutter's capabilities.
- Xilem Vector Graphics (Rust meetup talk)
-
50 Shades of Rust, or emerging Rust GUIs in a WASM world
xilem#62 demonstrates how Xilem's reactive layer can target DOM nodes.
- GUI development with Rust and GTK 4
-
Floem - yet another new Rust native UI library
Inspired by Xilem, Leptos and rui, Floem aims to be a high performance declarative UI library with minimal effort from the user.
-
XUL Layout has been removed from Firefox
There are a number of up-and-coming Rust-based frameworks in this niche:
- https://github.com/iced-rs/iced (probably the most usable today)
- https://github.com/vizia/vizia
- https://github.com/marc2332/freya
- https://github.com/linebender/xilem (currently very incomplete but exciting because it's from a team with a strong track record)
What is also exciting to me is that the Rust GUI ecosystem is in many cases building itself up with modular libraries. So while we have umpteen competing frameworks they are to a large degree all building and collaborating on the same foundations. For example, we have:
- https://github.com/rust-windowing/winit (cross-platform window creation)
- https://github.com/gfx-rs/wgpu (abstraction on top of vulkan/metal/dx12)
- https://github.com/linebender/vello (a canvas like imperative drawing API on top of wgpu)
- https://github.com/DioxusLabs/taffy (UI layout algorithms)
- https://github.com/pop-os/cosmic-text (text rendering and editing)
- https://github.com/AccessKit/accesskit (cross-platform accessibility APIs)
In many cases there a see https://blessed.rs/crates#section-graphics-subsection-gui for a more complete list of frameworks and foundational libraries)
-
What was the hardest coming from C++ to Rust?
Yeah, Druid is being replaced by Xilem, but unfortunately Xilem isn't ready yet. So that whole project's in a bit of an awkward in-between phase where there isn't really any toolkit that can be recommended.
-
Druid, a Rust-native UI toolkit, released v0.8 after two years of work by 80 contributors.
Third, we are discontinuing Druid proper. Years of experience has shown that people can struggle with the Druid data architecture and we can do better. This layer will be replaced by a new project called Xilem. We have spent a lot of time thinking about it and this decision was not taken lightly. You can read a more detailed post about the Xilem architecture but the gist of it is that we've found at a way to code UI in Rust that feels a lot more effortless than previous attempts. Xilem will look very intuitive to those familiar with state of the art toolkits such as SwiftUI, Flutter, and React, while at the same time being idiomatic Rust. Also we plan to port as many widgets from Druid to Xilem as possible, which should give the project a reasonable timeline to v0.1. Hopefully later this year.
What are some alternatives?
super_editor - A Flutter toolkit for building document editors and readers
floem - A native Rust UI library with fine-grained reactivity
flutter-quill - Rich text editor for Flutter
iced - A cross-platform GUI library for Rust, inspired by Elm
xterm.dart - 💻 xterm.dart is a fast and fully-featured terminal emulator for Flutter, with support for mobile and desktop platforms.
leptos - Build fast web applications with Rust.
Nest - A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
slint - Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
logmasker
vizia - A declarative GUI library written in Rust
PostgreSQL - Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch
druid - A data-first Rust-native UI design toolkit.