* New Multifact plugin

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
User avatar
PyreneesPirate
Famous
Posts: 157
Joined: 06 Feb 2009 20:30
Family Historian: V7
Location: Montamat, SW France

Re: New Multifact plugin

Post by PyreneesPirate »

As an addendum, I can drag the window around, but I cannot see the bottom of the window and unlike Mike, I cannot even adjust the width. Hope it helps.

PP
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Multifact plugin

Post by tatewise »

Helen, you must be having a bad day.
Your attachment has the wrong filetype - should be .fh_lua

In Plugin Store, I assume you have chosen My Plugins top right and logged in OK.
Multifact should be listed on left with Edit & Delete buttons.
In Edit Plugin dialogue delete existing File using Remove file button, then upload new File.

My screen is 1600 x 900 at 100% scale, and Plugin dialogue runs off the bottom and cannot be shrunk.
PP's screen is physically smaller than mine.
I suspect the MinimumSize () function is compromised by something expanding vertically.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Multifact plugin

Post by ColeValleyGirl »

In Edit Plugin dialogue delete existing File using Remove file button, then upload new File.
Mike, I do not have a Remove File button at this point. I have assumed you mean the Remove File X icon? If so, the plugin store version should have been updated,
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Multifact plugin

Post by tatewise »

Yes, I meant X in circle icon with tooltip Remove file.

Latest attachment has syntax error at line 80 and 91 and several others including missing fhloadrequire
if GetHelpFile() = true then
should be
if GetHelpFile() == true then
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Multifact plugin

Post by ColeValleyGirl »

Weird -- it runs for me without errors. Ill check tomorrow.

Even weirder -- there is no Help File! Which is as expected.
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Multifact plugin

Post by ColeValleyGirl »

May now be fixed -- and at least I have a copy of the code my PC ate for another plugin earlier today :)
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Multifact plugin size

Post by ColeValleyGirl »

OK. There is something I can do about the startup size, but it isn't ideal for anyone.

First off, the minimum size for the Plugin dialog is currently calculated so that you can expand all the sections and have everything visible -- you can enlarge it but you can't shrink beneath that 'show everything size'. It starts up with the citation details hidden (to make more space for other fields) but the size is calculated to allow them to be un-hidden and still keep everything minimally visible (perhaps with scrollbars on some fields).

If I make the minimum plugin dialog size smaller, I would have to calculate it based on only having one of the sections expanded (the Fact detail section, as that's likely to be the most used). It would NOT be possible to have all three sections expanded and visible at the same time on a 'smaller' screen and (most importantly from a UI viewpoint) the 'action' buttons could vanish 'inexplicably' if more than on section was expanded, without any indication for the casual user on how to bring them back into view. On larger screen, the user would have to resize the dialog every time they run it to overcome those usability issues.

Mike, do you have any experience with iup.Scrollbox? It might offer another solution.. except at the moment I can only get it to start up at the minimum possible size; plus as the window scrolls it is constantly and annoyingly redrawn; and if the user doesn't position themself exactly over the scroll bar when scrolling, they can inadvertently select a value in one of the dropdown boxes which doesn't make for foolproof data entry.
User avatar
Jane
Site Admin
Posts: 8507
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: New Multifact plugin

Post by Jane »

Can I suggest a really simple option. If you reduce the default font to 8 rather than 10 the dialog drops to 850, which hopefully will fit on most screens. So you could check SCREENSIZE and reduce the font size at start up.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Multifact plugin

Post by ColeValleyGirl »

OK -- I've used Jane's idea about testing for screensize and also made a couple of other tweaks to how the initial size is calculated.

As far as I've been able to test, it displays completely (with nothing overflowing) on a screen 864 deep; a screen 800 deep will cut off the title bar and the very bottom of the window but the plugin is still usable. Could people with small screens test that I'm right, please?

Of course, if you have text scaling set to something other than 100% on your screen, I can't guarantee how it will look.

Edited to remove superseded plugin
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Multifact plugin

Post by tatewise »

On my 1600 x 900 screen at 100% scale it fits OK.
You may get some users complaining that the text is too small to read easily.

I am sure there are other solutions, but have not had time to investigate.

BTW: The Plugin filename, as listed in Tools > Plugins, has changed from Multifact to multifact.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Multifact plugin

Post by ColeValleyGirl »

Thanks, Mike. And yes, the font will be too small for some people but changing the layout much more will IMO severely affect the usability. Scrollbox might be a solution but with the version of iup we have, I can't see how to overcome the limitations.
User avatar
Valkrider
Megastar
Posts: 1563
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: New Multifact plugin

Post by Valkrider »

An interesting issue, BUT NOT SOMETHING TO WORRY ABOUT, with a PlayOnMac install the plugin opens in a separate window not in the FH window and it opens at the default size.
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Multifact plugin

Post by tatewise »

Colin, not sure I understand.
Plugins with a GUI always open in a separate window (in front of the FH window) so not clear what is different?
What exactly do you mean by default size?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Valkrider
Megastar
Posts: 1563
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: New Multifact plugin

Post by Valkrider »

I resized the FH window to be very small, about 500 high expected to see the cut off behaviour which I didn't. The Multifact plugin input box opened at its default size, exactly the same as when I had my screen set to ~1600 high (I have a 5k screen). But instead of the input box overlaying the FH window it was completely outside the FH window bounds.

Does that make sense now?
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Multifact plugin

Post by tatewise »

Ah yes! Changing the FH window size is irrelevant.
The Plugin is checking the screensize of the monitor to adjust its Plugin window to fit, and is always centred.
So unless you can customise your screen display to use half the pixel resolution you won't see any difference.

Interestingly, the various FH popup modal windows are positioned inconsistently.
Most initially open centred on the FH window, wherever it happens to be, e.g. File > Project Window, Tools > Fact Types
A few initially open centrally on the monitor screen regardless of FH window, e.g. Tools > Work with Data
But thereafter during the FH session they remember their position when last closed.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
PyreneesPirate
Famous
Posts: 157
Joined: 06 Feb 2009 20:30
Family Historian: V7
Location: Montamat, SW France

Re: New Multifact plugin

Post by PyreneesPirate »

Hello again,

Just an update......I removed vers 1.4 and reinstalled 1.5. On my laptop (screen resolution, 1600 x 900), it appears exactly the same as in vers 1.4. Too big for the screen, I cannot see the bottom of the window and I can just drag the margins to make it wider but not narrower or smaller from top to bottom.

I have attached two screen dumps if it helps.

Cheers
PP
Attachments
multifact screen issue.JPG
multifact screen issue.JPG (80.65 KiB) Viewed 9632 times
multifact screen issue 2.JPG
multifact screen issue 2.JPG (41.66 KiB) Viewed 9632 times
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Multifact plugin

Post by ColeValleyGirl »

Have you tried 1.6 which I posted here
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Multifact plugin

Post by tatewise »

It is getting confusing with Plugin Store V1.5 dated 30 March 2019 with name multifact.
Also the later Forum posted V1.6 dated 21 June 2019 with name multifact.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Multifact plugin

Post by ColeValleyGirl »

Mike,

Version 1.5 was late updated on Mar 2019 but only uploaded yesterday as the fixes in it were't urgent.

Version 1.6 will be uploaded to the store tomorrow, at which point I will correct the file name, as it appears perversely that the file name takes precedence over the name of the Plugin in the store and in its code...
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Multifact plugin

Post by tatewise »

I have found some time to investigate the Plugin GUI layout and with a few simple changes made it more user friendly:

Line 388 in MakeText use options.visiblelines or "4" instead of "2" otherwise some boxes too small
Line 412 in SetMinimumSize insert dlg.size = iup.NULL essential to force resizing
Line 442 in MakeExpander insert e.action = function() SetMinimumSize(dlgmain) end resize on expander change
Line 892 in return MakeExpander change "OPEN" to "CLOSE" to start citations closed
Line 1328 delete boxCitation.state = "CLOSE" now not needed due to change above

With those changes whenever an expander is opened/closed the GUI window is resized, and its minimum size set.
Thus the user can always bring fields & buttons into view by opening/closing an expander or two.

There are probably other improvements if I look a bit deeper.

BTW: It gets confusing if the Plugin date is not updated to the Plugin Store date when Plugin is actually submitted rather when it was last edited.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Multifact plugin

Post by tatewise »

Another small change that I thought allowed larger names and facts without wrapping is below:
Line ~966 in local boxPeople replace hbox with vbox
Line ~1032 in return replace hbox with vbox

Line ~337 in MakeButton replace "10x2" with "10x0" so buttons same height as boxes.

Line ~1328 use dlgmain:showxy(iup.CENTERPARENT,8) to position dialogue near top so all the expanders can be opened without dialogue going off bottom of screen.

With some further adjustment of visiblelines for various boxes it is possible to increase the smaller font to 9 point.

I suspect reducing the margin on some vbox/hbox items may improve things further.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Multifact plugin

Post by ColeValleyGirl »

Mike,

I'm not ignoring your suggestions but it will take me some time to look at them -- releasing (unplanned) v1.5 and then v1.6 has meant I have two branches of code development to reconcile (as I am working slowly on a development of 1.5 that is not 1.6. Also, some of your suggestions affect my 'common' code elements, so I'll need to regression test all my plugin that depend on them (including the ones written for private use).

Give me a few weeks -- in the meantime, I'm hoping PyreneesPirate can work with 1.6
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Multifact plugin

Post by tatewise »

PP could also apply the changes if wishing to experiment.


I realise some changes impact your 'common' code elements, but some can be moved outside.

Line ~337 in MakeButton replace "10x2" with "10x0" so buttons same height as boxes.
Allow the padding to be a parameter that defaults to "10x2" but can be set wherever MakeButton is called.

Line 388 in MakeText use options.visiblelines or "4" instead of "2" otherwise some boxes too small.
Instead, wherever MakeText is called set visiblelines = "4" where not already defined.

Line 412 in SetMinimumSize insert dlg.size = iup.NULL essential to force resizing and needs to be in 'common' code.

Line 442 in MakeExpander insert e.action = function() SetMinimumSize(dlgmain) end resize on expander change.
Instead, where MakeExpander is called, add the same action to each expander control.


Yet another possible solution that you will recognise from many of my Plugins is to use tabs instead of expanders.
The problem with the expanders is when all are open the dialogue is very tall, but tabs only open one at a time.
So, the Source, Individual(s) and Fact(s) controls would sit at the top of the dialogue outside the tabs.
Then below there would be the three tabs each one similar to one of the three expanded expanders.
The dialogue size would then be set from the start and should not need any font size adjustment.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Multifact plugin

Post by ColeValleyGirl »

Horses for courses. I don't like tabs as an interface for routine data entry. I use them for example in the Research Planner for configuring templates, but for something like Multifact it's very helpful to have the option to to see everything at once .
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Multifact plugin

Post by ColeValleyGirl »

OK, Mike, I've had a chance to look at some of your suggestions:
Line 388 in MakeText use options.visiblelines or "4" instead of "2" otherwise some boxes too small
Line 412 in SetMinimumSize insert dlg.size = iup.NULL essential to force resizing
Line 442 in MakeExpander insert e.action = function() SetMinimumSize(dlgmain) end resize on expander change
Line 892 in return MakeExpander change "OPEN" to "CLOSE" to start citations closed
Line 1328 delete boxCitation.state = "CLOSE" now not needed due to change above
Resizing a window without user intervention goes against all UX best practice guidelines -- because it is incredibly annoying, especially if you've arranged a set of windows on your screen to support the way you want to work -- in my case I dock a source image to the left and FH (and than the plugin) on the right. Try it -- dock the plugin; every time you change the state of an expander, the plugin resizes and moves.

So this isn't a starter.
Post Reply