xamarin / Xamarin.PropertyEditing

MIT License
24 stars 16 forks source link

[Mac] Initial Binding Editor Dialog. #561

Closed CartBlanche closed 5 years ago

CartBlanche commented 5 years ago

Fixes: https://github.com/xamarin/Xamarin.PropertyEditing/issues/284

CartBlanche commented 5 years ago

@vancura Please cast your design eye over these screenshots...

Screen Shot 2019-03-20 at 15 59 05 Screen Shot 2019-03-20 at 15 59 36 Screen Shot 2019-03-20 at 15 59 58
vancura commented 5 years ago

A couple of comments:

image

vancura commented 5 years ago

image

(left my design, right your screenshot)

Do you show the helper text when there's nothing listed?

ermau commented 5 years ago

Left panel has no header (in my comp it writes "Ancestor Type and Level")

It actually does have a header, you can see it in the second screenshot. It's dependent on the selected binding type.

vancura commented 5 years ago

It actually does have a header, you can see it in the second screenshot. It's dependent on the selected binding type.

Can we display it at all times?

ermau commented 5 years ago

Can we display it at all times?

I don't know that it makes sense to show it at all times. What would we show in the header for the scenario in the current screenshot? It's essentially a call to action and there isn't always an action on the left hand side.

vancura commented 5 years ago

@ermau: Ok, fair enough :)

CartBlanche commented 5 years ago

https://github.com/xamarin/Xamarin.PropertyEditing/pull/561#discussion_r268811108 @ermau Not sure what you mean by "marked as resolved" and not fixed here?

CartBlanche commented 5 years ago

@vancura Can you please cast your eye over these screen shots.

Screen Shot 2019-04-10 at 11 45 33 Screen Shot 2019-04-10 at 10 56 25 Screen Shot 2019-04-09 at 14 49 53

I'm investigating why the More properties Flags isn't respecting the constraints, but think I've addressed the issues you pointed out?

vancura commented 5 years ago

Your redline 🐒 says hi.

Basic Window Metrics

image

Header Section

image

Table Section

image

Bottom Section

image

Table Margins

image

Type Selector Window Metrics

image

Other Selector Window Inconsistencies

image

Your redline 🐒 thanks and says bye.

CartBlanche commented 5 years ago

@vancura Here are some updated screenshots, based on using Figma to double check spacing and heights. These aren't 100% complete, but want to post these for you check before I push more pixels around.

Screen Shot 2019-04-11 at 16 45 50

I don't think the EditBox in the PathSelector looks good flush with box edge.

Screen Shot 2019-04-11 at 16 46 11

I don't think we can make the type selector flush to the box, as it would clip the Show All Assemblies checkbox, on the left.

Screen Shot 2019-04-11 at 16 46 42 Screen Shot 2019-04-11 at 16 47 23
CartBlanche commented 5 years ago

@vancura

Please use standard line height in the tree view, lines are too separated.

We are using the default height for each tree node.

No help button? Just asking, if we don't have the contents, no worries. But help is always good.

No help button for now. This may be added in future.

vancura commented 5 years ago

This is looking amazing, well done @CartBlanche!

Screen Shot 2019-04-11 at 16 45 50

I don't think the EditBox in the PathSelector looks good flush with box edge.

Can you try something like this? I removed the gap between the EditBox and the PathSelector, and added some space around the label inside the EditBox.

55967068-f142dd00-5c79-11e9-9038-47904faa766d

I don't think we can make the type selector flush to the box, as it would clip the Show All Assemblies checkbox, on the left.

Can we have something like this?

Untitled-1

Changes:

You said:

We are using the default height for each tree node.

Well, in that case why both these selectors have different node height? From what I see here they contain a similar type of information, so they should have the same metrics. When next to each other it's odd how the node height differs.


55967071-f142dd00-5c79-11e9-98fa-b587e6af4192

A couple of changes:

CartBlanche commented 5 years ago

@vancura I think these new changes look good....

Screen Shot 2019-04-13 at 22 07 41

As we are reusing the Type Selector Control in the CreateValueConvertorWindow the checkbox will be offset.

Screen Shot 2019-04-13 at 01 20 39
vancura commented 5 years ago

This is awesome! Thanks for all the hard work @CartBlanche!

CartBlanche commented 5 years ago

@ermau Yes It was a subscription issue and I wasn't setting the Appearance when creating the BindingDialog or the ValueConvertor Dialog. Both fixed now.

CartBlanche commented 5 years ago

@ermau I'm not seeing this behaviour. The only thing that has been a theme bug for a while is the fact the wrong tab is on by default. This isn't related to the Binding Dialog change as it was around before then. I've pushed a fix for the tabs to be properly synced, as that needed fixing anyway.

CartBlanche commented 5 years ago

@ermau could you please post a video of the behaviour you are seeing?

ermau commented 5 years ago

I don't have a screen recorder on mac, but here are my exact steps:

  1. Scroll down to the "String" property, create binding
  2. Cancel create binding dialog
  3. Switch to dark theme
  4. Create binding on "String"

You will get the light themed dialog against dark:

Screen Shot 2019-05-29 at 13 02 18

Then when you close that dialog you'll get the dark themed one:

Screen Shot 2019-05-29 at 13 04 24
CartBlanche commented 5 years ago

I see it now. Very odd. Investigating.

CartBlanche commented 5 years ago

Right, events not being unsubscribed correctly. Appears to be fixed now.

CartBlanche commented 5 years ago

OK Tested both scenarios this time. Think I have the right fix for it. Doing a little more testing.

CartBlanche commented 5 years ago

@ermau I'm unable to find an elegant solution to the event subscription issue. Only found hacks, which I don't want to push as they weren't working 100% either. Can't see the woods for the trees anymore. Needs a new pair of eyes, when you have a sec.

ermau commented 5 years ago

@CartBlanche You needed to dig deeper. Your current implementation of the event subscription (in the ViewModel setter) is the correct one; the actual issue is separate.

We know that we're getting two dialogs, so we check for double subscription. We see one subscription when the property shows up, and then we see another when the theme changes. What we don't see is an unsubscribe at any point. Combine that with that one dialog is the old theme and we can deduce that when we change the theme, the property buttons are being re-created (as the old one with the old theme is still firing the event.) Now, that's an issue by itself, we should be reusing them when possible but since we may not always be able to, we need to ensure old discarded ones aren't still attached to anything by setting its View Model to null. A change was made for editors a while back to ensure this, but when property button moved around it was not included, I've comitted the fix to your branch.