Skip to content

Commit

Permalink
Merge pull request #711 from wordpress-mobile/release/1.0.2
Browse files Browse the repository at this point in the history
Release v1.0.2
  • Loading branch information
hypest authored Mar 7, 2019
2 parents 44f1d99 + b1063f5 commit 38a42c9
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 10 deletions.
64 changes: 64 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
version: 2.1

commands:
yarn-install:
steps:
- restore_cache:
name: Restore Yarn Cache
keys:
- yarn-{{ checksum "yarn.lock" }}
- run:
name: Yarn Install
command: yarn install --frozen-lockfile
- save_cache:
name: Save Yarn Cache
key: yarn-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn

jobs:
checks:
parameters:
platform:
type: string
default: ""
check-tests:
type: boolean
default: false
check-correctness:
type: boolean
default: false
docker:
- image: circleci/node:8
steps:
- checkout
- run:
name: Checkout Gutenberg
command: |
git submodule init
git submodule update --recursive
- yarn-install
- run:
name: Set Environment Variables
command: |
echo 'export CHECK_CORRECTNESS=<<parameters.check-correctness>>' >> $BASH_ENV
echo 'export CHECK_TESTS=<<parameters.check-tests>>' >> $BASH_ENV
echo 'export TEST_RN_PLATFORM=<<parameters.platform>>' >> $BASH_ENV
- run:
name: Run Checks
command: bin/ci-checks-js.sh

workflows:
gutenberg-mobile:
jobs:
- checks:
name: Check Correctness
check-correctness: true
- checks:
name: Test iOS
platform: ios
check-tests: true
- checks:
name: Test Android
platform: android
check-tests: true
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ matrix:
cache:
yarn: true
script:
- ./.travis/travis-checks-js.sh
- bin/ci-checks-js.sh
- language: node_js
node_js: 8
env:
Expand All @@ -21,7 +21,7 @@ matrix:
cache:
yarn: true
script:
- ./.travis/travis-checks-js.sh
- bin/ci-checks-js.sh
- language: node_js
node_js: 8
env:
Expand All @@ -31,4 +31,4 @@ matrix:
cache:
yarn: true
script:
- ./.travis/travis-checks-js.sh
- bin/ci-checks-js.sh
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg-mobile",
"version": "1.0.1",
"version": "1.0.2",
"private": true,
"config": {
"jsfiles": "./*.js src/*.js src/**/*.js src/**/**/*.js",
Expand Down
11 changes: 5 additions & 6 deletions react-native-aztec/ios/RNTAztecView/RCTAztecView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -267,16 +267,15 @@ class RCTAztecView: Aztec.TextView {
(start, end) = (end, start)
}

var result: [String : Any] = [
"text": getHTML(),
"selectionStart": start,
"selectionEnd": end
]
var result: [AnyHashable : Any] = packForRN(getHTML(), withName: "text")

result["selectionStart"] = start
result["selectionEnd"] = end

if let selectedTextRange = selectedTextRange {
let caretEndRect = caretRect(for: selectedTextRange.end)
// Sergio Estevao: Sometimes the carectRect can be invalid so we need to check before sending this to JS.
if !(caretEndRect.isInfinite || caretEndRect.isEmpty || caretEndRect.isNull) {
if !(caretEndRect.isInfinite || caretEndRect.isNull) {
result["selectionEndCaretX"] = caretEndRect.origin.x
result["selectionEndCaretY"] = caretEndRect.origin.y
}
Expand Down

0 comments on commit 38a42c9

Please sign in to comment.