flow-components icon indicating copy to clipboard operation
flow-components copied to clipboard

Feature: Navigation popups

Open Avec112 opened this issue 4 years ago • 2 comments

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

  1. Page A have Component Summary <div id="summary" title="Link text A">Text A</div>
  2. 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

Avec112 avatar Oct 23 '21 11:10 Avec112

This might be of interest: https://github.com/vaadin/platform/issues/5271

rolfsmeds avatar Apr 25 '24 14:04 rolfsmeds

Yea 5271 looks promising.

Avec112 avatar May 01 '24 11:05 Avec112