Swipe down to close the bookend.#23761
Conversation
| overflow: hidden !important; | ||
| } | ||
|
|
||
| /** Bookend overrides. */ |
There was a problem hiding this comment.
Should these go here? Doesn't this break encapsulation a little bit, that subclass styles are defined in the superclass?
There was a problem hiding this comment.
You're 100% right
The issue is that the amp-story-bookend.css code goes into the bookend shadow DOM. We could have this CSS block into the main amp-story.css file, or keep it in the draggable-drawer.css file. I picked the latter, but I don't feel strongly. What do you think?
There was a problem hiding this comment.
SGTM. In theory we could add a new bookend-specific CSS that is the "outer" styles of the bookend, but that's just a lot of overhead to maintain, so... 🤷♂
|
|
||
| this.state_ = DrawerState.OPEN; | ||
|
|
||
| this.storeService_.dispatch(Action.TOGGLE_SYSTEM_UI_IS_VISIBLE, false); |
There was a problem hiding this comment.
Do we not want this behavior anymore?
There was a problem hiding this comment.
When the bookend is open, the system layer stays visible with a ~0.3 opacity. I tried to go for an identical design :)
|
This experience feels super smooth! |
049147b to
78ef59e
Compare
|
Travis should go green this time, PTAL :) |
acb3753 to
a8e7829
Compare
Re-using the new
draggable-drawerabstract class extracted from page attachments to enable swiping down to close the bookend.Animations + scrolling logic is now handled by the
draggable-drawerand removed from the bookend implementation.Demo here
Part 2/2
Fixes #13833