Feature: Navigation popups
Describe your motivation
Wikipedia have a cool feature they call Navigation popups, where you as a visitor of an article hover your mouse pointer over an anchor element and a popup appears displaying a "summary" from the article being pointed to. I think could be a nice feature to have available in Vaadin.
Wikipedia example page (try mouse over some of the anchor inside the page)
Describe the solution you'd like
With the right component used or the correct configuration of existing components I would expect the following to happen:
- User hovers over an anchor (other end must have a "summary")
- A summary is presented in a popup
Describe alternatives you've considered
I think two parts are needed.
Something in these lines
- Page A have Component
Summary<div id="summary" title="Link text A">Text A</div> - Page B have Component
SummaryLink<a href="/page-a" type="summary">Link text A</a>
// page B
SummaryLink link = new SummaryLink (PageA.class); // page A must implement HasSummary
// RouteLink link = new "RouteLinkWithSummary(PageA.class)"; // page A must implement HasSummary
add(anchor);
// page A
Summary summary = new Summary(mySummary);
addSummary(summary); // Page A implements HasSummary
The best would probably be that the link text is provided from the Summary Component and not being provided inside the Link component. All "pages/views" should probably be able to implement HasSummary or something and thus being able to pick up the link text that way.
IDK, have not put to much thought into this but I do think it could be a cool addition to Vaadin
This might be of interest: https://github.com/vaadin/platform/issues/5271
Yea 5271 looks promising.