Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uno.UI regression: Buttons work erratically #2035

Closed
1 of 7 tasks
SuperJMN opened this issue Nov 6, 2019 · 12 comments
Closed
1 of 7 tasks

Uno.UI regression: Buttons work erratically #2035

SuperJMN opened this issue Nov 6, 2019 · 12 comments
Assignees
Labels
kind/bug Something isn't working kind/regression Something was working, now it isn't platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform
Milestone

Comments

@SuperJMN
Copy link
Contributor

SuperJMN commented Nov 6, 2019

Problem

Given a simple calculator app. The calculator buttons do nothing most of times when they're clicked.

Details

There seems to be a regression in Uno.UI, since there's a version in which things work perfectly and a newer version breaks the correct behavior.

Repro steps

  1. Clone the repo at https://github.com/SuperJMN/UnoSimpleCalc/
  2. Checkout this commit to be sure the problem is there: ab759ce435683b29ed7882d90e06e5d9544df116 (last commit as 11-06-2019)
  3. Run the Web Assembly app. The buttons will work:
  4. Update the Uno.UI package to any version between 2.0.512-dev.3446 and 2.0.512-dev.3728
  5. Run the Web Assembly app. The buttons will not work or will work erratically.

I did some research to isolate the regression. This is the table of results I have:

image

As you can see, the last version that worked is 2.0.324-dev.3171 and the first version that doesn't work is 2.0.512-dev.3446. In the middle, the are some version in which the build is broken (denoated by x).

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • Windows
  • Build tasks
  • Solution Templates
@SuperJMN SuperJMN added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Nov 6, 2019
@carldebilly carldebilly added the kind/regression Something was working, now it isn't label Nov 6, 2019
@dr1rrb
Copy link
Member

dr1rrb commented Nov 6, 2019

Version 512 correspond to the merge of #1256 which is "kind-of" related to buttons clicks 😜 I'll try to have a look, but in the meantime, do you have anything in the logs?

@SuperJMN
Copy link
Contributor Author

SuperJMN commented Nov 6, 2019

Hey @dr1rrb thanks for the quick response! I don't have logs, but maybe @paulovila has more info!

@carldebilly carldebilly added platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform and removed triage/untriaged Indicates an issue requires triaging or verification labels Nov 6, 2019
@SuperJMN
Copy link
Contributor Author

SuperJMN commented Nov 6, 2019

This is the Chrome Console log I gathered.

localhost-1573058769818.log

Please, ignore the "Pressed X" entries. It's a `Console.WriteLine' we added to log when a command executes.

@dr1rrb
Copy link
Member

dr1rrb commented Nov 6, 2019

Actually I don't even get the "Pressed X" 😕 (even if I remove the #if __WASM__).

I can see that the "pointerdown" and "pointerup" events are dispatched to the managed code, and we get back the pointer capture / release sequence ... but nothing happen.

@dr1rrb
Copy link
Member

dr1rrb commented Nov 8, 2019

Ok so I looked a bit deeper, this is due to the ViewBox : coordinates of the pointer events are "scaled" accordingly, but when in ButtonBase we validate if the pointer was released over the button, the location.<X|Y> might be greater than the Actual<Width|Height> (which are not "scaled").

(BTW: it means that if you always press the top left corner of buttons, it works properly)

@paulovila
Copy link

That's a good start, the area of the button is clickable and the hovering is consistent, but the command is not being triggered

@dr1rrb
Copy link
Member

dr1rrb commented Nov 14, 2019

Hi @paulovila, on my side I don't have any issue with the command not being triggered, at least on WASM. If you have to opportunity to test with this fix #2091 and let me know if it works also for you.

@paulovila
Copy link

Hi @dr1rrb thanks, still no joy, I checked out dev/dr/TouchTrans and overwrote Uno.UI package , still the command doesn't get fired

@jeromelaban jeromelaban added this to the 2.0 milestone Nov 18, 2019
@jeromelaban jeromelaban reopened this Nov 19, 2019
@dr1rrb
Copy link
Member

dr1rrb commented Nov 19, 2019

Hi @dr1rrb thanks, still no joy, I checked out dev/dr/TouchTrans and overwrote Uno.UI package , still the command doesn't get fired

Hi @paulovila , I just tried:

  1. git checkout master
    git pull
    git clean -fdx
  2. Open the "unoSimpleCalc.sln" in VS 2019
  3. Manage nuget packages, and install latest dev version of Uno.UI (2.0.512-dev.4021)
  4. Run "UnoSimpleCalc.Wasm", and I'm not able to reproduce the issue neither on Firefox, Edge nor Chrome

Are you able to give me more info on how you reproduce it?

Note: I also checked that my nuget update was successful by decompiling bin/debug/netstandard2.0/Uno.UI.dll with ILSpy and validating that the assembly AssemblyInformationalVersion attribute is 2.0.512-dev.4021+Branch.master.Sha.869282ee6c94cfca7e6d25c01f5501bb86bd6ad0.869282ee6c94cfca7e6d25c01f5501bb86bd6ad0

@paulovila
Copy link

paulovila commented Nov 19, 2019

It's working fine , I've tried in Chrome, and Edge, great job!

@dr1rrb
Copy link
Member

dr1rrb commented Nov 19, 2019

Great news, then I close this issue 😀

@dr1rrb dr1rrb closed this as completed Nov 19, 2019
@SuperJMN
Copy link
Contributor Author

Great work! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working kind/regression Something was working, now it isn't platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform
Projects
None yet
Development

No branches or pull requests

6 participants