[Differential] [Updated] D3200: Add a widget gallery page to the Dashboard.
hein (Eike Hein)
noreply at phabricator.kde.org
Tue Nov 1 12:36:43 UTC 2016
hein marked 2 inline comments as done.
hein added inline comments.
INLINE COMMENTS
> davidedmundson wrote in DashboardRepresentation.qml:101
> I don't get why we are we creating this dynamically? and why on hover?
>
> I assume it's because WE is costly? and doing it on hover makes it seem faster?
>
> but this code has a quirk that if you hover and then click (a fairly common pattern) you'll actually be creating this component twice.
>
> A Loader with: active: activeTab == 1 || hoveredTab ==1 would be ideal and more declarative.
Good catch thanks, fixed in follow-up commit.
About not using a Loader: I need guaranteed ordering between the component instanciation and reset() being called in onActiveTabChanged, but I'm also instanciating on hover, when calling reset() is inappropriate. Using a Loader and Component.onCompleted isn't good enough, because the handler wouldn't have the "why" information needed to decide whether to call reset() or not. Ultimately going procedural was a tad easier here, even if it suffers the decentralization cost.
> davidedmundson wrote in DashboardRepresentation.qml:156
> It's better to just adjust Widget Explorer if we need to add functionality into WidgetExplorer
>
> Doing something like this is the sort of thing that's going to unnoticeably break in the future when someone re-arranges those categories.
Agreed, will look into it (I didn't like it much while writing ...).
> davidedmundson wrote in DashboardTabBar.qml:30
> for every mouse move you have two of these being emitted in sequence
>
> one from the old tab, one from the new tab.
>
> Can you be guarantee what order that happens in?
Yeah, the leave/enter ordering is reliable and unit-tested in Qt (I remember from working on the hover code in Qt Quick).
REPOSITORY
rPLASMADESKTOP Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D3200
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: hein, #plasma, mart
Cc: davidedmundson, mart, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161101/d0db4472/attachment.html>
More information about the Plasma-devel
mailing list