-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: add template #3032
base: main
Are you sure you want to change the base?
feat: add template #3032
Conversation
- added Template service to create/use template - updated Rust code to return id after adding db
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3032 +/- ##
==========================================
+ Coverage 9.70% 64.77% +55.07%
==========================================
Files 685 540 -145
Lines 31812 25369 -6443
==========================================
+ Hits 3086 16434 +13348
+ Misses 28726 8935 -19791
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@LucasXu0 I was able to add the test for exporting a template. I tested a lot of methods for writing tests for the import method, but it doesn't work as expected. I am prompted with a FilePicker even though I have mocked it. Could you please assist me in writing tests for importing a template. |
@AmanNegi , amazing work! The video is very helpful! Thanks for creating it. |
Hey, @AmanNegi. Did it still fail after the discussion in Discord? |
Yes, I have actually left the test's code for importing the template so you could help me diagnose the problem with the test. |
frontend/appflowy_flutter/integration_test/document/document_template_test.dart
Outdated
Show resolved
Hide resolved
frontend/appflowy_flutter/lib/plugins/document/application/template_service.dart
Outdated
Show resolved
Hide resolved
frontend/appflowy_flutter/lib/plugins/document/application/template_service.dart
Outdated
Show resolved
Hide resolved
frontend/appflowy_flutter/lib/plugins/document/application/template_service.dart
Outdated
Show resolved
Hide resolved
- Added import tests. - Placed add template in correct place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AmanNegi , could you add a project doc to the documentation for the templates?
- Template feature now supports nested pages. - ConfigService added which generates config.json which acts as the controller for exporting/importing a template. - Supports importing and exporting. - Template tests added.
Progress so far:template.mp4Changes:
Upcoming:
|
frontend/appflowy_flutter/integration_test/util/common_operations.dart
Outdated
Show resolved
Hide resolved
frontend/appflowy_flutter/integration_test/document/document_template_test.dart
Show resolved
Hide resolved
- support images in templates - mitigate file naming conflicts - fix positioning of template action buttons - add strings i8n - update outdated tests
Update:
Demo:template_update.mp4cc: @LucasXu0 |
@Xazin I have fixed the merge conflict now and synced it with the |
- fixed template test
@AmanNegi Is it possible to compress the files when the user shares the template? That way the user doesn't have to go ahead and compress the files after sharing the template. |
@rileyhawk1417 definitely, that's how it will work. The files will be converted to a zip, as soon as we are done with the exporting process. |
…-create-template
Here's a major update on the Template feature. After the nested pages feature release in AppFlowy, several things have changed, and thus the requirement for updates to the Template feature. ✨ Now we support ✨
Demo 📹📱These features and others have been thoroughly tested and displayed by me on YouTube (because the video was too large). You can find the video link below: PS: The updated code will be pushed soon! |
- add support for nested docs - add support for online/offline images - add support for references and displays of grids
…to feat-create-template
Issue: Add Template in AppFlowy
Fixes #444
This Issue basically aims at adding the template feature in AppFlowy. This allows users to export their documents as templates and share them with others meanwhile, others can simply import the template to achieve the same structure. A further feature request may add the feature to add a Template Marketplace to AppFlowy as well.
Major Challenges
PR Checklist