Mango-information-systems / twitto_be

twitto_be is a real-time tweets analytics dashboard
https://twitto.be
Other
12 stars 2 forks source link

timeline charts buggy when tab is not on focus #101

Closed mef closed 8 years ago

mef commented 8 years ago

The appearing and disappearing bards from the timeline charts do not behave correctly, apparently when the tab looses focus.

Animation to be corrected, otherwise perhaps the solution is to disable them when tab looses focus, then redraw the charts on focus.

To be further investigated.

mef commented 8 years ago

Read also:

mef commented 8 years ago

The top hashtags / mentions also looks to be suffering from the same problem: opacity fade-in transition does not always happen when the tab is not in focus... related to #100

mef commented 8 years ago

@11digitlabs Would the following logic work?

If technically feasible, it would allow to use the dashboard in the background / on the side, while working on some other window...

mef commented 8 years ago

bump @11digitlabs

I think your experience with "tab visibility manager" could help here.

PanosSynetos commented 8 years ago

Hey @mef . Sorry for disappearing. I believe that your idea could work, I'll give it a try and let you know

PanosSynetos commented 8 years ago

Mehdi, I'll make a branch for this issue and delete all the lines about transitions/delays and give it a try

I just did a quick one for the last 30 minutes chart, it seems to behave ok, nothing strange, except the fact that the two graphs are not syncronized

On the left is a not focused tab (while I was writing this message) and on the right is the open tab twitto be - realtime tweets dashboard 2016-10-05 13-07-52

As you can see, the per second graph is different

PanosSynetos commented 8 years ago

@mef can you please have a look at my commit? I found out that setting delay to 0 is the same as not having a transition at all

EDIT or maybe not... need to check more, setting to 0 didnt help, just found out, damn!

PanosSynetos commented 8 years ago

Just did one more commit with if/else for the transitions. It doesn look optimal, but with the chaining in d3, what else can we do?

Last commit seems to work ok

mef commented 8 years ago

nothing strange, except the fact that the two graphs are not syncronized

On the left is a not focused tab (while I was writing this message) and on the right is the open tab twitto be - realtime tweets dashboard 2016-10-05 13-07-52

This must just be a minor side effect, caused by the fact that the two pages have not been loaded exactly at the same time. Each starts aggregating messages per second on its own schedule. There must be the same total on each side (plus or minus the 60 seconds ago count).

mef commented 8 years ago

@11digitlabs I still have issues with the chart on firefox, cf screenshots:

screenshot - 081016 - 20 53 31

screenshot - 081016 - 21 00 01

Edit: this happens when tab is marked as active, and another window is opened on top of the browser...

PanosSynetos commented 8 years ago

@mef the scale has double the values? Do you see any other problems? I havent faced this issue neither on FF or Chrome

PanosSynetos commented 8 years ago

Reverting the changes in branch 3.0.0

PanosSynetos commented 8 years ago

Done

mef commented 8 years ago

Should be fixed, problem seemed to be with the id of records, not browser's active / inactive states...

To be more precies: the problem of bars jumping around right after appearing is solved. There is still an issue with some of the bars not getting their full height.

This latter issue is probably caused by the fact that bars have both their y position and height animated at the same time when appearing.

mef commented 8 years ago

animations should behave better now too :)