Modal vs. Non-modal: Implementation criteria (long)

Ideas for improvements and requests for new features in XnView MP

Moderators: helmut, XnTriq, xnview

User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Modal vs. Non-modal: Implementation criteria (long)

Post by JohnFredC »

I have occasionally advocated that some XnView and MP functions should display in document tabs instead of modal dialogs.

For instance, in XnView legacy (1.9x) the Compare function (two images side-by-side) displays in a modal dialog that must be dismissed by the user before any further interaction can occur with the XnView browser.

But in MP, Pierre built the new Compare function as a document tab. The MP user may open several Compare tabs, switch between them easily, and use the Browser and image views while the Compares are still "open". Wow, what a convenience! The document tabs implementation for Compare makes using the function non-modal to the browser and image tabs, meaning the user is not "stuck" in Compare until finished with it.

My intended original subject for this post was "To tab or not to tab". But the real issue is not "tab vs. dialog", rather it is: "modal functionality vs. non-modal functionality".

In an unreleased MP beta for the new Search Similar function, Pierre built Search Similar as a modal dialog, IMO a frustrating inconvenience since one has to restart the (occasionally very long) search after having closed the dialog for any reason. After testing it for a day or so, I suggested to Pierre that Search Similar should display in a document tab instead.

He replied:
xnview wrote:...why not to use all dialogs (like batch rename, batch convert, ...) as a tab too?
Is a function best served by a modal interface (modal dialog) or by a non-modal interface (floating non-modal window or document tab)?

What criteria should the developer use? IMO this question is easily answered:
  • 1. How likely will the user task be interrupted before completion?
    2. How likely will the interruption be to use other functions within the application (i.e. XnView)?
    3. How likely will returning to the interrupted task cause a system pause (while files are re-scanned, for instance) before continuing, or (worse?) force the user to start the task completely over?
If the answer to all three questions is "very likely", then the interface for the user task should be non-modal (i.e. either a document tab or non-modal window) so that:
  • a) the user doesn't loose his/her "place" in the interrupted task and
    b) resuming the task happens quickly and no "redundant" searches (etc.) are required.
Using these three criteriae, my personal usage patterns suggest that the following MP/XnView tasks should appear in document tabs or (user choice) floating non-modal windows, not modal dialogs:
  • Compare
    Search Similar
    Slideshow
    Batch Conversion
IMO, for these functions, at least, a modal dialog implementation (though much easier to program than the non-modal approach) is very inconvenient in use.

What do others think?
John
User avatar
XnTriq
Moderator & Librarian
Posts: 6040
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Modal vs. Non-modal: Implementation criteria (long)

Post by XnTriq »

Great post, John.

When comparing images it's vital for me to be able to look at them not only side-by-side, but also in an overlay fashion, so I can rapidly switch between them.
I guess there's no other way to achieve both than with tabs in a non-modal setting.
xnview ([url=http://newsgroup.xnview.com/viewtopic.php?t=22360]Search similar[/url]) wrote:I've just finished to make the new 'search similar' on XnViewMP
So if you would like to test it on windows (before next version), please send me your email by PM

Image
Qt Developer Guide ([url=http://doc.qt.nokia.com/latest/qdialog.html]QDialog Class Reference[/url]) wrote:
A modal dialog is a dialog that blocks input to other visible windows in the same application. Dialogs that are used to request a file name from the user or that are used to set application preferences are usually modal. Dialogs can be application modal (the default) or window modal.

When an application modal dialog is opened, the user must finish interacting with the dialog and close it before they can access any other window in the application. Window modal dialogs only block access to the window associated with the dialog, allowing the user to continue to use other windows in an application.

[...]

A modeless dialog is a dialog that operates independently of other windows in the same application. Find and replace dialogs in word-processors are often modeless to allow the user to interact with both the application's main window and with the dialog.
Wikipedia (Modal window » [url=http://en.wikipedia.org/wiki/Modal_window#Criticism]Criticism[/url]) wrote: A modal window blocks all other workflow in the program until the modal window is closed. Modal windows are intended to grab the user's full attention. Users may not recognize that a modal window requires their attention, leading to confusion about the main window being non-responsive, or causing loss of the user's data input (see Mode error). However, many interface designers have recently taken steps to make modal windows more obvious and user friendly by darkening the background behind the window or allowing any mouse click outside of the modal window to force the window to close – a design called a Lightbox – thus alleviating those problems. Jakob Nielsen states as an advantage of modal dialogs that it improves user awareness: "When something does need fixing, it's better to make sure that the user knows about it". For this goal, the lightbox design provides strong visual contrast of the dialog over the rest of the visuals. The lightbox technique is now a common tool in website design.
User avatar
xnview
Author of XnView
Posts: 37892
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Modal vs. Non-modal: Implementation criteria (long)

Post by xnview »

Do you have tried the 'batch convert' as tab in 0.38?
Pierre.
User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Re: Modal vs. Non-modal: Implementation criteria (long)

Post by JohnFredC »

xnview wrote:Do you have tried the 'batch convert' as tab in 0.38?
Well, no! I've looked everywhere but do not see a method to enable 'batch convert' as tab.

How to do this?

When I select Tools->Batch convert... the modal dialog appears.
John
User avatar
xnview
Author of XnView
Posts: 37892
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Modal vs. Non-modal: Implementation criteria (long)

Post by xnview »

JohnFredC wrote:When I select Tools->Batch convert... the modal dialog appears.
Press CTRL :)
Pierre.
User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Re: Modal vs. Non-modal: Implementation criteria (long)

Post by JohnFredC »

Thanks for the tip! Indeed it works now.

My first impression is that a control layout that works well for a floating dialog may not work so well for a tab...

I have some other initial thoughts, but no time today to respond adequately.

Soon.
John
User avatar
xnview
Author of XnView
Posts: 37892
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Modal vs. Non-modal: Implementation criteria (long)

Post by xnview »

Perhaps only to have a non modal dialog will be the best??
Pierre.
User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Re: Modal vs. Non-modal: Implementation criteria (long)

Post by JohnFredC »

I like the tab approach to Batch very much (have already used it!)... it is great to leave the tab open during the day and add files to it one at a time. Also

Please don't remove the capability to show the Batch conversion in a tab. It is well hidden with the [ctrl] access and should not pose a problem for other users.

But it would be convenient to be able to add files from the browser to it after it is open.
  • 1. Drag image to Batch Convert tab

    2. "Add selection to "Batch processing"
Thanks for listening to my ideas!
John