Skip to content

Commit a26a8b2

Browse files
committed
Merge branch 'master' into dev
2 parents 33e76dd + 91e4b89 commit a26a8b2

File tree

109 files changed

+2940
-826
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+2940
-826
lines changed

.github/ISSUE_TEMPLATE/3_question.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ body:
66
- type: markdown
77
attributes:
88
value: |
9-
Thank you for using Flutter Quill!
9+
If you have any suggestions or questions, feel free to share them in the [Discussions](https://github.com/singerdmx/flutter-quill/discussions) section.
1010
1111
- type: checkboxes
1212
attributes:
@@ -21,4 +21,4 @@ body:
2121
placeholder: |
2222
How do I save the images of Quill Editor?
2323
validations:
24-
required: true
24+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/workflows/publish.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,11 @@ jobs:
7474
id: release_tag
7575
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
7676

77-
- name: 📑 Fetch release notes from Github API
78-
id: fetch-release-notes-request
79-
uses: fjogeleit/http-request-action@v1
80-
with:
81-
url: https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.release_tag.outputs.tag }}
82-
method: 'GET'
83-
customHeaders: '{"Authorization": "${{ secrets.GITHUB_TOKEN }}"}'
84-
preventFailureOnNoResponse: 'false'
85-
86-
- name: ⚠️ Validate release notes response
87-
run: |
88-
releaseNotesResponse="${{ fromJson(steps.fetch-release-notes-request.outputs.response) }}"
89-
if [[ -z "$releaseNotesResponse" || "$releaseNotesResponse" == "null" ]]; then
90-
echo "Error: Release notes response is empty."
91-
exit 1
92-
fi
77+
- name: 📑 Fetch release notes from Github API and create a required file by the next step
78+
run: dart ./scripts/create_version_content_from_github_release.dart "${{ github.repository }}" "${{ steps.release_tag.outputs.tag }}"
9379

9480
- name: 📝 Update version and CHANGELOG for all the packages
95-
run: dart ./scripts/update_package_version.dart ${{ steps.extract_version.outputs.VERSION }} '${{ fromJson(steps.fetch-release-notes-request.outputs.response).body }}'
81+
run: dart ./scripts/update_package_version.dart ${{ steps.extract_version.outputs.VERSION }}
9682

9783
- name: 💾 Commit updated version and CHANGELOG
9884
id: auto-commit-action

CHANGELOG.md

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,167 @@
44

55
All notable changes to this project will be documented in this file.
66

7+
## 9.4.2
8+
9+
* Respect autofocus, closes #1923 by @Guillergood in https://github.com/singerdmx/flutter-quill/pull/1924
10+
11+
12+
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.4.1...v9.4.2
13+
14+
## 9.4.1
15+
16+
* replace base64 regex string by @salba360496 in https://github.com/singerdmx/flutter-quill/pull/1919
17+
18+
## New Contributors
19+
* @salba360496 made their first contribution in https://github.com/singerdmx/flutter-quill/pull/1919
20+
21+
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.4.0...v9.4.1
22+
23+
## 9.4.0
24+
25+
This release can be used without changing anything, although it can break the behavior a little, we provided a way to use the old behavior in `9.3.x`
26+
27+
- Thanks to @Alspb, the search bar/dialog has been reworked for improved UI that fits **Material 3** look and feel, the search happens on the fly, and other minor changes, if you want the old search bar, you can restore it with one line if you're using `QuillSimpleToolbar`:
28+
```dart
29+
QuillToolbar.simple(
30+
configurations: QuillSimpleToolbarConfigurations(
31+
searchButtonType: SearchButtonType.legacy,
32+
),
33+
)
34+
```
35+
While the changes are mostly to the `QuillToolbarSearchDialog` and it seems this should be `searchDialogType`, we provided the old button with the old dialog in case we update the button in the future.
36+
37+
If you're using `QuillToolbarSearchButton` in a custom Toolbar, you don't need anything to get the new button. if you want the old button, use the `QuillToolbarLegacySearchButton` widget
38+
39+
Consider using the improved button with the improved dialog as the legacy button might removed in future releases (for now, it's not deprecated)
40+
41+
<details>
42+
<summary>Before</summary>
43+
44+
![image](https://github.com/singerdmx/flutter-quill/assets/73608287/9b40ad03-717f-4518-95f1-8d9cad773b2b)
45+
46+
47+
</details>
48+
49+
<details>
50+
<summary>Improved</summary>
51+
52+
![image](https://github.com/singerdmx/flutter-quill/assets/73608287/e581733d-63fa-4984-9c41-4a325a0a0c04)
53+
54+
</details>
55+
56+
For the detailed changes, see #1904
57+
58+
- Korean translations by @leegh519 in https://github.com/singerdmx/flutter-quill/pull/1911
59+
60+
- The usage of `super_clipboard` plugin in `flutter_quill` has been moved to the `flutter_quill_extensions` package, this will restore the old behavior in `8.x.x` though it will break the `onImagePaste`, `onGifPaste` and rich text pasting from HTML or Markdown, most of those features are available in `super_clipboard` plugin except `onImagePaste` which was available as we were using [pasteboard](https://pub.dev/packages/pasteboard), Unfortunately, it's no longer supported on recent versions of Flutter, and some functionalities such as an image from Clipboard and Html paste are not supported on some platforms such as Android, your project will continue to work, calls of `onImagePaste` and `onGifPaste` will be ignored unless you include [flutter_quill_extensions](https://pub.dev/packages/flutter_quill_extensions) package in your project and call:
61+
62+
```dart
63+
FlutterQuillExtensions.useSuperClipboardPlugin();
64+
```
65+
Before using any `flutter_quill` widgets, this will restore the old behavior in `9.x.x`
66+
67+
We initially wanted to publish `flutter_quill_super_clipboard` to allow:
68+
- Using `super_clipboard` without `flutter_quill_extensions` packages and plugins
69+
- Using `flutter_quill_extensions` with optional `super_clipboard`
70+
71+
To simplify the usage, we moved it to `flutter_quill_extensions`, let us know if you want any of the use cases above.
72+
73+
Overall `super_clipboard` is a Comprehensive clipboard plugin with a lot of features, the only thing that developers didn't want is Rust installation even though it's automated.
74+
75+
The main goal of `ClipboardService` is to make `super_clipboard` optional, you can use your own implementation, and create a class that implements `ClipboardService`, which you can get by:
76+
```dart
77+
// ignore: implementation_imports
78+
import 'package:flutter_quill/src/services/clipboard/clipboard_service.dart';
79+
```
80+
81+
Then you can call:
82+
```dart
83+
// ignore: implementation_imports
84+
import 'package:flutter_quill/src/services/clipboard/clipboard_service_provider.dart';
85+
ClipboardServiceProvider.setInstance(YourClipboardService());
86+
```
87+
88+
The interface could change at any time and will be updated internally for `flutter_quill` and `flutter_quill_extensions`, we didn't export those two classes by default to avoid breaking changes in case you use them as we might change them in the future.
89+
90+
If you use the above imports, you might get **breaking changes** in **non-breaking change releases**.
91+
92+
- Subscript and Superscript should now work for all languages and characters
93+
94+
The previous implementation required the Apple 'SF-Pro-Display-Regular.otf' font which is only licensed/permitted for use on Apple devices.
95+
We have removed the Apple font from the example
96+
97+
- Allow pasting Markdown and HTML file content from the system to the editor
98+
99+
Before `9.4.x` if you try to copy an HTML or Markdown file, and paste it into the editor, you will get the file name in the editor
100+
Copying an HTML file, or HTML content from apps and websites is different than copying plain text.
101+
102+
This is why this change requires `super_clipboard` implementation as this is platform-dependent:
103+
```dart
104+
FlutterQuillExtensions.useSuperClipboardPlugin();
105+
```
106+
as mentioned above.
107+
108+
The following example for copying a Markdown file:
109+
110+
<details>
111+
<summary>Markdown File Content</summary>
112+
113+
```md
114+
115+
**Note**: This package supports converting from HTML back to Quill delta but it's experimental and used internally when pasting HTML content from the clipboard to the Quill Editor
116+
117+
You have two options:
118+
119+
1. Using [quill_html_converter](./quill_html_converter/) to convert to HTML, the package can convert the Quill delta to HTML well
120+
(it uses [vsc_quill_delta_to_html](https://pub.dev/packages/vsc_quill_delta_to_html)), it is just a handy extension to do it more quickly
121+
1. Another option is to use
122+
[vsc_quill_delta_to_html](https://pub.dev/packages/vsc_quill_delta_to_html) to convert your document
123+
to HTML.
124+
This package has full support for all Quill operations—including images, videos, formulas,
125+
tables, and mentions.
126+
Conversion can be performed in vanilla Dart (i.e., server-side or CLI) or in Flutter.
127+
It is a complete Dart part of the popular and mature [quill-delta-to-html](https://www.npmjs.com/package/quill-delta-to-html)
128+
Typescript/Javascript package.
129+
this package doesn't convert the HTML back to Quill Delta as far as we know
130+
131+
```
132+
133+
</details>
134+
135+
<details>
136+
<summary>Before</summary>
137+
138+
![image](https://github.com/singerdmx/flutter-quill/assets/73608287/03f5ae20-796c-4e8b-8668-09a994211c1e)
139+
140+
</details>
141+
142+
<details>
143+
<summary>After</summary>
144+
145+
![image](https://github.com/singerdmx/flutter-quill/assets/73608287/7e3a1987-36e7-4665-944a-add87d24e788)
146+
147+
</details>
148+
149+
Markdown, and HTML converting from and to Delta are **currently far from perfect**, the current implementation could improved a lot
150+
however **it will likely not work like expected**, due to differences between HTML and Delta, see this [comment](https://github.com/slab/quill/issues/1551#issuecomment-311458570) for more info.
151+
152+
![Copying Markdown file into Flutter Quill Editor](https://github.com/singerdmx/flutter-quill/assets/73608287/63bd6ba6-cc49-4335-84dc-91a0fa5c95a9)
153+
154+
For more details see #1915
155+
156+
Using or converting to HTML or Markdown is highly experimental and shouldn't be used for production applications.
157+
158+
We use it internally as it is more suitable for our specific use case., copying content from external websites and pasting it into the editor
159+
previously breaks the styles, while the current implementation is not ready, it provides a better user experience and doesn't have many downsides.
160+
161+
Feel free to report any bugs or feature requests at [Issues](https://github.com/singerdmx/flutter-quill/issues) or drop any suggestions and questions at [Discussions](https://github.com/singerdmx/flutter-quill/discussions)
162+
163+
## New Contributors
164+
* @leegh519 made their first contribution in https://github.com/singerdmx/flutter-quill/pull/1911
165+
166+
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.3.21...v9.4.0
167+
7168
## 9.3.21
8169

9170
* fix: assertion failure for swipe typing and undo on Android by @crasowas in https://github.com/singerdmx/flutter-quill/pull/1898

CHANGELOG_DATA.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,37 @@
22

33
First of all, we would like to thank you for your time and efforts on this project, we appreciate it
44

5-
You can see tutorials online on how to contribute to any open source project, it's a simple process, and you can do it even if you are not Git expert, simply start by forking the repository, clone it, creating a new branch, make your changes and commit them, then push the branch to your fork, and you will get link to send a PR to the upstream repository
5+
You can see tutorials online on how to contribute to any open source project, it's a simple process, and you can do it
6+
even if you are not Git expert, simply start by forking the repository, clone it, create a new branch, make your
7+
changes and commit them, then push the branch to your fork, and you will get link to send a PR to the upstream
8+
repository
69

7-
If you don't have anything specific in mind to improve or fix, you can take a look at the issues tab or take a look at the todos of the project, they all start with `TODO:` so you can search in your IDE or use the todos tab in the IDE
10+
If you don't have anything specific in mind to improve or fix, you can take a look at the issues tab or take a look at
11+
the todos of the project, they all start with `TODO:` so you can search in your IDE or use the todos tab in the IDE
812

9-
You can also check the [Todo](./doc/todo.md) list or the issues if you want to
13+
You can also check the [Todo](./doc/todo.md) list or the issues if you want to
1014

11-
> Make sure to not edit the `CHANGELOG.md` or the version in `pubspec.yaml` for any of the packages, this process will be automated by CI.
15+
> Make sure to not edit the `CHANGELOG.md` or the version in `pubspec.yaml` for any of the packages, CI will automate
16+
> this process.
1217
1318
## Requirements
1419

15-
- [Flutter SDK](https://docs.flutter.dev/get-started/install) which can be installed by following the instructions the provided link, also make sure to add it to your path so `flutter --version` and `dart --version` work
16-
- [Intellij IDEA Community Edition](https://www.jetbrains.com/idea/download/) or [Android Studio](https://developer.android.com/studio) (with Dart and Flutter plugins) or use [VS Code](https://code.visualstudio.com/) (with Dart and flutter extensions)
17-
20+
- [Flutter SDK](https://docs.flutter.dev/get-started/install), which can be installed by following the instructions the
21+
provided link, also make sure to add it to your path so `flutter --version` and `dart --version` work
22+
- [IntelliJ IDEA Community Edition](https://www.jetbrains.com/idea/download/)
23+
or [Android Studio](https://developer.android.com/studio) (with Dart and Flutter plugins) or
24+
use [VS Code](https://code.visualstudio.com/) (with Dart and flutter extensions)
1825

1926
## Test your changes 🧪
2027

2128
Make sure you have the [Requirement](#requirements) installed and configured correctly
2229

2330
To test your changes:
2431

25-
1. Go to the [Example project](./example/) in [main.dart](./example/lib/main.dart) and run the project either by using your IDE or `flutter run`
26-
2. Make sure to read the [Development Notes](./doc/development_notes.md) if you made certain changes or [Translations Page](./doc/translation.md) if you made changes to the translations of the package
32+
1. Go to the [Example project](./example/) in [main.dart](./example/lib/main.dart) and run the project either by using
33+
your IDE or `flutter run`
34+
2. Make sure to read the [Development Notes](./doc/development_notes.md) if you made certain changes
35+
or [Translations Page](./doc/translation.md) if you made changes to the translations of the package
2736

2837
## Steps to contributing
2938

@@ -35,24 +44,29 @@ You will need a GitHub account as well as Git installed and configured with your
3544
```
3645
git remote add upstream [email protected]:singerdmx/flutter-quill.git
3746
```
38-
4. Open the project with your favorite IDE, usually, we prefer to use Jetbrains IDEs, but since [VS Code](https://code.visualstudio.com) is more used and has more support for Dart, then we suggest using it if you want to.
47+
4. Open the project with your favorite IDE, usually, we prefer to use Jetbrains IDEs, but
48+
since [VS Code](https://code.visualstudio.com) is more used and has more support for Dart, then we suggest using it
49+
if you want to.
3950
5. Create a new git branch and switch to it using `git checkout -b`
4051
6. Make your changes
41-
7. If you are working on changes that depend on different libraries in the same repo, then in that directory copy `pubspec_overrides.yaml.disabled` which exists in all the packages (`flutter_quill_test` and `flutter_quill_extensions` etc...)
42-
to `pubspec_overrides.yaml` which will be ignored by `.gitignore` and will be used by dart pub to override the libraries
52+
7. If you are working on changes that depend on different libraries in the same repo, then in that directory
53+
copy `pubspec_overrides.yaml.disabled` which exists in all the packages (`flutter_quill_test`
54+
and `flutter_quill_extensions` etc...)
55+
to `pubspec_overrides.yaml` which will be ignored by `.gitignore` and will be used by dart pub to override the
56+
libraries
4357
```
4458
cp pubspec_overrides.yaml.disabled pubspec_overrides.yaml
4559
```
46-
or save some time with the following script:
60+
or save some time with the following script:
4761
<!-- TODO: We should update this script to dart instead -->
4862
```
4963
./scripts/enable_local_dev.sh
5064
```
5165
8. Test them in the [example](./example) and add changes in there if necessary
52-
9. Run the following script if possible
53-
```
54-
./scripts/before_push.sh
55-
```
66+
9. Run the following script if possible
67+
```
68+
./scripts/before_push.sh
69+
```
5670
10. When you are done sending your pull request, run:
5771
```
5872
git add .
@@ -62,10 +76,11 @@ to `pubspec_overrides.yaml` which will be ignored by `.gitignore` and will be us
6276
this will push the new branch to your forked repository
6377
6478
11. Now you can send your pull request either by following the link that you will get in the command line or open your
65-
forked repository. You will find an option to send the pull request, you can also
66-
open the [Pull Requests](https://github.com/singerdmx/flutter-quill) tab and send new pull request
79+
forked repository. You will find an option to send the pull request, you can also
80+
open the [Pull Requests](https://github.com/singerdmx/flutter-quill) tab and send new pull request
6781
6882
12. Now, wait for the review, and we might ask you to make more changes, then run:
83+
6984
```
7085
git add .
7186
git commit -m "Your new commit message"

0 commit comments

Comments
 (0)