Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 4d0522d
Merge: 2b54f87 59d5090
Author: Gio Lodi <[email protected]>
Date:   Thu Mar 9 12:08:36 2023 +1100

    Point `bash-cache` plugin to new `a8c-ci-toolkit` location (wordpress-mobile#1367)

commit 59d5090
Author: Gio Lodi <[email protected]>
Date:   Mon Mar 6 21:10:15 2023 +1100

    Remove unused YAML anchor and fix indentation in pipeline

commit e0526bf
Author: Gio Lodi <[email protected]>
Date:   Mon Mar 6 21:09:53 2023 +1100

    Point `bash-cache` plugin to new `a8c-ci-toolkit` location

    While I was at it, I also updated the version to the latest, 2.13.0.

    This was done via:

    ```
    find . -type f -name "*.yml" -exec sed -i '' 's/automattic\/bash-cache#[0-9.]\{1,\}/automattic\/a8c-ci-toolkit#2.13.0/g' {} +
    ```

commit 2b54f87
Merge: b7d8a70 d18d0a8
Author: Gio Lodi <[email protected]>
Date:   Thu Oct 20 16:59:18 2022 +1100

    Add `CHANGELOG.md` (wordpress-mobile#1365)

commit d18d0a8
Author: Gio Lodi <[email protected]>
Date:   Thu Oct 20 15:18:16 2022 +1100

    Update `PULL_REQUEST_TEMPLATE.md` with note about `CHANGELOG.md`

commit 2c73ef5
Author: Gio Lodi <[email protected]>
Date:   Thu Oct 20 14:32:38 2022 +1100

    Add changelog entry about changelog itself

commit 212ce2f
Author: Gio Lodi <[email protected]>
Date:   Thu Oct 20 14:15:12 2022 +1100

    Update `CHANGELOG.md` with new format

commit b7d8a70
Merge: 91cf065 40afa55
Author: Gio Lodi <[email protected]>
Date:   Tue Oct 4 10:29:42 2022 +1100

    Tools upgrade: Ruby 2.7.4, bash-cache 2.8.0 (wordpress-mobile#1363)

commit 40afa55
Author: Gio Lodi <[email protected]>
Date:   Mon Oct 3 20:00:33 2022 +1100

    Use `bash-cache` Buildkite plugin version 2.8.0

    This version includes a fix that removes the need to run
    `gem install bundler` before each step.

commit bd8840a
Author: Gio Lodi <[email protected]>
Date:   Mon Oct 3 19:59:52 2022 +1100

    Use Ruby version 2.7.4

commit 91cf065
Merge: 9d8d9b8 1ce621c
Author: Diego Rey Mendez <[email protected]>
Date:   Wed Aug 10 15:07:41 2022 +0200

    Merge pull request wordpress-mobile#1353 from cbess/expose-indentation-actions

    Expose indentation operations

commit 9d8d9b8
Merge: b16c763 7eb60c7
Author: Tony Li <[email protected]>
Date:   Mon Jul 25 11:11:13 2022 +1200

    Merge pull request wordpress-mobile#1359 from wordpress-mobile/remove/circle-ci

    Remove CircleCI

commit 7eb60c7
Author: Jeremy Massel <[email protected]>
Date:   Fri Jul 22 23:23:27 2022 -0600

    Trigger Build

commit f91511e
Author: Jeremy Massel <[email protected]>
Date:   Thu Jul 21 23:03:28 2022 -0600

    Remove CircleCI

commit 1ce621c
Author: C. Bess <[email protected]>
Date:   Sat Mar 26 12:31:51 2022 -0500

    cleanup whitespace

commit ed55d4a
Author: C. Bess <[email protected]>
Date:   Sat Mar 26 12:31:03 2022 -0500

    cleanup whitespace

commit 4561534
Author: C. Bess <[email protected]>
Date:   Sat Mar 26 12:01:30 2022 -0500

    expose indentation operations

    - make increase/decrease indentation actions visible
    - cleanup code
  • Loading branch information
cbess committed Aug 6, 2023
1 parent 4f27745 commit 08c85ec
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 99 deletions.
11 changes: 1 addition & 10 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Nodes with values to reuse in the pipeline.
common_params:
plugins: &common_plugins
- &bash_cache automattic/bash-cache#2.0.0: ~
- automattic/a8c-ci-toolkit#2.13.0
# Common environment values to use with the `env` key.
env: &common_env
IMAGE_ID: xcode-13
Expand All @@ -14,9 +14,6 @@ steps:
- label: "🧪 Build and Test"
key: "test"
command: |
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
gem install bundler:2.3.4
build_and_test_pod
env: *common_env
plugins: *common_plugins
Expand All @@ -27,9 +24,6 @@ steps:
- label: "🔬 Validate Podspecs"
key: "validate"
command: |
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
gem install bundler:2.3.4
validate_podspec
env: *common_env
plugins: *common_plugins
Expand All @@ -40,9 +34,6 @@ steps:
- label: "🧹 Lint"
key: "lint"
command: |
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
gem install bundler:2.3.4
lint_pod
env: *common_env
plugins: *common_plugins
Expand Down
3 changes: 0 additions & 3 deletions .buildkite/publish-aztec-pod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ SPECS_REPO="[email protected]:wordpress-mobile/cocoapods-specs.git"
SLACK_WEBHOOK=$PODS_SLACK_WEBHOOK

echo "--- :rubygems: Setting up Gems"
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
gem install bundler:2.3.4

install_gems

echo "--- :cocoapods: Publishing Pod to CocoaPods CDN"
Expand Down
3 changes: 0 additions & 3 deletions .buildkite/publish-editor.pod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ SPECS_REPO="[email protected]:wordpress-mobile/cocoapods-specs.git"
SLACK_WEBHOOK=$PODS_SLACK_WEBHOOK

echo "--- :rubygems: Setting up Gems"
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
gem install bundler:2.3.4

install_gems

echo "--- :cocoapods: Publishing Pod to CocoaPods CDN"
Expand Down
60 changes: 0 additions & 60 deletions .circleci/config.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ Fixes #

To test:

---

- [ ] I have considered if this change warrants release notes and have added them to the appropriate section in the `CHANGELOG.md` if necessary.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.4
2.7.4
42 changes: 20 additions & 22 deletions Aztec/Classes/TextKit/TextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -555,43 +555,44 @@ open class TextView: UITextView {
}

@objc func handleShiftTab(command: UIKeyCommand) {

let lists = TextListFormatter.lists(in: typingAttributes)
let quotes = BlockquoteFormatter.blockquotes(in: typingAttributes)

if let list = lists.last {
indent(list: list, increase: false)

} else if let quote = quotes.last {
indent(blockquote: quote, increase: false)

} else {
return
}
decreaseIndent()
}

@objc func handleTab(command: UIKeyCommand) {

increaseIndent()
}

// MARK: - General Indentation

/// Increases the indentation of the selected range
open func increaseIndent() {
let lists = TextListFormatter.lists(in: typingAttributes)
let quotes = BlockquoteFormatter.blockquotes(in: typingAttributes)

if let list = lists.last, lists.count < maximumListIndentationLevels {
indent(list: list)

} else if let quote = quotes.last, quotes.count < maximumBlockquoteIndentationLevels {
indent(blockquote: quote)

} else {
insertText(String(.tab))
}

}


/// Decreases the indentation of the selected range
open func decreaseIndent() {
let lists = TextListFormatter.lists(in: typingAttributes)
let quotes = BlockquoteFormatter.blockquotes(in: typingAttributes)

if let list = lists.last {
indent(list: list, increase: false)
} else if let quote = quotes.last {
indent(blockquote: quote, increase: false)
}
}

// MARK: - Text List indent methods

private func indent(list: TextList, increase: Bool = true) {

let formatter = TextListFormatter(style: list.style, placeholderAttributes: nil, increaseDepth: true)
let li = LiFormatter(placeholderAttributes: nil)

Expand Down Expand Up @@ -629,9 +630,6 @@ open class TextView: UITextView {
// MARK: - Blockquote indent methods

private func indent(blockquote: Blockquote, increase: Bool = true) {



let formatter = BlockquoteFormatter(placeholderAttributes: typingAttributes, increaseDepth: true)
let targetRange = formatter.applicationRange(for: selectedRange, in: storage)

Expand Down
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
# Changelog

The format of this document is inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and the project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!-- This is a comment, you won't see it when GitHub renders the Markdown file.
When releasing a new version:
1. Remove any empty section (those with `_None._`)
2. Update the `## Unreleased` header to `## [<version_number>](https://github.com/wordpress-mobile/WordPressKit-iOS/releases/tag/<version_number>)`
3. Add a new "Unreleased" section for the next iteration, by copy/pasting the following template:
## Unreleased
### Breaking Changes
_None._
### New Features
_None._
### Bug Fixes
_None._
### Internal Changes
_None._
-->

## Unreleased

### Breaking Changes

_None._

### New Features

_None._

### Bug Fixes

_None._

### Internal Changes

- Add this changelog file. [#1365]

---

_Versions below this precede the Keep a Changelog-inspired formatting._


1.19.8
-------
* Fix Li tag when switching the list style.
Expand Down

0 comments on commit 08c85ec

Please sign in to comment.