wordpress-mobile / wordpress-mobile/WordPress-Android
Deep Link: Edit Post - Fetch post from server if not available locally
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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