diff --git a/.gitignore b/.gitignore index 6b87759f..31a70ceb 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,6 @@ example/ios/Podfile.lock !**/ios/**/default.pbxuser !**/ios/**/default.perspectivev3 pubspec.lock + +# For local development +pubspec_overrides.yaml \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index eac64dd2..9383c4b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [8.2.6] +- Organize `QuillRawEditor` code + ## [8.2.5] - Add `builder` property in the `QuillEditorConfigurations` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 36907521..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,3 +0,0 @@ -# Contributing - -We welcome contributions! \ No newline at end of file diff --git a/README.md b/README.md index 472313f9..7d2892e2 100644 --- a/README.md +++ b/README.md @@ -297,7 +297,7 @@ Made with [contrib.rocks](https://contrib.rocks). We welcome contributions! -Please follow these guidelines when contributing to our project. See [CONTRIBUTING.md](./CONTRIBUTING.md) for more details. +Please follow these guidelines when contributing to our project. See [CONTRIBUTING.md](./doc/CONTRIBUTING.md) for more details. [Quill]: https://quilljs.com/docs/formats [Flutter]: https://github.com/flutter/flutter diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md new file mode 100644 index 00000000..b341acb1 --- /dev/null +++ b/doc/CONTRIBUTING.md @@ -0,0 +1,56 @@ +# Contributing + +The contributions are more than welcome!
+This project will be better with the open-source community help + +There are no guidelines for now. +This page will be updated in the future. + +## Steps to contributing + +You will need GitHub account as well as git installed and configured with your GitHub account on your machine + +1. Fork the repository in GitHub +2. clone the forked repository using `git` +3. Add the `upstream` repository using: + ``` + git remote add upstream git@github.com:singerdmx/flutter-quill.git + ``` +4. Open the project with your favorite IDE, we suggest using [IntelliJ IDEA Community Edition](https://www.jetbrains.com/idea/download/) +5. Sync the project with Gradle +6. Create a new git branch and switch to it using: + + ``` + git checkout -b your-branch-name + ``` + The `your-branch-name` is your choice +7. Make your changes +8. If you are working on changes that depend on different library in the same repo, then in that directory copy `pubspec_overrides.yaml.g` which exists in all the libraries (`flutter_quill_test` and `flutter_quill_extensions` etc..) +to `pubspec_overrides.yaml` which will be ignored by `.gitignore` and it will be used by dart pub to override the libraries + ``` + cp pubspec_overrides.yaml.g pubspec_overrides.yaml + ``` + or save some time and the following script: + ``` + ./scripts/enable_local_dev.sh + ``` +10. Test them in the [example](../example) and add changes in there if necessary +11. Mention the new changes in the [CHANGELOG.md](../CHANGELOG.md) in the next block +12. When you are done to send your pull request, run: + ``` + git add . + git commit -m "Your commit message" + git push origin your-branch-name + ``` + this will push the new branch to your forked repository +13. Now you can send your pull request either by following the link that you will get in the command line or open your +forked repository, and you will find an option to send the pull request, you can also +open the [Pull Requests](https://github.com/singerdmx/flutter-quill) tab and send new pull request +1. Please wait for the review, and we might ask you to make more changes, then run: +``` +git add . +git commit -m "Your new commit message" +git push origin your-branch-name +``` + +Thank you for your time and efforts to this open-source community project!! \ No newline at end of file diff --git a/flutter_quill_extensions/README.md b/flutter_quill_extensions/README.md index bbb75671..d85e0f32 100644 --- a/flutter_quill_extensions/README.md +++ b/flutter_quill_extensions/README.md @@ -241,7 +241,7 @@ OnDragDoneCallback get _onDragDone { We welcome contributions! -Please follow these guidelines when contributing to our project. See [CONTRIBUTING.md](./../CONTRIBUTING.md) for more details. +Please follow these guidelines when contributing to our project. See [CONTRIBUTING.md](./../doc/CONTRIBUTING.md) for more details. ## License diff --git a/flutter_quill_extensions/pubspec.yaml b/flutter_quill_extensions/pubspec.yaml index 4a88c192..04fce298 100644 --- a/flutter_quill_extensions/pubspec.yaml +++ b/flutter_quill_extensions/pubspec.yaml @@ -42,13 +42,6 @@ dependencies: meta: ^1.9.1 cross_file: ^0.3.3+6 -# In case you are working on changes for both libraries -# Comment the dependency_overrides section when publishing the package, -# then uncomment it back, this will be automated later -dependency_overrides: - flutter_quill: - path: ../ - dev_dependencies: flutter_test: sdk: flutter diff --git a/flutter_quill_extensions/pubspec_overrides.yaml.g b/flutter_quill_extensions/pubspec_overrides.yaml.g new file mode 100644 index 00000000..5593142e --- /dev/null +++ b/flutter_quill_extensions/pubspec_overrides.yaml.g @@ -0,0 +1,3 @@ +dependency_overrides: + flutter_quill: + path: ../ \ No newline at end of file diff --git a/flutter_quill_test/README.md b/flutter_quill_test/README.md index ea602306..f18ad9ca 100644 --- a/flutter_quill_test/README.md +++ b/flutter_quill_test/README.md @@ -38,7 +38,7 @@ await tester.quillEnterText(find.byType(QuillEditor), 'test\n'); We welcome contributions! -Please follow these guidelines when contributing to our project. See [CONTRIBUTING.md](./../CONTRIBUTING.md) for more details. +Please follow these guidelines when contributing to our project. See [CONTRIBUTING.md](./../doc/CONTRIBUTING.md) for more details. ## License diff --git a/flutter_quill_test/pubspec.yaml b/flutter_quill_test/pubspec.yaml index 6212f397..1cb77744 100644 --- a/flutter_quill_test/pubspec.yaml +++ b/flutter_quill_test/pubspec.yaml @@ -26,20 +26,12 @@ environment: dependencies: flutter: sdk: flutter - flutter_quill: ^8.2.4 + flutter_quill: ^8.2.5 flutter_test: sdk: flutter dev_dependencies: flutter_lints: ^3.0.1 -# In case you are working on changes for both libraries -# Comment the dependency_overrides section when publishing the package, -# then uncomment it back, this will be automated later -# dependency_overrides: -# flutter_quill: -# path: ../ - - flutter: uses-material-design: true diff --git a/flutter_quill_test/pubspec_overrides.yaml.g b/flutter_quill_test/pubspec_overrides.yaml.g new file mode 100644 index 00000000..5593142e --- /dev/null +++ b/flutter_quill_test/pubspec_overrides.yaml.g @@ -0,0 +1,3 @@ +dependency_overrides: + flutter_quill: + path: ../ \ No newline at end of file diff --git a/lib/flutter_quill.dart b/lib/flutter_quill.dart index 7f5f6459..a65afc7a 100644 --- a/lib/flutter_quill.dart +++ b/lib/flutter_quill.dart @@ -28,6 +28,7 @@ export 'src/widgets/editor/editor.dart'; export 'src/widgets/embeds.dart'; export 'src/widgets/link.dart' show LinkActionPickerDelegate, LinkMenuAction; export 'src/widgets/raw_editor/raw_editor.dart'; +export 'src/widgets/raw_editor/raw_editor_state.dart'; export 'src/widgets/style_widgets/style_widgets.dart'; export 'src/widgets/toolbar/base_toolbar.dart'; export 'src/widgets/toolbar/toolbar.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index cdc8db7c..755f37d0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor built for the modern Android, iOS, web and desktop platforms. It is the WYSIWYG editor and a Quill component for Flutter. -version: 8.2.5 +version: 8.2.6 homepage: https://1o24bbs.com/c/bulletjournal/108 repository: https://github.com/singerdmx/flutter-quill @@ -51,10 +51,6 @@ dependencies: flutter_animate: ^4.2.0+1 meta: ^1.9.1 -dependency_overrides: - flutter_quill_test: - path: ./flutter_quill_test - dev_dependencies: flutter_lints: ^3.0.1 flutter_test: diff --git a/pubspec_overrides.yaml.g b/pubspec_overrides.yaml.g new file mode 100644 index 00000000..0c0f849c --- /dev/null +++ b/pubspec_overrides.yaml.g @@ -0,0 +1,3 @@ +dependency_overrides: + flutter_quill_test: + path: ./flutter_quill_test \ No newline at end of file diff --git a/before-push.sh b/scripts/before-push.sh similarity index 100% rename from before-push.sh rename to scripts/before-push.sh diff --git a/scripts/disable_local_dev.sh b/scripts/disable_local_dev.sh new file mode 100755 index 00000000..b0d80b57 --- /dev/null +++ b/scripts/disable_local_dev.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +echo "" + +echo "Disable local development for flutter_quill:" +rm pubspec_overrides.yaml + +echo "" + +echo "Enable local development for flutter_quill_extensions:" +rm flutter_quill_extensions/pubspec_overrides.yaml + +echo "" + +echo "Enable local development for flutter_quill_test:" +rm flutter_quill_test/pubspec_overrides.yaml + +echo "" + +echo "Local development for all libraries has been disabled, please 'flutter pub get' for each one of them" \ No newline at end of file diff --git a/scripts/enable_local_dev.sh b/scripts/enable_local_dev.sh new file mode 100755 index 00000000..adafd237 --- /dev/null +++ b/scripts/enable_local_dev.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +echo "" + +echo "Enable local development for flutter_quill:" +cp pubspec_overrides.yaml.g pubspec_overrides.yaml + +echo "" + +echo "Enable local development for flutter_quill_extensions:" +cp flutter_quill_extensions/pubspec_overrides.yaml.g flutter_quill_extensions/pubspec_overrides.yaml + +echo "" + +echo "Enable local development for flutter_quill_test:" +cp flutter_quill_test/pubspec_overrides.yaml.g flutter_quill_test/pubspec_overrides.yaml + +echo "" + +echo "Local development for all libraries has been enabled, please 'flutter pub get' for each one of them" \ No newline at end of file