ampproject / amp-react-prototype

A scratch pad to experiment with React rendered AMP Components
Apache License 2.0
36 stars 9 forks source link

Lightbox, back button, and vetoable closing #44

Open dvoytenko opened 4 years ago

dvoytenko commented 4 years ago

Context: https://github.com/ampproject/amp-react-prototype/pull/8/files#diff-c554b9bd31408e663cff269f69a1c567R51

Issues:

  1. Some component libraries take a stand that “back button” support has to be arranged by the caller outside the lightbox (controlled). But that causes numerous issues, including inability to make closing vetoable.
  2. Back button support is HARD. Standard doesn’t exist.

Supporting back button involves the following considerations:

See also #43 on the discussion about controlled-vs-uncontrolled lightbox API.