Does it make sense to implement a feature that provides an API to allow a
widget to instruct a host platform to take some navigation action? Does
such an API already exist?

Imagine this use case:

I have a dashboard widget that provides summary information about activity
on a Drupal site. It is displayed in the right column of all pages on the
site. From this dashboard I want to be able to control what is displayed in
the main area of the page. I could hard code this but it would mean the
widget needs to be aware that it is running in a Drupal site. What if I
want to use it in a WordPress site or a Windows 8 application?

My proposal is to implement a Host Navigation API. This API would allow the
widget to add a listener for touch events and communicate these to the host
application which would then take appropriate action. For example, the API
might provide a navigateToPage(String source) which instructs the host to
navigate its main display to the indicated resource path.

I believe that it would be possible to implement widgets in such a way that
they degrade gracefully if the feature is not present. For example a widget
could chose to display a popup with the requested page if the extension is
not provided. Therefore this feature, in many cases, could be an optional
one.

My main question is whether this seems like a sensible course of action.

My secondary question is whether this is something that should be done here
in Wookie or whether this is out of scope. I'm doing the work over on
GItHub at the moment for a specific project but it seems to me like this
might be more broadly applicable.

Ross

Reply via email to