Граф коммитов

1941 Коммитов

Автор SHA1 Сообщение Дата
Stephane Delcroix f493397ea9
[Core] Fixes setting to Null Binding Context in Picker (#3014)
- fixes #2499 
- fixes #2815 
- closes #2833
2018-06-12 13:33:37 +02:00
Jason Smith 4bc56b4eff Make sure stepper buttons are always the same size (#2995) fixes #2919 2018-06-11 04:00:32 -07:00
Stephane Delcroix 44182014ad
CSSG Incremental (#2940)
* CSSG Incremental

* [tests] MSBuild integration tests for CssG
2018-06-11 11:56:17 +02:00
Jason Smith 487b669aaf Make sure PlatformConfiguration created with Stepper (#2994) 2018-06-11 11:54:00 +02:00
Rui Marinho e0bc1f7a5d Merge branch '3.0.0' into 3.1.0 2018-06-08 14:19:42 -07:00
Jason Smith 1775058b22 Fix 3d rotation on UWP (#2992) fixes #2841 , fixes #2514 2018-06-08 14:18:48 -07:00
Shane Neuville b7d04ff202 ignore layering test on android (#2990) 2018-06-08 11:41:21 -07:00
Rui Marinho 090d316d16 Merge branch '3.0.0' into 3.1.0 2018-06-08 00:06:13 -07:00
Philippe Leybaert fbbbb1cca1 [UWP] Fix issue where if ItemsSouce is initially null, listview would never render (#2976) 2018-06-08 00:04:40 -07:00
Rui Marinho 5dfe751da8
Merge branch '3.0.0' into 3.1.0 2018-06-07 16:58:21 -07:00
Shane Neuville 7c80d54cad [iOS] change how ios tests for hidden elements (#2973) 2018-06-07 14:22:57 -07:00
Rui Marinho 998d87da96
[Tests] Ignore slider uitest (#2972) 2018-06-07 12:49:10 -07:00
Rui Marinho b5fd2c3c1a
[Build] Update provisioning to 15.7.2 (#2974) 2018-06-07 12:20:35 -07:00
Matthias Bruzek 3b2be6912c [iOS] Correct encoding in WebViewRenderer.LoadUrl (#2854) Fixes #2736
* [iOS] Fix regression from commit 14aa258 which escaped all URLs including crucial symbols (/,:,#,?)

- Fixes #2736

* Fix UITest for android
2018-06-07 10:49:50 -07:00
Shane Neuville d085b290d9 [UWP] Ignore setting the Z Index on initial load (#2949) fixes #2943 fixes #2653
* When elements are first added to the visual tree don't set the Z-Index
2018-06-07 10:37:12 -07:00
Shane Neuville bf84246bff [Android] Set vertical center on gravity for Search Bar (#2969) fixes #2936
* Set vertical center on gravity for Search Bar
2018-06-07 10:33:09 -07:00
Shane Neuville 82d69c2d4c [Android] Keep track of created ConditionalFocusLayouts (#2857) fixes #2829
* keep track of created ConditionalFocusLayout's so they can all be disposed of
2018-06-07 10:15:27 -07:00
Seungkeun Lee c5148263a3 Fix ScrollToPosition.MakeVisible bug (#2670) 2018-06-07 00:44:57 -07:00
kingces95 ec964de0ca Enumerate copy so list can be mutated w\o throwing (#2828)
- fixes #2576
2018-06-05 14:43:33 -07:00
Stephane Delcroix 1c97946081 [Flex] do not double layout (#2944)
Invalidating is enough, and by itself will trigger eventually a
re-layout.
2018-06-05 14:43:05 -07:00
Stephane Delcroix 454f4d37c2
[Flex] Make sure layout is invalidated on time (#2938)
When a BP changes, the BP value changes, the propertyChanged event is
fired, then the propertyChanged delegate is executed.

As the invalidation was done in the event, and setting the flexitem
property was done in the delegate, the invalidation, and relayout, was
executed with an out-of-date flexitem.

With this change, we invalidate the child size, and that'll bubble up to
invalidate the layout, as part of the property changed delegate

- fixes #2821
2018-06-05 12:59:11 -07:00
Pavel Yakovlev 67dfb16f6e [Core] Fixes '0*' RowDefinition/ColumnDefinition in Grid (#2926) fixes #2767 2018-06-05 12:40:40 -07:00
Rui Marinho a31c51ca01 Merge branch '3.0.0' into 3.1.0 2018-06-04 16:14:31 -07:00
E.Z. Hart 6be203ab2e Check ItemsSource for null in ListViewRenderer; fixes #2929 (#2934) 2018-06-04 16:10:15 -07:00
Samantha Houts 4185d8d6cc [UI Test] Revert 56771 test (#2861)
* Remove conflicting automationId from 56771 test

* Revert all changes to 56771 test
2018-06-04 16:02:33 -07:00
Rui Marinho a2c6cfa91c
[iOS] Fix secondary toolbaritems (#2870) fixes #2798
* [Controls] Add more secondary toolbar items

* [iOS] Don't try redraw toolbaritems if available size doesn't change
2018-06-04 10:46:02 -07:00
Stephane Delcroix 01727ca7a0 Merge branch '3.0.0' into 3.1.0 2018-06-04 10:15:24 -07:00
Samantha Houts 1a70c1325b [UWP,iOS] Enable screen readers to read non-interactive elements (#2876) fixes #1946
* [iOS] Default IsAccessibilityElement to true

* Update a11y gallery for new expectations

* [UWP] Don't override OnCreateAutomationPeer on LabelRenderer

This was added in #1067 to enable automated UI tests, but it has drastic effects on the Narrator and will need to be revisited.

fixes #1946
2018-06-03 19:19:46 -07:00
Stephane Delcroix a2d82b5de0
[build] post-build fix of the assembly (#2880)
- fixes #2835
2018-06-01 10:03:46 +02:00
Stephane Delcroix 012d248e2a Merge branch '3.0.0' into 3.1.0 2018-05-29 10:18:13 +02:00
Rui Marinho 7a06d9173d
[UITests] Update uitest packages 2018-05-28 16:59:50 +01:00
Jason Smith b84b35bb5f [XamlG] builds incrementally, add MSBuild integration tests (#2825)
* [XamlG] builds incrementally, add MSBuild integration tests

Context: https://github.com/xamarin/Xamarin.Forms/pull/2230

The main performance problem with the collection of MSBuild targets in
`Xamarin.Forms.targets` is they don't build incrementally. I addressed
this with `XamlC` using a "stamp" file; however, it is not quite so
easy to setup the same thing with `XamlG`.

They way "incremental" builds are setup in MSBuild, is by specifying
the `Inputs` and `Outputs` of a `<Target />`. MSBuild will partially
build a target when some outputs are not up to date, and skip it
entirely if they are all up to date.

The best docs I can find on MSBuild incremental builds:
https://msdn.microsoft.com/en-us/library/ms171483.aspx

Unfortunately a few things had to happen to make this work for
`XamlG`:
- Define a new target `_FindXamlGFiles` that is invoked before `XamlG`
- `_FindXamlGFiles` defines the `_XamlGInputs` and `_XamlGOutputs`
  `<ItemGroup />`'s
- `_FindXamlGFiles` must also define `<Compile />` and `<FileWrites />`,
  in case the `XamlG` target is skipped
- `XamlGTask` now needs to get passed in a list of `OutputFiles`,
  since we have computed these paths ahead of time
- `XamlGTask` should validate the lengths of `XamlFiles` and
  `OutputFiles` match, used error message from MSBuild proper:
  a691a44f0e/src/Tasks/Copy.cs (L505)

`XamlG` now builds incrementally!

To give some context on how much improvement we can see with build
times, consider the following command:

    msbuild Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj

If you run it once, it will take a while--this change will not improve
the first build. On the second build with the exact same command, it
*should* be much faster.

Before this commit, the second build on my machine takes:

    40.563s

After the change:

    23.692s

`XamlG` has cascading impact on build times when it isn't built
incrementally:
- The C# assembly always changes
- Hence, `XamlC` will always run
- Hence, `GenerateJavaStubs` will always run
- Hence, `javac.exe` and `dx.jar` will always run

I am making other improvements like this in Xamarin.Android itself,
that will further improve these times, such as:
https://github.com/xamarin/xamarin-android/pull/1693

~~ New MSBuild Integration Tests ~~

Added some basic MSBuild testing infrastructure:
- Tests write project files to `bin/Debug/temp/TestName`
- Each test has an `sdkStyle` flag for testing the new project system
  versus the old one
- `[TearDown]` deletes the entire directory, with a retry for
  `IOException` on Windows
- Used the `Microsoft.Build.Locator` NuGet package for locating
  `MSBuild.exe` on Windows
- These tests take 2-5 seconds each

So for example, the simplest test, `BuildAProject` writes to
`Xamarin.Forms.Xaml.UnitTests\bin\Debug\temp\BuildAProject(False)\test.csproj`:

    <?xml version="1.0" encoding="utf-8"?>
    <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <PropertyGroup>
        <Configuration>Debug</Configuration>
        <Platform>AnyCPU</Platform>
        <OutputType>Library</OutputType>
        <OutputPath>bin\Debug</OutputPath>
        <TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
      </PropertyGroup>
      <ItemGroup>
        <Reference Include="mscorlib" />
        <Reference Include="System" />
        <Reference Include="Xamarin.Forms.Core.dll">
          <HintPath>..\..\Xamarin.Forms.Core.dll</HintPath>
        </Reference>
        <Reference Include="Xamarin.Forms.Xaml.dll">
          <HintPath>..\..\Xamarin.Forms.Xaml.dll</HintPath>
        </Reference>
      </ItemGroup>
      <ItemGroup>
        <Compile Include="AssemblyInfo.cs" />
      </ItemGroup>
      <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
      <Import Project="..\..\..\..\..\.nuspec\Xamarin.Forms.targets" />
      <ItemGroup>
        <EmbeddedResource Include="MainPage.xaml" />
      </ItemGroup>
    </Project>

Invokes `msbuild`, and checks the intermediate output for files being
generated.

Tested scenarios:
- Build a simple project
- Build, then build again, and make sure targets were skipped
- Build, then clean, make sure files are gone
- Build, with linked files
- Design-time build
- Call `UpdateDesignTimeXaml` directly
- Build, add a new file, build again
- Build, update timestamp on a file, build again
- XAML file with random XML content
- XAML file with invalid XML content
- A general `EmbeddedResource` that shouldn't go through XamlG

Adding these tests found a bug! `IncrementalClean` was deleting
`XamlC.stamp`. I fixed this by using `<ItemGroup />`, which will be
propery evaluated even if the target is skipped.

~~ Other Changes ~~

- `FilesWrite` is actually supposed to be `FileWrites`, see canonical
  source of how `Clean` works and what `FileWrites` is here:
  https://github.com/Microsoft/msbuild/issues/2408#issuecomment-321082997
- Moved `DummyBuildEngine` into `MSBuild` directory--makes sense?
  maybe don't need to?
- Added a `XamlGDifferentInputOutputLengths` test to check the error
  message
- Expanded `DummyBuildEngine` so you can assert against log messages
- Changed a setting in `.Xamarin.Forms.Android.sln` so the unit test
  project is built
- My VS IDE monkeyed with a few files, and I kept any *good* (or
  relevant) changes: `Xamarin.Forms.UnitTests.csproj`,
  `Xamarin.Forms.Xaml.UnitTests\app.config`, etc.

There were some checks for `%(TargetPath)` being blank in the C# code
of `XamlGTask`. In that case it was using `Path.GetRandomFileName`,
but we can't do this if we are setting up inputs and outputs for
`XamlG`. I presume this is from the designer and/or design-time builds
before `DependsOnTargets="PrepareResourceNames"` was added. I tested
design-time builds in VS on Windows, and `$(TargetPath)` was set. To
be sure we don't break anything here, I exclude inputs to `XamlG` if
`%(TargetPath)` is somehow blank.

See relevant MSBuild code for `%(TargetPath)` here:

0515178090/src/Tasks/Microsoft.Common.CurrentVersion.targets (L2822)

~~ Future changes ~~

CssG needs the exact same setup, as it was patterned after `XamlG`.
This should probably be done in a future PR.

* [msbuild] improved lookup of Xamarin.Forms.targets in integration tests

Context: https://devdiv.visualstudio.com/DevDiv/_build?buildId=1717939
Context: https://devdiv.visualstudio.com/DevDiv/_build?buildId=1718306

It looks like the VSTS builds for release branches are running tests
in a staging directory. This means we can't reliably import
`Xamarin.Forms.targets` as what was working locally in the
Xamarin.Forms source tree.

So to fix this:
- Look for `.nuspec/Xamarin.Forms.targets`, at the default location
  and then using the `BUILD_SOURCESDIRECTORY` environment variable as
  a fallback
- Copy all `*.targets` files to the test directory
- Our `*.csproj` files under test can import the file from there.

We have to copy the targets files here to be sure that MSBuild can
load `Xamarin.Forms.Build.Tasks.dll`, which is also referenced by the
unit tests.

I also made the tests abort earlier if they can't find
`Xamarin.Forms.targets`.
2018-05-25 15:39:17 +01:00
Rui Marinho 9e4401039d
[MacOS] Fix issue setting no pages to ArrangedObjects on CarouselPage 2018-05-24 15:58:21 +01:00
Rui Marinho 29b998c1be Merge branch '3.0.0' into 3.1.0 2018-05-24 15:08:21 +01:00
Pavel Yakovlev 8f3d7af41b [UWP] Fixed sync of ListView items with ListViewProxy (#2512) Fixes #2485 2018-05-24 14:44:36 +01:00
Shane Neuville 4df0580c98 delay setting of source to help verify ui test block (#2804) 2018-05-24 11:27:33 +01:00
Samantha Houts a6a3b25ade Merge branch '3.0.0' into 3.1.0 2018-05-23 11:26:13 -07:00
Rui Marinho 3fd45e9697 [Nuspec]Remove reference to 23.3.0 support libs (#2802) 2018-05-23 10:27:09 -07:00
Shane Neuville b02a31090e fixes #2653 on uwp set the Z Index when children aren't added to the end of the stack (#2762) 2018-05-23 16:47:38 +02:00
Shane Neuville 63aa7f4538 fixes #2681 moved UpdateLayout call in ListViewRenderer into BeginInvokeOnMainThread otherwise UWP was creating a duplicate Cell and causing a deadlock in some cases (#2773) 2018-05-23 16:43:16 +02:00
Stephane Delcroix e73214ee49
[Binding] avoid AmbiguousME on redefined property (#2766)
- fixes #2632
2018-05-23 11:03:54 +02:00
Stephane Delcroix d9b68c89de
[Xaml] avoid AmbiguousMatchException (#2797)
- fix #2796
2018-05-23 08:28:59 +02:00
Samantha Houts 3d01f09517 [Core] Remove Guid.NewGuid() calls from performance tracking (#2791)
* Use out parameter to avoid boilerplate

* Swap Guid reference for long reference

* Remove unnecessary null check
2018-05-22 16:54:21 -07:00
Samantha Houts 348b443861 [iOS] Restore NativeViewWrapper registration (#2772)
* Add RegistrarValidationService to test presence of renderers

* [iOS] Restore NativeViewWrapper registration

fixes #2757

* [Android] Prevent NRE in ListViewAdapter
2018-05-22 11:24:47 -07:00
Stephane Delcroix 522a3d7f77 Merge branch '3.0.0' into 3.1.0 2018-05-22 10:46:20 +02:00
Samantha Houts 74702d9f3a [iOS] `PanGestureRecognizer`s on iOS will now pass through pans to other views. (#2669)
* [iOS] Enable ShouldRecognizeSimultaneously on PanGesture

fixes #2299

* Add test case for 2296

* Fix test case name/number

* Convert fix to opt-in platform specific

* Update test case to use platform specific
2018-05-18 19:22:56 -07:00
Ravinder Jangra 4e0fbfcb57 Android TimePicker FontSize & FontFamily fix (#2749)
- fixes #2745
2018-05-17 15:49:49 +02:00
Shane Neuville 732f4d5a99 fixes #2167 still set the TextView.Gravity property baed on the Horizontal Alignment (#2743) 2018-05-17 10:21:24 +02:00
Rui Marinho 65e122c61d
[Build] Add provision for 15.7 (#2724) 2018-05-15 18:43:36 +01:00
Rui Marinho 6beff058da
Merge branch '3.0.0' into 3.1.0 2018-05-15 16:11:30 +01:00