FoxInCloud
Browser UI questions
Gravatar is a globally recognized avatar based on your email address. Browser UI questions
  Paul
  All
  Jun 4, 2019 @ 10:31pm

Hi,

I have two questions about changing the UI in the browser :

  • do you have an item on the FiC roadmap to remove the resizing / repositioning animation of objects? It looks interesting the first few times but I really cannot see our clients liking this distraction.
  • I have had a very brief play with page dimensions / screen resolutions and I have found :
  • a master form does not resize between different dimensions; the first device to open the page dictates the form/page dimensions for all subsequent hits. Even though I have code in the form's Init (after this.wlInitFirst section) to resize to _screen.width and _screen.height, this only works the first time the form is opened. To properly support devices with different screen sizes the form does need to be resized every time.
    Am I doing something wrong or is this not supported with a master form?
  • a child form does seem to obey the dimensions of the browser every time it is opened

Thanks
Paul

Gravatar is a globally recognized avatar based on your email address. re: Browser UI questions
  FoxInCloud Support - Thierry N.
  Paul
  Jun 5, 2019 @ 01:41am

remove the resizing / repositioning animation of objects

added this to xxx.js:

posDimEffect: true, // V 2.28.1, true for back compat
// {en} animate when position or dimensions change

just add this line to your xxx.js with value false (beware of the coma position, we recently changed to our standard, coma at start of line), animation will stop after next release.

UPDATE : bêta.9 updated, just d/l it using the link in your beta.9 notification email.

resize master form based on browser dimensions, is this supported?

difficult question because:

  1. as wFormStandardPage is a plain HTML request (as opposed to an AJAX request), the server does not get the browser dimensions
  2. as of the original design, form.Init() executes when generating the page, NOT when browser issues the InitControlsInet AJAX request just after form page has displayed. Because of that (nasty) design choice, when form.Init() executes for the master page user, _Screen.dimensions are not set for this particular user.

However, as always with VFP and FoxInCloud, here is a workaround that should work after user has used at least one form (eg. login form assuming it does not need to resize to browser dimensions):

define class xxxProcess as awProcess
…
procedure process_ante
…
if !empty(this.oSession.getSessionVar('_ScreenWidth'))
  _Screen.Width = this.oSession.getSessionVar('_ScreenWidth') && overridden by next AJAX request
  _Screen.Height = this.oSession.getSessionVar('_ScreenHeight')
endif
…
procedure process_post
…
this.oSession.setSessionVar('_ScreenWidth', _Screen.Width)
this.oSession.setSessionVar('_ScreenHeight', _Screen.Height)
…
enddefine

procedure xxxForm.Init
…
&& (resize form based on _Screen.Dimensions)
thisForm.wSessionVarSet('Width', thisForm.Width)
thisForm.wSessionVarSet('Height', thisForm.Height)
Gravatar is a globally recognized avatar based on your email address. re: Browser UI questions
  Paul
  FoxInCloud Support - Thierry N.
  Jun 5, 2019 @ 10:45pm

"posDimEffect: false" works well, thanks.

One other thing I would like to eliminate is what looks like a 2-step redrawing/resizing.
The video I have emailed you illustrates the behaviour -

  • click the button and a new form is opened
  • the form is resized to _screen.dimensions and the controls on the form are resized and repositioned as well to scale to the form
  • this happens during the form's Init()
  • in the browser you see the original dimensions and positions, followed by the new settings as well

If the form is only rendered after the Init() has finished, why do the original sizes and positions show in the browser?
In desktop mode you only see the final result.
Is it a timing problem I need to investigate?

I don't think post_ante etc is working, I will perform some more tests though.

p.s.
This is probably embarrassingly obvious, but how do I change the "FoxInCloud App" background on the FiC pages and in a child form's title bar?

Thanks
Paul

Gravatar is a globally recognized avatar based on your email address. re: Browser UI questions
  FoxInCloud Support - Thierry N.
  Paul
  Jun 6, 2019 @ 12:32am

Hi Paul,

The video I have emailed you

As we are in a public area, to help everyone understand the issue, please consider sharing your videos on a public service such as YouTube; here it is

eliminate is what looks like a 2-step redrawing/resizing

Big change…
FoxInCloud generates the same HTML for everyone, based on the .wlInitFirst state, then applies whatever user-dependent change made by form.Init()/.show()/activate() and/or members.refresh() (through the AJAX InitControlsInet request).

Nothing is impossible of course, however it'd require further investigation and a private proposal for sponsorship.

Side note: please keep in mind that your production environment (powerful server, COM mode and faster Internet down link) will work about 3 times faster than what you see in development; you may want to setup a test production server first before making a final decision on that issue.

I don't think post_ante etc is working

As explained earlier, not on the very first master form;
however, as FoxInCloud recycles the session variables across sessions, should work on the first master form at next session.

change the "FoxInCloud App" background

please see xxxTest|Prod.ini > AppName and xxxProcess.wFormHTML_c*()

Gravatar is a globally recognized avatar based on your email address. re: Browser UI questions
  Paul
  FoxInCloud Support - Thierry N.
  Jun 6, 2019 @ 02:51pm

Alright, understood; I will consider the options.
I might create a dummy master form and then have all other forms as child forms.
Or I might possibly need to have one FiC instance per device resolution and direct different users to different instances.

As you say, I will do some more speed trials at some point to see if it is a significant problem.

Paul

Gravatar is a globally recognized avatar based on your email address. re: Browser UI questions
  FoxInCloud Support - Thierry N.
  Paul
  Jun 7, 2019 @ 02:52am

have one FiC instance per device resolution

would be quite complex to make this work

© 1996-2019