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

[WIP] PoC: Offline editing #1

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

miina
Copy link
Owner

@miina miina commented Jan 7, 2020

Description

This is a PoC PR with the goal of:

  • Allow editing a previously loaded post only.
  • Display a message about being offline and let the user know that it will be updated later.
  • First step: ignore changes done by anyone else and always update the post content when online again.

Potentially later:

  • Second step: Use If-Unmodified-Since and create a revision only if the post has been modified meanwhile.

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

};

wp.serviceWorker.routing.registerRoute(
/\/index\.php/,
Copy link
Owner Author

Choose a reason for hiding this comment

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

This should check that it's actually for editing the post

Choose a reason for hiding this comment

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

Does the index.php here imply that pretty permalinks are not enabled?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes, that's currently the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants