Skip to content

Commit

Permalink
First step of improving the quill editor (singerdmx#1510)
Browse files Browse the repository at this point in the history
* First step of improving the raw quill editor
  • Loading branch information
EchoEllet committed Nov 7, 2023
1 parent 3915418 commit cf93061
Show file tree
Hide file tree
Showing 23 changed files with 2,702 additions and 2,561 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ example/ios/Podfile.lock
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
pubspec.lock

# For local development
pubspec_overrides.yaml
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [8.2.6]
- Organize `QuillRawEditor` code

## [8.2.5]
- Add `builder` property in the `QuillEditorConfigurations`

Expand Down
3 changes: 0 additions & 3 deletions CONTRIBUTING.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
60 changes: 60 additions & 0 deletions doc/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Contributing

The contributions are more than welcome! <br>
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. Run the following script if possible
```
./scripts/before-push.sh
```
13. 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
14. 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!!
2 changes: 1 addition & 1 deletion flutter_quill_extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 0 additions & 7 deletions flutter_quill_extensions/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions flutter_quill_extensions/pubspec_overrides.yaml.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependency_overrides:
flutter_quill:
path: ../
2 changes: 1 addition & 1 deletion flutter_quill_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 1 addition & 9 deletions flutter_quill_test/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions flutter_quill_test/pubspec_overrides.yaml.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependency_overrides:
flutter_quill:
path: ../
1 change: 1 addition & 0 deletions lib/flutter_quill.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
7 changes: 4 additions & 3 deletions lib/src/widgets/editor/editor.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import 'dart:math' as math;

import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/cupertino.dart'
show CupertinoTheme, cupertinoTextSelectionControls;
import 'package:flutter/foundation.dart' show ValueListenable;
import 'package:flutter/gestures.dart' show PointerDeviceKind;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
Expand Down
Loading

0 comments on commit cf93061

Please sign in to comment.