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

Feat: Write a comprehensive WYSIWYG Tutorial for Flutter 📝 #1

Closed
5 of 6 tasks
nelsonic opened this issue Jul 20, 2023 · 9 comments · Fixed by #2
Closed
5 of 6 tasks

Feat: Write a comprehensive WYSIWYG Tutorial for Flutter 📝 #1

nelsonic opened this issue Jul 20, 2023 · 9 comments · Fixed by #2
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or enhancement of existing functionality flutter Flutter related issues good first issue Good for newcomers help wanted If you can help make progress with this issue, please comment! priority-1 Highest priority issue. This is costing us money every minute that passes. T1d Time Estimate 1 Day technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

nelsonic commented Jul 20, 2023

This is going to be one of our biggest standalone tutorials yet but it needs to be comprehensive because we are going to use what we learn from this immediately in our App. ref: dwyl/app#275

Our WYSIWYG requirements for the App are actually quite basic dwyl/app#275 (comment)
but we need to be able to add our own custom buttons+actions so please have that in mind when researching. 🔍

Todo

  • Create a new Flutter App. 🆕
  • Research and share the available WISYWIG libraries. 🔍
  • Implement the most promising lib that will allow us to meet our objectives:

The single most important requirement that won't immediately be clear from the the WYSIWIG title
is actually how the data gets transformed when you apply an action. 🪄
See: https://github.com/dwyl/deltamin

The USP of what we are building is to have the full history of every action that is taken
thus having full "undo" capability and "replay-ability".
Therefore we need to not just have a WISYWIG lib, we need one that gives us Operational Transform
So that we can easily store the "story" of what has happened to an item
and can replay it both on the connected devices and to future team members
when they need an answer to the question: "How did we get here?"

Which is why I'm leaning toward: https://github.com/singerdmx/flutter-quill or https://pub.dev/packages/quill_html_editor
which both implement Quill which has Delta.

Yes, I know that YJS is the new "hotness" in this space.
The demos are sick: https://yjs.dev/#demos
But there isn't anything in Dart we can use for our Flutter App right now ...
Given that Delta is just a description language, it should be fairly easy to port to anything else in the future ... 💭
So I don't have any "concerns" with using it for now.

@nelsonic nelsonic added documentation Improvements or additions to documentation enhancement New feature or enhancement of existing functionality good first issue Good for newcomers help wanted If you can help make progress with this issue, please comment! flutter Flutter related issues technical A technical issue that requires understanding of the code, infrastructure or dependencies T1d Time Estimate 1 Day priority-1 Highest priority issue. This is costing us money every minute that passes. labels Jul 20, 2023
@nelsonic nelsonic moved this to 🔖 Ready for Development in dwyl app kanban Jul 21, 2023
@nelsonic
Copy link
Member Author

@LuchoTurtle as soon as you're done with dwyl/flutter-date-time-tutorial#1 please take a look at this. It's probably more than T1d ... but we really need to time-box the work to not go down too much of a rabbit hole. 🐇

Remember our goal for _this repo is fairly basic: "How add an extensible WYSIWYG editor to a Flutter app".
We don't need to build a full-on Google Docs clone. Just the basics for now so we can ship this in our App. 📱 :shipit: 🙏

@nelsonic
Copy link
Member Author

A good preparation or side-quest for working on this might be to understand the Delta format by taking a look at: dwyl/deltamin#10 💭

@LuchoTurtle
Copy link
Member

I'm going to pick up on this now since dwyl/deltamin#10 is already completed.

I've been scouring through the documentation of https://github.com/singerdmx/flutter-quill and inclusively watched all of the videos from https://www.youtube.com/playlist?list=PLbhaS_83B97vONkOAWGJrSXWX58et9zZ2 and I think this is perhaps the best editor we could/should go for given the requirements you've stated.

In light of the above, this is why I believe flutter-quill is probably our best choice. Don't get me wrong, https://github.com/the-airbender/quill_html_editor is also a great choice but flutter-quill appears to have more dev activity and appears easier to test.

I've tried to look for other options other than the two mentioned but they pale in comparison:

Forked version?

https://github.com/visual-space/visual-editor, a forked version of flutter-quill. This one is quite interesting. The reasoning for the owner of the repo to fork the original repo is explicitly stated in https://github.com/visual-space/visual-editor/blob/develop/QUILL_FORK.md.
Having perused the code, it's much better structured and better documented than its counterpart. The only thing that is keeping me from making a final decision between the forked version and the original version is activity.
While flutter-quill had code commits 2 weeks ago, visual-editor had this 4 months ago.

@nelsonic , what do you think it's best? Maybe this repo would be a great opportunity to try both and see how they fare in terms of testing and compatibility with our requirements.

@LuchoTurtle LuchoTurtle moved this from 🔖 Ready for Development to 🏗 In progress in dwyl app kanban Aug 14, 2023
@nelsonic
Copy link
Member Author

@LuchoTurtle agree with trying both if it doesn't add toooo much time.
The visual-editor looks like it has some good added features.
But I'm weary of using something that doesn't appear to have any automated testing ...
https://github.com/visual-space/visual-editor/actions
image

Still think that flutter-quill has what we need for the foreseeable future.

LuchoTurtle added a commit that referenced this issue Aug 17, 2023
LuchoTurtle added a commit that referenced this issue Aug 21, 2023
LuchoTurtle added a commit that referenced this issue Aug 21, 2023
LuchoTurtle added a commit that referenced this issue Aug 23, 2023
LuchoTurtle added a commit that referenced this issue Aug 23, 2023
LuchoTurtle added a commit that referenced this issue Aug 23, 2023
@LuchoTurtle
Copy link
Member

Nice.
Having seen https://github.com/visual-space/visual-editor#custom-embeds, the examples shown seem to work on the web with images. So it's a good sign that I might now have to deal with the frustration that I'm currently having with image embeds in the web with the original repo.

@adrian-moisa
Copy link

adrian-moisa commented Aug 24, 2023

Hey guys, I'm the lead dev at Visual Editor. If you have any questions feel free to ask. Current status of the project: slight hiatus because we are working on our own startup's go live preparations. The editor is far from dead. We have a lot more work planned ahead. I'd be happy to have more friends join the repo/effort. If you are interested in getting knees deep in the codebase I can provide the support. I've also made extensive effort to document the Quill codebase. The md's are not complete but it's a far cry from the Quill repo. I've got a discord server where I keep in touch with other followers of the VE project. You'll find the link on our github readme. And I say we because my team has 5 members, all familiar and able to make contributions in Visual Editor. Btw, where can I learn more about your project?

Edit Managed to find the roadmap. Nice work there! https://github.com/dwyl/product-roadmap#why-are-we-building-an-app - You'll be happy to learn that on the VE roadmap we have hashtags, handles, slash commands and typing shortcuts. I guess you'll find them super useful. Also VE has Highlights and Markers. These were added after forking from Quill. You'll need them as well. Plus we have a lot of demo pages to showcase all the features.

LuchoTurtle added a commit that referenced this issue Aug 31, 2023
LuchoTurtle added a commit that referenced this issue Aug 31, 2023
LuchoTurtle added a commit that referenced this issue Sep 5, 2023
LuchoTurtle added a commit that referenced this issue Sep 5, 2023
LuchoTurtle added a commit that referenced this issue Sep 5, 2023
LuchoTurtle added a commit that referenced this issue Sep 5, 2023
LuchoTurtle added a commit that referenced this issue Sep 5, 2023
LuchoTurtle added a commit that referenced this issue Sep 5, 2023
LuchoTurtle added a commit that referenced this issue Sep 5, 2023
@nelsonic
Copy link
Member Author

nelsonic commented Sep 6, 2023

@LuchoTurtle looks like you've hit a brick wall when it comes to testing with flutter-quill 😢
Please record a quick screencast (30sec - 1min) of the problem you are facing (what you showed me on standup)
and share it on the issue you opened: singerdmx/flutter-quill#1389
Then leave a quick paragraph in the README.md describing why it's difficult to improve test coverage and linking to the issue. Then assign the PR to me and we will merge it ASAP.
Then get straight to work on replacing flutter-quill with visual-editor: #3
Start by adding CI to the repo: visual-space/visual-editor#227
that will give you a chance to familiarise yourself with the codebase and open any follow-up issues.
It should be a straightforward replacement given that one is a fork of the other ...
But if it isn't, please comment liberally on the issue: #3

For the avoidance of any further doubt: We definitely don't want to embed images in an item ever.
We want to always upload to a image hosting service (currently S3) and then link that image using markdown:

![porter-200](https://factorymethod.uk/image.png?mode=fill&width=200&height=200&origin=https://world-celebs.com/public/media/resize/800x-/2019/8/5/porter-robinson-3.jpg)

porter-200

Embedding images means the data of the image is stored inside the PostgreSQL database.
That costs us 10x* more cash and clogs up the DB making it slower with exactly zero advantage.

Note: Yes, I know that it makes it more "offline friendly" to embed the image. But the cost does not justify that benefit.
Please just follow GitHub example and upload the image and link to the ![img](url) in the body.

LuchoTurtle added a commit that referenced this issue Sep 6, 2023
LuchoTurtle added a commit that referenced this issue Sep 6, 2023
@adrian-moisa
Copy link

This should help: Migration - A simple guide with instructions to migrate from Flutter Quill. Maybe it's slightly out of date. Overall the process should not be headache inducing.

nelsonic added a commit that referenced this issue Sep 16, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in dwyl app kanban Sep 16, 2023
nelsonic added a commit that referenced this issue Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or enhancement of existing functionality flutter Flutter related issues good first issue Good for newcomers help wanted If you can help make progress with this issue, please comment! priority-1 Highest priority issue. This is costing us money every minute that passes. T1d Time Estimate 1 Day technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants