Skip to content

Add Page Advancement Panel#714

Merged
pbakaus merged 4 commits intomasterfrom
add/page-advancement
Mar 31, 2020
Merged

Add Page Advancement Panel#714
pbakaus merged 4 commits intomasterfrom
add/page-advancement

Conversation

@swissspidy
Copy link
Copy Markdown
Collaborator

@swissspidy swissspidy commented Mar 23, 2020

Fixes #84.

Animations and audio elements are not covered by this PR because they are not implemented yet. Although audio elements wouldn't require any changes to the logic here.

@swissspidy swissspidy requested a review from miina March 23, 2020 11:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 23, 2020

Size Change: +3 kB (0%)

Total Size: 507 kB

Filename Size Change
assets/js/edit-story.js 437 kB +2.92 kB (0%)
assets/js/stories-dashboard.js 67.3 kB +82 B (0%)
ℹ️ View Unchanged
Filename Size Change
assets/css/edit-story.css 3.01 kB 0 B
assets/css/stories-dashboard.css 206 B 0 B

compressed-size-action

@swissspidy swissspidy added the Type: Enhancement New feature or improvement of an existing feature label Mar 23, 2020
@swissspidy swissspidy force-pushed the add/page-advancement branch from 4acf494 to 6238d34 Compare March 23, 2020 16:08
@swissspidy swissspidy force-pushed the add/page-advancement branch 2 times, most recently from c411863 to c608771 Compare March 25, 2020 11:26
@swissspidy swissspidy changed the base branch from add/504-document-ui to master March 26, 2020 09:10
@swissspidy swissspidy force-pushed the add/page-advancement branch from 935a169 to 79a29f6 Compare March 26, 2020 09:16
@googlebot
Copy link
Copy Markdown

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@swissspidy swissspidy force-pushed the add/page-advancement branch from 79a29f6 to d42af5b Compare March 26, 2020 09:19
@googlebot
Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@swissspidy swissspidy marked this pull request as ready for review March 26, 2020 09:19
# Conflicts:
#	assets/src/edit-story/migration/migrate.js
@swissspidy swissspidy requested a review from miina March 31, 2020 14:36
id={id}
auto-advance-after={
autoAdvance
? longestMediaElement?.id || `${defaultPageDuration}s`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the longest video is super short, e.g. 1s, shouldn't it use the defaultPageDuration? Generally, if the longest media is shorter than the set duration, should it use that instead?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pbakaus WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mhh...good point. I do think that if somebody drags in a ~4 seconds video, and the page duration is set to 7s, they will want auto advance after the video (a frozen video almost always looks strange). However, I can see the case for small, decorative 'transition in' videos.

For now, let's ship with this implementation, but paging @samitron7 to chime in, and possibly design a per-video override, e.g. a checkbox in the video settings that says something like "Decorative (does not trigger auto advancing)". We can also try a certain threshold (if video is less than 1/3 of page duration, it will not auto advance), but these all seem unsafe.

Copy link
Copy Markdown
Contributor

@miina miina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pbakaus pbakaus merged commit 2e4dc24 into master Mar 31, 2020
@pbakaus pbakaus deleted the add/page-advancement branch March 31, 2020 19:33
swissspidy added a commit that referenced this pull request Mar 31, 2020
swissspidy added a commit that referenced this pull request Mar 31, 2020
swissspidy added a commit that referenced this pull request Apr 1, 2020
wassgha added a commit that referenced this pull request Apr 1, 2020
* Added defaults for scale, focalX, focalY

* Fix prop types warnings for autoAdvance

See #714.

Co-authored-by: Pascal Birchler <pascalb@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement New feature or improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Panel - Auto Advance Functionality

4 participants