Skip to content

Commit

Permalink
feat!: release version 11.0.0 with breaking changes (#2338)
Browse files Browse the repository at this point in the history
* fix!: remove super_clipboard from flutter_quill_extensions and move it to quill_super_clipboard (#2322)

* chore!: remove the controller from the configuration class, remove the quill toolbar and editor provider widgets, and other minor breaking changes

* chore!: remove SimpleSpellCheckerService from flutter_quill_extensions

* chore!: remove experimental support for spell checking, remove the deprecated support for YouTube in flutter_quill_extensions, and other minor breaking changes

* chore(deps): remove equatable

* chore!: remove quill shared configuration and toolbar shared configuration

* chore!: remove QuillController.setContents()

* chore!: remove QuillController.editorFocusNode

* chore: remove outdated comments

* chore: always call setState() in _markNeedsBuild() in QuillRawEditorState even if dirty is already true (revert to old behavior)

* chore: extract code from _requestKeyboard() and add docs comment for _requireEditorCurrentState

* chore!: remove classes related to editor element options, minor docs updates in editor config, rename isOnTapOutsideEnabled to onTapOutsideEnabled

* chore!: rename 'Configurations' to 'Config'

* chore!: refactor build method of the embed block interface

* chore!: remove the experimental table support from flutter_quill_extensions

* chore!: remove old deprecated properties

* chore!: rename rawItemsMap to items for font family and font size options

* chore!: remove deprecated formula embed support from flutter_quill_extensions

* chore!: remove deprecated class SuperClipboardService, rename the directory models to config in flutter_quill_extensions

* chore: add commnet in imageProviderBuilder code docs comment in flutter_quill_extensions

* docs: fix typos in migration

* docs(readme): replace deprecated flutter_quill_internal.dart with internal.dart

* docs(readme): improve README

* docs(readme): add the GitHub flutter_quill code snippet back

* docs: add more details to the migration guide

* fix(ios): use the localized strings for 'open', 'copy', and 'remove'

* chore: rename the file quill_controller_configurations.dart to quill_controller_config.dart

* chore!: avoid storing quill editor config inside Document

* chore: restore search within embed objects feature (revert removal of editor config inside the QuillController)

* chore: add @experimental to some APIs

* docs: add emojis to the migration guide, add the migration guide link in README.md

* chore: removes quill controller web files, updates QuillControllerConfig.onClipboardPaste to allow overriding the default paste handling

* docs: fix typos in the migration guide

* chore: minor change in the migration guide

* docs: update link of QuillControllerConfig.onClipboardPaste in the migration guide

* chore: fix dart analysis issues

* chore: mark QuillEditorConfig.customLeadingBlockBuilder as experimental

* chore!: avoid exporting OptionalSize

* chore: rename _restoreToolbar to _restoreToolbarAfterMagnifier in text_selection.dart

* chore: annotate QuillEditorConfig.magnifierConfiguration as experimental

* chore: minor cleanup to magnifier feature

* chore: export missing class, fix #2333

* chore: fix dart analysis

* chore(release): temp changes to publish 11.0.0 (will revert changes of this commit)

* chore: add temp dependency_overrides to fix CI failure

* chore: temp changes to publish 11.0.0-dev.1

* ci(publish): temp change to fix CI failure

* chore: restore previous publish workflow (revert), update min version of flutter_quill in test and extensions packages, remove pubspec_overrides.yaml

* chore: revert CHANGELOG.md and publish.yml changes

* chore: revert a change in #2026 (see comment https://github.com/singerdmx/flutter-quill/pull/2026/files#r1679744497)

* chore: revert change of reverting the removal of _handles check introduced by #2026

* docs(migration): clarify the removal of the QuillToolbar widget

* docs(migration): improve removal of the QuillToolbar section

* docs: add the custom toolbar page link in: removal of the QuillToolbar

* docs: add important info at the top of the migration guide

* feat(toolbar): add the base button options feature back, supports flutter_quill_extensions's buttons too.

* chore: fix analysis warnings

* docs: add more details in the migration guide in the breaking behavior with code snippets

* chore: minor change to the 'Breaking behavior' section

* chore(deps): improve dependencies constraints for compatibility

- Fix #2341
- Fix #2347

* docs(migration): explain that QuillToolbar is not a visual widget like QuillSimpleToolbar

* docs: minor changes to README.md and migration guide

* feat: clipboard paste callbacks, partial fix to #2350

* docs: update outdated link in the migration guide

* chore: rename deltaToPaste() to getDeltaToPaste()

* docs: improve CHANGELOG.md format and quality, fixing #2211

* ci: pass the GitHub token to an action

* docs: fix format of CHANGELOG.md

* ci: use cider for CHANGELOG.md format validation

* ci: add a TODO to improve CHANGELOG.md validation

* chore: remove flutter_quill_extensions from publishing

* chore: publish flutter_quill_extensions and add 'insertVideo' in quill_en.arb

* chore(release): prepare to publish 11.0.0-dev.3

* ci: increase _expectedTranslationKeysLength due to 'insertVideo'

* ci: use a GitHub action to update the release notes

* chore(release): publish flutter_quill_extensions 11.0.0-dev.3

* chore(release): prepare to publish 11.0.0-dev.4

* ci: remove the release notes file creation

* chore(example): delete the current example to recreate

* chore: recreate the example (fix #2249), minor changes to flutter_quill_extensions

* docs(readme): update the screenshots of the example app

* docs(readme): update sample page link, remove 'breaking changes' from table of contents only

* feat: add the option to disable rich text paste feature, partial fix to #2350

* chore(release): prepare to publish 11.0.0-dev.5

* chore: regenerate translations to reflect #2358

* chore: ignore deprecations

* docs: fix a minor issue in the Contributing guide

* chore(example): add file read access for macOS

* feat(l10n): localize "insert video" for Khmer language

Source: #2358 (comment)

* chore: simplify PR template

* docs: update development notes

* docs(readme): use images from GitHub repo instead of relative path to load on pub.dev
  • Loading branch information
EchoEllet authored Nov 9, 2024
1 parent f122cf9 commit 2999c0d
Show file tree
Hide file tree
Showing 344 changed files with 8,921 additions and 19,905 deletions.
45 changes: 15 additions & 30 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,35 @@
<!--
Thank you for contributing.
Provide a description of your changes below and a general summary in the title.
Consider reading the Contributor Guide: https://github.com/singerdmx/flutter-quill/blob/master/CONTRIBUTING.md.
The changes of `CHANGELOG.md` and package version in `pubspec.yaml` are automated.
Briefly describe your changes and summarize in the title.
Contributor Guide: https://github.com/singerdmx/flutter-quill/blob/master/CONTRIBUTING.md
Package versioning is automated; add updates to `Unreleased` per [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format.
-->

## Description

*Replace this paragraph with a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change.*
*Describe what this PR does. If modifying behavior, explain the current and new behavior, along with the motivation.*

## Related Issues

<!--
Replace this paragraph with a list of issues related to this PR from the [issue database](https://github.com/singerdmx/flutter-quill/issues). Indicate, which of these issues are resolved or fixed by this PR.
-->

<!-- *e.g.* -->
*e.g.*
- *Fix #123*
- *Related #456*
-->

## Type of Change

<!---
Put an x in all the boxes that apply:
- [x] **Example:**
<!---
Check the boxes that apply with x and leave the others empty. For example:
- [ ] ✨ **New feature:** Adds new functionality without breaking existing features.
- [x] πŸ› οΈ **Bug fix:** Resolves an issue without changing current behavior.
-->

- [ ] ✨ **New feature:** Adds new functionality without breaking existing features.
- [ ] ✨ **Feature:** New functionality without breaking existing features.
- [ ] πŸ› οΈ **Bug fix:** Resolves an issue without altering current behavior.
- [ ] 🧹 **Code refactor:** Code restructuring that does not affect behavior.
- [ ] ❌ **Breaking change:** Alters existing functionality and requires updates.
- [ ] πŸ§ͺ **Tests:** Adds new tests or modifies existing tests.
- [ ] 🧹 **Refactor:** Code reorganization, no behavior change.
- [ ] ❌ **Breaking:** Alters existing functionality and requires updates.
- [ ] πŸ§ͺ **Tests:** New or modified tests
- [ ] πŸ“ **Documentation:** Updates or additions to documentation.
- [ ] πŸ—‘οΈ **Chore:** Routine tasks, or maintenance.
- [ ] βœ… **Build configuration change:** Changes to build or deploy processes.

## Suggestions

<!-- Optional -->
- [ ] βœ… **Build configuration change:** Build/configuration changes.
19 changes: 19 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: πŸ“ Changelog File Check

# This workflow only validates if the CHANGELOG.md file was updated and doesn't validate the format.

on:
pull_request:
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
branches:
- master

jobs:
changelog:
name: πŸ” Verify Changelog Modification
runs-on: ubuntu-latest
steps:
- name: βœ… Check if CHANGELOG.md was modified
uses: tarides/changelog-check-action@v2
with:
changelog: CHANGELOG.md
29 changes: 29 additions & 0 deletions .github/workflows/gh_release_notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: πŸš€ Update GitHub Release Notes from CHANGELOG.md

on:
release:
types: [published]

jobs:
release-notes:
name: πŸ“ Publish Release Notes from Changelog
permissions:
# Required for updating GitHub release notes
contents: write
runs-on: ubuntu-latest
steps:
- name: πŸ“¦ Checkout Repository
uses: actions/checkout@v4

- name: βœ‚οΈ Extract Release Notes from CHANGELOG.md
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v2
with:
changelog_file: CHANGELOG.md

- name: πŸ–‹οΈ Update Release Notes
uses: irongut/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: ${{ github.event.release.id }}
body: ${{ steps.extract-release-notes.outputs.release_notes }}
11 changes: 10 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: πŸ§ͺ Run Tests

# TODO: Split the tests into tests.yml and quality checks into checks.yml once start using https://pub.dev/packages/melos

on:
push:
branches: [master, dev]
Expand Down Expand Up @@ -49,4 +51,11 @@ jobs:
run: flutter test

- name: πŸ” Check the translations
run: dart ./scripts/ensure_translations_correct.dart
run: dart ./scripts/translations_check.dart

- name: πŸ“₯ Install cider
run: dart pub global activate cider

# TODO: Need a more strict way to validate the format that uses https://keepachangelog.com/en/1.1.0/
- name: πŸ” Validate CHANGELOG.md format
run: $HOME/.pub-cache/bin/cider list CHANGELOG.md
63 changes: 33 additions & 30 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
name: πŸš€ Publish to pub.dev

# Note: This workflow only publishes flutter_quill package, the flutter_quill_extensions
# need to be manually published.

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

jobs:
publish:
name: Publish the packages
name: Publish the flutter_quill package
permissions:
id-token: write
# Give the default GITHUB_TOKEN write permission to commit and push the changed files to the repository.
# Also required for uploading files to the Release assets
# Required for uploading files to the release assets of GitHub.
contents: write
runs-on: ubuntu-latest
steps:
- name: πŸ“¦ Checkout repository
uses: actions/checkout@v4
# Needed for commit and push changes
with:
# TODO: Try to not hardcode the branch name
ref: master
fetch-depth: 0 # To get all tags

- name: πŸ“„ Upload LICENSE file to release assets
uses: softprops/action-gh-release@v2
Expand Down Expand Up @@ -50,8 +47,6 @@ jobs:
# - name: Update the authorization requests to "https://pub.dev" to use the environment variable "PUB_TOKEN".
# run: dart pub token add https://pub.dev --env-var PUB_TOKEN

# Before publishing the new packages, update the version for all the packages first

# Extract version from the tag (handles the 'v' prefix)
- name: 🏷️ Extract version from tag as pubspec.yaml version
id: extract_version
Expand All @@ -71,33 +66,41 @@ jobs:
id: release_tag
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: πŸ“‘ Fetch release notes from Github API and create a required file by the next step
run: dart ./scripts/create_version_content_from_github_release.dart "${{ github.repository }}" "${{ steps.release_tag.outputs.tag }}"
# TODO: Validate the tag, the version must match the one in pubspec.yaml, publishing the package will throw an error

# TODO: Might automate some changes of the CHANGELOG.md (outdated TODO)

- name: πŸ“ Update package version in pubspec.yaml
run: dart ./update_pubspec_version.dart ./pubspec.yaml ${{ steps.extract_version.outputs.VERSION }}

# - name: πŸ“ Update CHANGELOG.md to reflect the change
# uses: thomaseizinger/keep-a-changelog-new-release@v2
# with:
# tag: ${{ steps.release_tag.outputs.tag }}
# changelogPath: ./CHANGELOG.md

- name: πŸ“ Update CHANGELOG.md to reflect the change
run: dart ./update_changelog_version.dart ./CHANGELOG.md ${{ steps.extract_version.outputs.VERSION }}

- name: πŸ“„ Print updated pubspec.yaml
run: |
echo "===== πŸ“œ pubspec.yaml ====="
cat pubspec.yaml | tee /dev/stderr
echo "==========================="
- name: πŸ“ Update version and CHANGELOG for all the packages
run: dart ./scripts/update_package_version.dart ${{ steps.extract_version.outputs.VERSION }}
- name: πŸ“ Print updated CHANGELOG.md
run: |
echo "===== πŸ“ CHANGELOG.md ====="
cat CHANGELOG.md | tee /dev/stderr
echo "==========================="
- name: πŸ’Ύ Commit updated version and CHANGELOG
id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v5
uses: EndBug/add-and-commit@v9
with:
commit_message: "chore(version): update to version ${{ steps.extract_version.outputs.VERSION }}"

- name: πŸ” Verify changes made by the script
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: echo "βœ… Changes have been committed."
message: "chore(release): prepare to publish ${{ steps.extract_version.outputs.VERSION }}"

- name: πŸ”„ Check if package is ready for publishing
run: flutter pub publish --dry-run

- name: πŸ“€ Publish flutter_quill
run: flutter pub publish --force

- name: πŸ“€ Publish flutter_quill_extensions
run: flutter pub publish --force
working-directory: ./flutter_quill_extensions/

- name: πŸ“€ Publish flutter_quill_test
run: flutter pub publish --force
working-directory: ./flutter_quill_test/

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@ example/ios/Podfile.lock
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspec-lock.
pubspec.lock
Loading

0 comments on commit 2999c0d

Please sign in to comment.