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

Iterate on blog post flow #37

Merged
merged 18 commits into from
Sep 19, 2024
Merged

Iterate on blog post flow #37

merged 18 commits into from
Sep 19, 2024

Conversation

psrpinto
Copy link
Member

@psrpinto psrpinto commented Sep 17, 2024

This PR iterates on the blog post flow.

Note that the API calls are not correct yet, this PR just does the minimum so that the flow is in place, I will make the correct API calls in the next PR. This means that currently, the preview does not show the title the user selected, for example, it just shows an empty post page.

Summary of changes

  • Make it possible to ask the content script what the current URL is
  • Make it possible to make POST requests to the API, through the createPost() and updatePost() methods of ApiClient. These methods are not fully implemented yet, I will do so in the next PR.
  • Add PlaygroundClient to the session context, so that it's available everywhere.
  • Call the WP REST API at the start of the Import Blog flow, to create an empty post.
  • Make Playground automatically navigate to the page of said post.
  • As the user selects elements (title, date, etc), we make requests to the API to update the post, and refresh the page in playground. (this is not visible yet as the API calls are not correct).

Screen capture

Note how Playground navigates to the page of the post.

Screen.Recording.2024-09-18.at.17.51.21.mov

@psrpinto psrpinto changed the base branch from trunk to paste-handler September 17, 2024 16:11
@psrpinto psrpinto self-assigned this Sep 17, 2024
@psrpinto psrpinto force-pushed the call-api branch 4 times, most recently from 70436ee to 8012865 Compare September 18, 2024 14:13
Base automatically changed from paste-handler to trunk September 18, 2024 16:35
@psrpinto psrpinto changed the title Call API Iterate on blog post flow Sep 18, 2024
@psrpinto psrpinto marked this pull request as ready for review September 18, 2024 16:53
Copy link
Member

@ashfame ashfame left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@psrpinto psrpinto merged commit 78384c9 into trunk Sep 19, 2024
3 checks passed
@psrpinto psrpinto deleted the call-api branch September 19, 2024 09:46
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