Skip to content

Commit

Permalink
chore!: disable clipboard buttons in QuillSimpleToolbar by default
Browse files Browse the repository at this point in the history
  • Loading branch information
EchoEllet committed Dec 26, 2024
1 parent 6640579 commit 7abe6d2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Changed

- **BREAKING**: Clipboard action buttons in `QuillSimpleToolbar` are now disabled by default. To enable them, set `showClipboardCut`, `showClipboardCopy`, and `showClipboardPaste` to `true` in `QuillSimpleToolbarConfig`.

## [11.0.0-dev.17] - 2024-12-19

### Fixed
Expand Down
16 changes: 16 additions & 0 deletions doc/migration/10_to_11.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,22 @@ void dispose() {
}
```

### 4. Clipboard action buttons in `QuillSimpleToolbar` are now disabled by default

This change was made due to a performance issue ([#2421](https://github.com/singerdmx/flutter-quill/issues/2421)) and reverts a minor update ([9.3.10](https://pub.dev/packages/flutter_quill/changelog#9310)) that unexpectedly enabled these buttons by default, increasing UI space usage.

To show them again, set `showClipboardCut`, `showClipboardCopy`, and `showClipboardPaste` to `true` in `QuillSimpleToolbarConfig`:

```dart
QuillSimpleToolbar(
config: QuillSimpleToolbarConfig(
showClipboardCut: true,
showClipboardCopy: true,
showClipboardPaste: true,
)
)
```

## 🚧 Experimental

APIs that were indicated as stable but are now updated to indicate
Expand Down
2 changes: 0 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ class _HomePageState extends State<HomePage> {
controller: _controller,
config: QuillSimpleToolbarConfig(
embedButtons: FlutterQuillEmbeds.toolbarButtons(),
showClipboardCopy: false,
showClipboardCut: false,
showClipboardPaste: true,
customButtons: [
QuillToolbarCustomButtonOptions(
Expand Down
6 changes: 3 additions & 3 deletions lib/src/toolbar/config/simple_toolbar_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ class QuillSimpleToolbarConfig {
this.showSearchButton = true,
this.showSubscript = true,
this.showSuperscript = true,
this.showClipboardCut = true,
this.showClipboardCopy = true,
this.showClipboardPaste = true,
this.showClipboardCut = false,
this.showClipboardCopy = false,
this.showClipboardPaste = false,
this.linkStyleType = LinkStyleType.original,
this.headerStyleType = HeaderStyleType.original,

Expand Down

0 comments on commit 7abe6d2

Please sign in to comment.