Add a humanMoment unit to the various Units
Time in milliseconds equivalent to the theoretical human moment, which can be used to determine whether how long to wait until the user should be informed of something, or can be used as the limit for how long something should wait before being automatically initiated. Some examples: - When the user types text in a search field, wait no longer than this duration after the user completes typing before starting the search - When loading data which would commonly arrive rapidly enough to not require interaction, wait this long before showing a spinner This might seem an arbitrary number, but given the psychological effect that three seconds seems to be what humans consider a moment (and in the case of waiting for something to happen, a moment is that time when you think "this is taking a bit long, isn't it?"), the idea is to postpone for just before such a conceptual moment. The reason for the two seconds, rather than three, is to function as a middle ground: Not long enough that the user would think that something has taken too long, for also not so fast as to happen too soon. See also https://www.psychologytoday.com/blog/all-about-addiction/201101/tick-tock-tick-hugs-and-life-in-3-second-intervals (the actual paper is hidden behind an academic paywall and consequently not readily available to us, so the source will have to be the blog entry above) see also https://invent.kde.org/frameworks/kirigami/-/merge_requests/268
This commit is contained in:
parent
fb16e8eb20
commit
8a35f83c4b
@ -268,4 +268,9 @@ int Units::veryLongDuration() const
|
|||||||
return m_longDuration * 2;
|
return m_longDuration * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Units::humanMoment() const
|
||||||
|
{
|
||||||
|
return 2000;
|
||||||
|
}
|
||||||
|
|
||||||
#include "moc_units.cpp"
|
#include "moc_units.cpp"
|
||||||
|
@ -131,6 +131,36 @@ class Units : public QObject
|
|||||||
*/
|
*/
|
||||||
Q_PROPERTY(int veryLongDuration READ veryLongDuration NOTIFY durationChanged)
|
Q_PROPERTY(int veryLongDuration READ veryLongDuration NOTIFY durationChanged)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Time in milliseconds equivalent to the theoretical human moment, which can be used
|
||||||
|
* to determine whether how long to wait until the user should be informed of something,
|
||||||
|
* or can be used as the limit for how long something should wait before being
|
||||||
|
* automatically initiated.
|
||||||
|
*
|
||||||
|
* Some examples:
|
||||||
|
*
|
||||||
|
* - When the user types text in a search field, wait no longer than this duration after
|
||||||
|
* the user completes typing before starting the search
|
||||||
|
* - When loading data which would commonly arrive rapidly enough to not require interaction,
|
||||||
|
* wait this long before showing a spinner
|
||||||
|
*
|
||||||
|
* This might seem an arbitrary number, but given the psychological effect that three
|
||||||
|
* seconds seems to be what humans consider a moment (and in the case of waiting for
|
||||||
|
* something to happen, a moment is that time when you think "this is taking a bit long,
|
||||||
|
* isn't it?"), the idea is to postpone for just before such a conceptual moment. The reason
|
||||||
|
* for the two seconds, rather than three, is to function as a middle ground: Not long enough
|
||||||
|
* that the user would think that something has taken too long, for also not so fast as to
|
||||||
|
* happen too soon.
|
||||||
|
*
|
||||||
|
* See also
|
||||||
|
* https://www.psychologytoday.com/blog/all-about-addiction/201101/tick-tock-tick-hugs-and-life-in-3-second-intervals
|
||||||
|
* (the actual paper is hidden behind an academic paywall and consequently not readily
|
||||||
|
* available to us, so the source will have to be the blog entry above)
|
||||||
|
*
|
||||||
|
* @since 5.81
|
||||||
|
*/
|
||||||
|
Q_PROPERTY(int humanMoment READ humanMoment CONSTANT)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// @cond INTERNAL_DOCS
|
/// @cond INTERNAL_DOCS
|
||||||
|
|
||||||
@ -198,6 +228,12 @@ public:
|
|||||||
* @since 5.78
|
* @since 5.78
|
||||||
*/
|
*/
|
||||||
int veryShortDuration() const;
|
int veryShortDuration() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Duration for very long wait times
|
||||||
|
* @since 5.81
|
||||||
|
*/
|
||||||
|
int humanMoment() const;
|
||||||
/// @endcond
|
/// @endcond
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,6 +117,36 @@ QtObject {
|
|||||||
*/
|
*/
|
||||||
property int toolTipDelay: 700
|
property int toolTipDelay: 700
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Time in milliseconds equivalent to the theoretical human moment, which can be used
|
||||||
|
* to determine whether how long to wait until the user should be informed of something,
|
||||||
|
* or can be used as the limit for how long something should wait before being
|
||||||
|
* automatically initiated.
|
||||||
|
*
|
||||||
|
* Some examples:
|
||||||
|
*
|
||||||
|
* - When the user types text in a search field, wait no longer than this duration after
|
||||||
|
* the user completes typing before starting the search
|
||||||
|
* - When loading data which would commonly arrive rapidly enough to not require interaction,
|
||||||
|
* wait this long before showing a spinner
|
||||||
|
*
|
||||||
|
* This might seem an arbitrary number, but given the psychological effect that three
|
||||||
|
* seconds seems to be what humans consider a moment (and in the case of waiting for
|
||||||
|
* something to happen, a moment is that time when you think "this is taking a bit long,
|
||||||
|
* isn't it?"), the idea is to postpone for just before such a conceptual moment. The reason
|
||||||
|
* for the two seconds, rather than three, is to function as a middle ground: Not long enough
|
||||||
|
* that the user would think that something has taken too long, for also not so fast as to
|
||||||
|
* happen too soon.
|
||||||
|
*
|
||||||
|
* See also
|
||||||
|
* https://www.psychologytoday.com/blog/all-about-addiction/201101/tick-tock-tick-hugs-and-life-in-3-second-intervals
|
||||||
|
* (the actual paper is hidden behind an academic paywall and consequently not readily
|
||||||
|
* available to us, so the source will have to be the blog entry above)
|
||||||
|
*
|
||||||
|
* @since 5.81
|
||||||
|
*/
|
||||||
|
property int humanMoment: 2000
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* metrics used by the default font
|
* metrics used by the default font
|
||||||
*/
|
*/
|
||||||
|
@ -110,6 +110,36 @@ QtObject {
|
|||||||
*/
|
*/
|
||||||
property int toolTipDelay: Settings.tabletMode ? Qt.styleHints.mousePressAndHoldInterval : 700
|
property int toolTipDelay: Settings.tabletMode ? Qt.styleHints.mousePressAndHoldInterval : 700
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Time in milliseconds equivalent to the theoretical human moment, which can be used
|
||||||
|
* to determine whether how long to wait until the user should be informed of something,
|
||||||
|
* or can be used as the limit for how long something should wait before being
|
||||||
|
* automatically initiated.
|
||||||
|
*
|
||||||
|
* Some examples:
|
||||||
|
*
|
||||||
|
* - When the user types text in a search field, wait no longer than this duration after
|
||||||
|
* the user completes typing before starting the search
|
||||||
|
* - When loading data which would commonly arrive rapidly enough to not require interaction,
|
||||||
|
* wait this long before showing a spinner
|
||||||
|
*
|
||||||
|
* This might seem an arbitrary number, but given the psychological effect that three
|
||||||
|
* seconds seems to be what humans consider a moment (and in the case of waiting for
|
||||||
|
* something to happen, a moment is that time when you think "this is taking a bit long,
|
||||||
|
* isn't it?"), the idea is to postpone for just before such a conceptual moment. The reason
|
||||||
|
* for the two seconds, rather than three, is to function as a middle ground: Not long enough
|
||||||
|
* that the user would think that something has taken too long, for also not so fast as to
|
||||||
|
* happen too soon.
|
||||||
|
*
|
||||||
|
* See also
|
||||||
|
* https://www.psychologytoday.com/blog/all-about-addiction/201101/tick-tock-tick-hugs-and-life-in-3-second-intervals
|
||||||
|
* (the actual paper is hidden behind an academic paywall and consequently not readily
|
||||||
|
* available to us, so the source will have to be the blog entry above)
|
||||||
|
*
|
||||||
|
* @since 5.81
|
||||||
|
*/
|
||||||
|
property int humanMoment: 2000
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* metrics used by the default font
|
* metrics used by the default font
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user