Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save story before showing the preview #1122

Merged
merged 9 commits into from
Apr 13, 2020
Merged

Conversation

dvoytenko
Copy link
Contributor

@dvoytenko dvoytenko commented Apr 9, 2020

Fixes: #1072.

This is a rather strange approach, but usually works ok. We open the popup with "about:blank", wait for the async operation to finish and then re-navigate the popup to the final URL. This way we do not bust the window.open timeout.

TODO:

  • What to do with a published story?
  • Tests

@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2020

Size Change: +539 B (0%)

Total Size: 868 kB

Filename Size Change
assets/js/edit-story.js 444 kB +149 B (0%)
assets/js/stories-dashboard.js 418 kB +390 B (0%)
ℹ️ View Unchanged
Filename Size Change
assets/css/edit-story.css 3.04 kB 0 B
assets/css/stories-dashboard.css 3.01 kB 0 B

compressed-size-action

@spacedmonkey spacedmonkey requested a review from miina April 9, 2020 08:46
@spacedmonkey
Copy link
Contributor

Adding @miina as you worked on the document sidebar and save buttons.

@miina
Copy link
Contributor

miina commented Apr 9, 2020

Looks like the unit tests are failing. EDIT: Looks like the PR is not finalized, misunderstood.

@swissspidy swissspidy added the Type: Enhancement New feature or improvement of an existing feature label Apr 9, 2020
Copy link
Contributor

@barklund barklund left a comment

Choose a reason for hiding this comment

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

This works well - except for previewing converting every post to draft, which is definitely not per design.

@dvoytenko
Copy link
Contributor Author

@swissspidy ptal again. i think this is ready to be merged.

Copy link
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.

Added a note on renaming Preview until it's actually a Preview, can be ignored though, works well.

Copy link
Contributor

@barklund barklund left a comment

Choose a reason for hiding this comment

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

A minor comment on the preview failure dialog (though it's edge-case). Otherwise works really great!

@dvoytenko dvoytenko merged commit 7848571 into master Apr 13, 2020
@dvoytenko dvoytenko deleted the preview/save-before-preview branch April 13, 2020 22:01
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.

Story Preview should save story first
7 participants