Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

associate timers with widget ids #494

Closed
cmyr opened this issue Jan 29, 2020 · 6 comments · Fixed by #831
Closed

associate timers with widget ids #494

cmyr opened this issue Jan 29, 2020 · 6 comments · Fixed by #831
Labels
D-Medium requires some research and thinking maintenance cleans up code or docs

Comments

@cmyr
Copy link
Member

cmyr commented Jan 29, 2020

currently we route timers to all widgets that have ever requested a timer; we can now store the id of the requesting widget along with the timer, and route things that way.

If someone is interested in taking this, it shouldn't be too tricky, and it will be a nice excuse to explore some of druid's internals.

@cmyr cmyr added maintenance cleans up code or docs D-Medium requires some research and thinking labels Jan 29, 2020
@sjoshid
Copy link
Contributor

sjoshid commented Feb 27, 2020

I would like to take this up if it's ok.

@cmyr
Copy link
Member Author

cmyr commented Feb 28, 2020

@sjoshid definitely!

@sjoshid
Copy link
Contributor

sjoshid commented Mar 14, 2020

@cmyr
The timer event is received by all widgets but is acted upon only by the widget that requested it.

Is the task here to bypass all the traversing so the root widget can directly send the event to the target widget?

@cmyr
Copy link
Member Author

cmyr commented Mar 15, 2020

sort of! we don't send things "directly"; we still need to traverse the tree, but skip looking at parts of the tree that don't contain the relevant widget. You should be able to get a sense for this by looking at how the 'focus changed' lifecycle event works.

@sjoshid
Copy link
Contributor

sjoshid commented Mar 15, 2020

@cmyr
I traced focus changed event and how it traverses. It is same as timer event.

  • Breadth first search.
  • Traverse children only if target can be reached. (Bloom filters here?). Otherwise move on to next sibling.

Am I missing something obvious?

@cmyr
Copy link
Member Author

cmyr commented Mar 16, 2020

sounds about right. All the logic should be in WidgetPod::event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-Medium requires some research and thinking maintenance cleans up code or docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants