Skip to content

Commit

Permalink
chore(version): update to version 10.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EchoEllet authored and github-actions[bot] committed Sep 25, 2024
1 parent 0193230 commit 7fadc89
Show file tree
Hide file tree
Showing 12 changed files with 445 additions and 10 deletions.
110 changes: 110 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,116 @@

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

## 10.8.0

> [!CAUTION]
> This release can be breaking change for `flutter_quill_extensions` users as it remove the built-in support for loading YouTube videos
If you're using [flutter_quill_extensions](https://pub.dev/packages/flutter_quill_extensions) then this release, can be a breaking change for you if you load videos in the editor and expect YouTube videos to be supported, [youtube_player_flutter](https://pub.dev/packages/youtube_player_flutter) and [flutter_inappwebview](https://pub.dev/packages/flutter_inappwebview) are no longer dependencies of the extensions package, which are used to support loading YouTube Iframe videos on non-web platforms, more details about the discussion and reasons in [#2286](https://github.com/singerdmx/flutter-quill/pull/2286) and [#2284](https://github.com/singerdmx/flutter-quill/issues/2284).

We have added an experimental property that gives you more flexibility and control about the implementation you want to use for loading videos.

> [!WARNING]
> It's likely to experience some common issues while implementing this feature, especially on desktop platforms as the support for [flutter_inappwebview_windows](https://pub.dev/packages/flutter_inappwebview_windows) and [flutter_inappwebview_macos](https://pub.dev/packages/flutter_inappwebview_macos) before 2 days. Some of the issues are in the Flutter Quill editor.
If you want loading YouTube videos to be a feature again with the latest version of Flutter Quill, you can use an existing plugin or package, or implement your own solution. For example, you might use [`youtube_video_player`](https://pub.dev/packages/youtube_video_player) or [`youtube_player_flutter`](https://pub.dev/packages/youtube_player_flutter), which was previously used in [`flutter_quill_extensions`](https://pub.dev/packages/flutter_quill_extensions).

Here’s an example setup using `youtube_player_flutter`:

```shell
flutter pub add youtube_player_flutter
```

Example widget configuration:

```dart
import 'package:flutter/material.dart';
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
class YoutubeVideoPlayer extends StatefulWidget {
const YoutubeVideoPlayer({required this.videoUrl, super.key});
final String videoUrl;
@override
State<YoutubeVideoPlayer> createState() => _YoutubeVideoPlayerState();
}
class _YoutubeVideoPlayerState extends State<YoutubeVideoPlayer> {
late final YoutubePlayerController _youtubePlayerController;
@override
void initState() {
super.initState();
_youtubePlayerController = YoutubePlayerController(
initialVideoId: YoutubePlayer.convertUrlToId(widget.videoUrl) ??
(throw StateError('Expect a valid video URL')),
flags: const YoutubePlayerFlags(
autoPlay: true,
mute: true,
),
);
}
@override
Widget build(BuildContext context) {
return YoutubePlayer(
controller: _youtubePlayerController,
showVideoProgressIndicator: true,
);
}
@override
void dispose() {
_youtubePlayerController.dispose();
super.dispose();
}
}
```

Then, integrate it with `QuillEditorVideoEmbedConfigurations`

```dart
FlutterQuillEmbeds.editorBuilders(
videoEmbedConfigurations: QuillEditorVideoEmbedConfigurations(
customVideoBuilder: (videoUrl, readOnly) {
// Example: Check for YouTube Video URL and return your
// YouTube video widget here.
bool isYouTubeUrl(String videoUrl) {
try {
final uri = Uri.parse(videoUrl);
return uri.host == 'www.youtube.com' ||
uri.host == 'youtube.com' ||
uri.host == 'youtu.be' ||
uri.host == 'www.youtu.be';
} catch (_) {
return false;
}
}
if (isYouTubeUrl(videoUrl)) {
return YoutubeVideoPlayer(
videoUrl: videoUrl,
);
}
// Return null to fallback to the default logic
return null;
},
ignoreYouTubeSupport: true,
),
);
```

> [!NOTE]
> This example illustrates a basic approach, additional adjustments might be necessary to meet your specific needs. YouTube video support is no longer included in this project. Keep in mind that `customVideoBuilder` is experimental and can change without being considered as breaking change. More details in [breaking changes](https://github.com/singerdmx/flutter-quill#-breaking-changes) section.
[`super_clipboard`](https://pub.dev/packages/super_clipboard) will also no longer a dependency of `flutter_quill_extensions` once [PR #2230](https://github.com/singerdmx/flutter-quill/pull/2230) is ready.

We're looking forward to your feedback.

**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.7.7...v10.8.0

## 10.7.7

This version is nearly identical to `10.7.6` with a build failure bug fix in [#2283](https://github.com/singerdmx/flutter-quill/pull/2283) related to unmerged change in [#2230](https://github.com/singerdmx/flutter-quill/pull/2230)
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG_DATA.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"10.8.0": "> [!CAUTION]\r\n> This release can be breaking change for `flutter_quill_extensions` users as it remove the built-in support for loading YouTube videos\r\n\r\nIf you're using [flutter_quill_extensions](https://pub.dev/packages/flutter_quill_extensions) then this release, can be a breaking change for you if you load videos in the editor and expect YouTube videos to be supported, [youtube_player_flutter](https://pub.dev/packages/youtube_player_flutter) and [flutter_inappwebview](https://pub.dev/packages/flutter_inappwebview) are no longer dependencies of the extensions package, which are used to support loading YouTube Iframe videos on non-web platforms, more details about the discussion and reasons in [#2286](https://github.com/singerdmx/flutter-quill/pull/2286) and [#2284](https://github.com/singerdmx/flutter-quill/issues/2284).\r\n\r\nWe have added an experimental property that gives you more flexibility and control about the implementation you want to use for loading videos.\r\n\r\n> [!WARNING]\r\n> It's likely to experience some common issues while implementing this feature, especially on desktop platforms as the support for [flutter_inappwebview_windows](https://pub.dev/packages/flutter_inappwebview_windows) and [flutter_inappwebview_macos](https://pub.dev/packages/flutter_inappwebview_macos) before 2 days. Some of the issues are in the Flutter Quill editor.\r\n\r\nIf you want loading YouTube videos to be a feature again with the latest version of Flutter Quill, you can use an existing plugin or package, or implement your own solution. For example, you might use [`youtube_video_player`](https://pub.dev/packages/youtube_video_player) or [`youtube_player_flutter`](https://pub.dev/packages/youtube_player_flutter), which was previously used in [`flutter_quill_extensions`](https://pub.dev/packages/flutter_quill_extensions).\r\n\r\nHere’s an example setup using `youtube_player_flutter`:\r\n\r\n```shell\r\nflutter pub add youtube_player_flutter\r\n```\r\n\r\nExample widget configuration:\r\n\r\n```dart\r\nimport 'package:flutter/material.dart';\r\nimport 'package:youtube_player_flutter/youtube_player_flutter.dart';\r\n\r\nclass YoutubeVideoPlayer extends StatefulWidget {\r\n const YoutubeVideoPlayer({required this.videoUrl, super.key});\r\n\r\n final String videoUrl;\r\n\r\n @override\r\n State<YoutubeVideoPlayer> createState() => _YoutubeVideoPlayerState();\r\n}\r\n\r\nclass _YoutubeVideoPlayerState extends State<YoutubeVideoPlayer> {\r\n late final YoutubePlayerController _youtubePlayerController;\r\n @override\r\n void initState() {\r\n super.initState();\r\n _youtubePlayerController = YoutubePlayerController(\r\n initialVideoId: YoutubePlayer.convertUrlToId(widget.videoUrl) ??\r\n (throw StateError('Expect a valid video URL')),\r\n flags: const YoutubePlayerFlags(\r\n autoPlay: true,\r\n mute: true,\r\n ),\r\n );\r\n }\r\n\r\n @override\r\n Widget build(BuildContext context) {\r\n return YoutubePlayer(\r\n controller: _youtubePlayerController,\r\n showVideoProgressIndicator: true,\r\n );\r\n }\r\n\r\n @override\r\n void dispose() {\r\n _youtubePlayerController.dispose();\r\n super.dispose();\r\n }\r\n}\r\n\r\n```\r\n\r\nThen, integrate it with `QuillEditorVideoEmbedConfigurations`\r\n\r\n```dart\r\nFlutterQuillEmbeds.editorBuilders(\r\n videoEmbedConfigurations: QuillEditorVideoEmbedConfigurations(\r\n customVideoBuilder: (videoUrl, readOnly) {\r\n // Example: Check for YouTube Video URL and return your\r\n // YouTube video widget here.\r\n bool isYouTubeUrl(String videoUrl) {\r\n try {\r\n final uri = Uri.parse(videoUrl);\r\n return uri.host == 'www.youtube.com' ||\r\n uri.host == 'youtube.com' ||\r\n uri.host == 'youtu.be' ||\r\n uri.host == 'www.youtu.be';\r\n } catch (_) {\r\n return false;\r\n }\r\n }\r\n\r\n if (isYouTubeUrl(videoUrl)) {\r\n return YoutubeVideoPlayer(\r\n videoUrl: videoUrl,\r\n );\r\n }\r\n\r\n // Return null to fallback to the default logic\r\n return null;\r\n },\r\n ignoreYouTubeSupport: true,\r\n ),\r\n);\r\n```\r\n\r\n> [!NOTE]\r\n> This example illustrates a basic approach, additional adjustments might be necessary to meet your specific needs. YouTube video support is no longer included in this project. Keep in mind that `customVideoBuilder` is experimental and can change without being considered as breaking change. More details in [breaking changes](https://github.com/singerdmx/flutter-quill#-breaking-changes) section.\r\n\r\n[`super_clipboard`](https://pub.dev/packages/super_clipboard) will also no longer a dependency of `flutter_quill_extensions` once [PR #2230](https://github.com/singerdmx/flutter-quill/pull/2230) is ready.\r\n\r\nWe're looking forward to your feedback.\r\n\r\n**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.7.7...v10.8.0",
"10.7.7": "This version is nearly identical to `10.7.6` with a build failure bug fix in [#2283](https://github.com/singerdmx/flutter-quill/pull/2283) related to unmerged change in [#2230](https://github.com/singerdmx/flutter-quill/pull/2230)\r\n\r\n\r\n**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.7.6...v10.7.7",
"10.7.6": "* Code Comments Typo fixes by @Luismi74 in https://github.com/singerdmx/flutter-quill/pull/2267\r\n* docs: add important note for contributors before introducing new features by @EchoEllet in https://github.com/singerdmx/flutter-quill/pull/2269\r\n* docs(readme): add 'Breaking Changes' section by @EchoEllet in https://github.com/singerdmx/flutter-quill/pull/2275\r\n* Fix: Resolved issue with broken IME composing rect in Windows desktop(re-implementation) by @agata in https://github.com/singerdmx/flutter-quill/pull/2282\r\n\r\n## New Contributors\r\n* @Luismi74 made their first contribution in https://github.com/singerdmx/flutter-quill/pull/2267\r\n\r\n**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.7.5...v10.7.6",
"10.7.5": "* fix(ci): add flutter pub get step for quill_native_bridge by @EchoEllet in https://github.com/singerdmx/flutter-quill/pull/2265\r\n* revert: \"Resolved issue with broken IME composing rect in Windows desktop\" by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/2266\r\n\r\n\r\n**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.7.4...v10.7.5",
Expand Down
110 changes: 110 additions & 0 deletions dart_quill_delta/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,116 @@

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

## 10.8.0

> [!CAUTION]
> This release can be breaking change for `flutter_quill_extensions` users as it remove the built-in support for loading YouTube videos
If you're using [flutter_quill_extensions](https://pub.dev/packages/flutter_quill_extensions) then this release, can be a breaking change for you if you load videos in the editor and expect YouTube videos to be supported, [youtube_player_flutter](https://pub.dev/packages/youtube_player_flutter) and [flutter_inappwebview](https://pub.dev/packages/flutter_inappwebview) are no longer dependencies of the extensions package, which are used to support loading YouTube Iframe videos on non-web platforms, more details about the discussion and reasons in [#2286](https://github.com/singerdmx/flutter-quill/pull/2286) and [#2284](https://github.com/singerdmx/flutter-quill/issues/2284).

We have added an experimental property that gives you more flexibility and control about the implementation you want to use for loading videos.

> [!WARNING]
> It's likely to experience some common issues while implementing this feature, especially on desktop platforms as the support for [flutter_inappwebview_windows](https://pub.dev/packages/flutter_inappwebview_windows) and [flutter_inappwebview_macos](https://pub.dev/packages/flutter_inappwebview_macos) before 2 days. Some of the issues are in the Flutter Quill editor.
If you want loading YouTube videos to be a feature again with the latest version of Flutter Quill, you can use an existing plugin or package, or implement your own solution. For example, you might use [`youtube_video_player`](https://pub.dev/packages/youtube_video_player) or [`youtube_player_flutter`](https://pub.dev/packages/youtube_player_flutter), which was previously used in [`flutter_quill_extensions`](https://pub.dev/packages/flutter_quill_extensions).

Here’s an example setup using `youtube_player_flutter`:

```shell
flutter pub add youtube_player_flutter
```

Example widget configuration:

```dart
import 'package:flutter/material.dart';
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
class YoutubeVideoPlayer extends StatefulWidget {
const YoutubeVideoPlayer({required this.videoUrl, super.key});
final String videoUrl;
@override
State<YoutubeVideoPlayer> createState() => _YoutubeVideoPlayerState();
}
class _YoutubeVideoPlayerState extends State<YoutubeVideoPlayer> {
late final YoutubePlayerController _youtubePlayerController;
@override
void initState() {
super.initState();
_youtubePlayerController = YoutubePlayerController(
initialVideoId: YoutubePlayer.convertUrlToId(widget.videoUrl) ??
(throw StateError('Expect a valid video URL')),
flags: const YoutubePlayerFlags(
autoPlay: true,
mute: true,
),
);
}
@override
Widget build(BuildContext context) {
return YoutubePlayer(
controller: _youtubePlayerController,
showVideoProgressIndicator: true,
);
}
@override
void dispose() {
_youtubePlayerController.dispose();
super.dispose();
}
}
```

Then, integrate it with `QuillEditorVideoEmbedConfigurations`

```dart
FlutterQuillEmbeds.editorBuilders(
videoEmbedConfigurations: QuillEditorVideoEmbedConfigurations(
customVideoBuilder: (videoUrl, readOnly) {
// Example: Check for YouTube Video URL and return your
// YouTube video widget here.
bool isYouTubeUrl(String videoUrl) {
try {
final uri = Uri.parse(videoUrl);
return uri.host == 'www.youtube.com' ||
uri.host == 'youtube.com' ||
uri.host == 'youtu.be' ||
uri.host == 'www.youtu.be';
} catch (_) {
return false;
}
}
if (isYouTubeUrl(videoUrl)) {
return YoutubeVideoPlayer(
videoUrl: videoUrl,
);
}
// Return null to fallback to the default logic
return null;
},
ignoreYouTubeSupport: true,
),
);
```

> [!NOTE]
> This example illustrates a basic approach, additional adjustments might be necessary to meet your specific needs. YouTube video support is no longer included in this project. Keep in mind that `customVideoBuilder` is experimental and can change without being considered as breaking change. More details in [breaking changes](https://github.com/singerdmx/flutter-quill#-breaking-changes) section.
[`super_clipboard`](https://pub.dev/packages/super_clipboard) will also no longer a dependency of `flutter_quill_extensions` once [PR #2230](https://github.com/singerdmx/flutter-quill/pull/2230) is ready.

We're looking forward to your feedback.

**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.7.7...v10.8.0

## 10.7.7

This version is nearly identical to `10.7.6` with a build failure bug fix in [#2283](https://github.com/singerdmx/flutter-quill/pull/2283) related to unmerged change in [#2230](https://github.com/singerdmx/flutter-quill/pull/2230)
Expand Down
2 changes: 1 addition & 1 deletion dart_quill_delta/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dart_quill_delta
description: A port of quill-js-delta from typescript to dart
version: 10.7.7
version: 10.8.0
homepage: https://github.com/singerdmx/flutter-quill/tree/master/dart_quill_delta/
repository: https://github.com/singerdmx/flutter-quill/tree/master/dart_quill_delta/
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/
Expand Down
2 changes: 0 additions & 2 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Foundation
import desktop_drop
import device_info_plus
import file_selector_macos
import flutter_inappwebview_macos
import gal
import irondash_engine_context
import path_provider_foundation
Expand All @@ -22,7 +21,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin"))
GalPlugin.register(with: registry.registrar(forPlugin: "GalPlugin"))
IrondashEngineContextPlugin.register(with: registry.registrar(forPlugin: "IrondashEngineContextPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
Expand Down
3 changes: 0 additions & 3 deletions example/windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include <desktop_drop/desktop_drop_plugin.h>
#include <file_selector_windows/file_selector_windows.h>
#include <flutter_inappwebview_windows/flutter_inappwebview_windows_plugin_c_api.h>
#include <gal/gal_plugin_c_api.h>
#include <irondash_engine_context/irondash_engine_context_plugin_c_api.h>
#include <share_plus/share_plus_windows_plugin_c_api.h>
Expand All @@ -20,8 +19,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("DesktopDropPlugin"));
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows"));
FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi"));
GalPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("GalPluginCApi"));
IrondashEngineContextPluginCApiRegisterWithRegistrar(
Expand Down
1 change: 0 additions & 1 deletion example/windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
list(APPEND FLUTTER_PLUGIN_LIST
desktop_drop
file_selector_windows
flutter_inappwebview_windows
gal
irondash_engine_context
share_plus
Expand Down
Loading

0 comments on commit 7fadc89

Please sign in to comment.