-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit 131d6ba Author: Danilo Bürger <info@danilobuerger.de> Date: Mon Nov 8 22:13:38 2021 +0100 Fix default font handling on android (#7333) * Pass null font family into typeface loader if not set ReactTypefaceUtils handles null font families to fall back to the default typeface * Provide the default typeface when calling typeface loader * Feed paint typeface as default typeface into typeface loader to support default fonts * Support default font face via AHTextView in bottom tabs * Move defaultTypeFace to typeFace loader Co-authored-by: Ward Abbass <swabbass@gmail.com> commit 5136a2e Author: Ward Abbass <swabbass@gmail.com> Date: Mon Nov 8 15:22:57 2021 +0200 React Native 66 (#7305) * RN 65 React Native upgrade + babel unit tests running as expected * RN66 - Normal unit tests working - Upgrade to RN66. - Move jest to jest config file. - Use babel-test transformer to make unit tests working - e2e tests that can run as unit wont work. * disable running e2es as units * use Hermes + Fix Reanimated * update reanimated and use babel plugin * Enable coverage * Upgrade jest and babel to 27 * enable JS e2e add animatable to transform ignore * use babel jest as transformer instead of the react native one * update android to 30 * Fix overlay insets and use non deprecated methods * Kotlin convert * tmp status * Update Detox to support iOS 15 * Fix e2e * Revert "tmp status" This reverts commit aff2b87. * prevent ReactRootViews from having ids * status bar utils static fields * Squashed commit of the following: commit 5959638 Author: Ward Abbass <warda@wix.com> Date: Wed Oct 27 13:04:00 2021 +0300 Keyboard demo playground (#7331) Adding a simple demo that can be used to demonstrate Keyboard show/dismiss when showing/dismissing modal when clicking on submit Co-authored-by: Yogev Ben David <yogev132@gmail.com> * wait for stack/modal to be shown to send didAppear this happens since RN 64 * Fix tests * Ensure modal is not already presented * use 0.66.2 Co-authored-by: svbutko <svbutko@hotmail.com> Co-authored-by: Yogev Ben David <yogev132@gmail.com> commit 9647520 Author: Ward Abbass <swabbass@gmail.com> Date: Mon Nov 8 15:05:00 2021 +0200 Android context crash when parsing options (#7342) # Issue: When parsing options, `ReactInstanceManager.getCurrentContext()` might return null, which caused color parsing to throw null exception since it assumes that context is not null. # Diagnose: This can be the case when Activity was killed but the Application still alive (Don't keep activity for example), and since js is bound to the Application lifecycle, opening the activity triggers recreating context in bg, in the meantime calling a command that requires reactContext can cause such crashes to unwanted behaviours when react context is needed. This happens internally and it looks like it is some flow where calling navigation command when react is not ready. # Fix: Since the issue did not happen before, and the crash occurred in parsing options that are independent of `ReactContext`, we can use Activity or Application as the context for such a case. commit f35d410 Author: Yogev Ben David <yogev132@gmail.com> Date: Sun Nov 7 16:59:59 2021 +0200 Remove manually dismissing all modals on setRoot (#7340) Currently we manually dismiss all modals on `setRoot`, we should instead clear it from the modal manager so that those controllers will be automatically released by the reference count system. commit 7347ed6 Author: Yogev Ben David <yogev132@gmail.com> Date: Thu Oct 28 12:50:23 2021 +0300 Fix missing props after setRoot for components with identical predefined id (#7329) * Destroy buttons along with the main react view * Revert "Destroy buttons along with the main react view" This reverts commit 27e604d. * Add pending props * Fix android button components cache Co-authored-by: Ward Abbass <warda@wix.com> Co-authored-by: Ward Abbass <swabbass@gmail.com> commit 3401467 Author: Ward Abbass <warda@wix.com> Date: Wed Oct 27 18:00:22 2021 +0300 MergeOptions, buttons got cleared when animation enabled [Android] (#7330) # Issue: When having `animateLeftButtons` or `animateRightButtons` enabled, calling `mergeOptions` frequently to update button state like enabled, colour and text etc, caused the menu animation to mess out the views inside the menu. # Diagnoses: - Calling `mergeOptions` inside `componentDidUpdate`, which can be called frequently without any options changes deducted from props like calling setState for example or changing a prop that does not have something to do the merge options call. - Every `mergeOptions` with buttons in it, would remove and re-add buttons to the toolbars which caused the animation to run, even if the change was updating button colour or enabled state. # Fix: - Introduce a more efficient way to detect updates and update each button in case there are no structural changes. - Structural changes can be: reordering, removing, adding buttons or changing buttons with the same `button.id` but a different component with no stable `componentId`. - Other changes mentioned above will call update buttons in place with no remove and re-add and no animation. - Refactor the code and enhance single responsibilities for each controller. - Added more test cases for such flows. Note: Android built-in menu, has its limits in terms of updating and rearranging action views inside it, it would be possible if we built a custom menu with an overflow that can support, order changes, and in-place updates, and that is a long road to walk. Co-authored-by: Yogev Ben David <yogev132@gmail.com> commit 5959638 Author: Ward Abbass <warda@wix.com> Date: Wed Oct 27 13:04:00 2021 +0300 Keyboard demo playground (#7331) Adding a simple demo that can be used to demonstrate Keyboard show/dismiss when showing/dismissing modal when clicking on submit Co-authored-by: Yogev Ben David <yogev132@gmail.com>
- Loading branch information
Showing
56 changed files
with
1,043 additions
and
396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { default as TestIDs, default as testIDs } from '../playground/src/testIDs'; | ||
import Android from './AndroidUtils'; | ||
import Utils from './Utils'; | ||
|
||
const { elementByLabel, elementById } = Utils; | ||
|
||
describe('Keyboard', () => { | ||
beforeEach(async () => { | ||
await device.launchApp({ newInstance: true }); | ||
await elementById(TestIDs.KEYBOARD_SCREEN_BTN).tap(); | ||
}); | ||
|
||
it('Push - should close keyboard when Back clicked', async () => { | ||
await elementById(TestIDs.TEXT_INPUT1).tap(); | ||
await expect(elementByLabel("Keyboard Demo")).not.toBeVisible(); | ||
await elementById(TestIDs.BACK_BUTTON).tap(); | ||
await expect(elementById(testIDs.MAIN_BOTTOM_TABS)).toBeVisible(); | ||
}); | ||
|
||
it('Modal - should close keyboard when close clicked', async () => { | ||
await elementById(TestIDs.MODAL_BTN).tap(); | ||
await elementById(TestIDs.TEXT_INPUT1).tap(); | ||
await expect(elementByLabel("Keyboard Demo")).not.toBeVisible(); | ||
await elementById(TestIDs.DISMISS_MODAL_TOPBAR_BTN).tap(); | ||
await expect(elementById(testIDs.MAIN_BOTTOM_TABS)).toBeVisible(); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.