wordpress-mobile / wordpress-mobile/WordPress-Android

Deep Link: Edit Post - Fetch post from server if not available locally

Open
#12,093 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Enhancement Design Needed Posting/Editing
Dominant language
Kotlin
Stars
3.2k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
69

Description

Expected behavior

The app currently handles deep links to open an existing post for editing. If the post does not exist in the local PostStore, the app should fetch the post from the server and open the post for editing.

The action to call for actually fetching the Post is fetchPost. https://github.com/wordpress-mobile/WordPress-FluxC-Android/blob/75050e8e588c95ea5ba836194ece8aa0011b8472/fluxc/src/main/java/org/wordpress/android/fluxc/store/PostStore.java#L620

While fetching the post, it will be necessary to show a loading indicator. A request for design input is required.

Actual behavior

If the post is not found in the local PostStore, the app will open a blank new post for the given site and a toast is shown stating that the "post is not found".

Steps to reproduce the behavior

adb shell am start
-W -a android.intent.action.VIEW
-c android.intent.category.BROWSABLE
-d "wordpress://post?blogId=&postId="

Replace:
= your blogId
= a postId on your site

See #11911 for the Edit Post deep link implementation and discussion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Edit Post deep-link implementation from #11911 and the fetchPost action in fluxc/src/main/java/org/wordpress/android/fluxc/store/PostStore.java around line 620. Reproduce the flow with the provided adb deep-link command, then trace the local PostStore miss. Done means the post is fetched and opened for editing instead of creating a blank post; loading-indicator behavior requires design input.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.