fuselibs icon indicating copy to clipboard operation
fuselibs copied to clipboard

PageControl Transition is not updated reactively

Open Tapped opened this issue 8 years ago • 4 comments

Steps to reproduce

  1. uno build -t=dotnetexe --run the following project PageControlTransition.zip
  2. I'd expected no transition between the red and blue page.

Code

<App>
	<JavaScript>
		module.exports = {
			transistion: "None",
			alignment: "Center"
		}
	</JavaScript>
	<PageControl Transition="{transistion}">
		<Rectangle Color="Red">
			<Text Color="#fff" Alignment="{alignment}" Value="Red" />
		</Rectangle>
		<Rectangle Color="Blue">
			<Text Color="#fff" Alignment="{alignment}" Value="Blue" />
		</Rectangle>
	</PageControl>
</App>

Tapped avatar Nov 21 '17 15:11 Tapped

I suspect it's related to the following saying that it's only updated when rooted or unrooted https://github.com/fusetools/fuselibs-public/blob/master/Source/Fuse.Controls.Navigation/NavigationControl.uno#L84

Tapped avatar Nov 21 '17 15:11 Tapped

@mortoray Is this expected?

Tapped avatar Nov 21 '17 15:11 Tapped

Yes, several properties only have effect at rooting time. The complexity involved in gettiner everything supported post-rooting is too high. This means they can't be effectively bound to. We also have no way to mark them as being root-only for the docs.

Of course, if you have a high-level use-case for any property in particular we can debate changing it on a per-property basis.

mortoray avatar Nov 21 '17 17:11 mortoray

Then we have problems in preview, which expects all properties to support being changed at any time. Can we introduce an attribute for this? So that we can force reify in preview when a property decorated with that attribute changes, or give a warning to the user that the property he/she tried to set will need a reify to work properly.

Tapped avatar Nov 21 '17 18:11 Tapped