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

Reinstate Setup Checklist in the Desktop App #47965

Open
nsakaimbo opened this issue Dec 2, 2020 · 5 comments
Open

Reinstate Setup Checklist in the Desktop App #47965

nsakaimbo opened this issue Dec 2, 2020 · 5 comments
Labels
[Feature] WordPress Desktop App Features and improvements related to the WordPress Desktop App. [Pri] Low Triaged To be used when issues have been triaged. [Type] Feature Request Feature requests [Type] Task
Projects

Comments

@nsakaimbo
Copy link
Contributor

nsakaimbo commented Dec 2, 2020

To help stabilize accidental breakages, @Automattic/serenity added a simplified Home view just for WP-Desktop that doesn’t show any primary tasks (including the Site Setup List, which is considered a primary task). More context in pbAPfg-sx-p2.

The biggest roadblock to implementing this feature is ensuring that older Desktop clients aren’t broken by potential updates to the backend APIs that support this feature.

You’d need to perform versions checks in the API to determine if it’s safe to return the site setup view for My Home.

  1. The first step would be to add VIEW_SITE_SETUP to the list of views compatible with the desktop app.

  2. Then you’d need to determine if it’s safe to return that view. For that, you can add checks to the is_view_applicable function:

case VIEW_SITE_SETUP:
  // For the desktop app, show only if the request comes from a version that contains the site setup task.
if ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '#WordPressDesktop\/(\d\.\d+\.\d+)#', esc_url_raw( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ), $ua_parts ) ) {
   return version_compare( $ua_parts[1], 'X.X.X', '<=' );
}

  // Show on sites with the site setup uncompleted.
  // Note that `is_wpcom_checklist_complete` will set `onboarding_checklist_completed` to the current time if data is suspect.
  // open grok: wp-content -> lib -> onboarding-checklist/functions.php#115
  require_once WP_CONTENT_DIR . '/lib/onboarding-checklist/functions.php';
  return false === \Onboarding_Checklist\is_wpcom_checklist_complete( $blog_id );

The site setup task was added to Calypso in this commit, so any version of the desktop app that contains that commit should work with the VIEW_SITE_SETUP view.

Ref: p5T066-1DK-p2#comment-6447

@nsakaimbo nsakaimbo created this issue from a note in WP-Desktop (To do) Dec 2, 2020
@nsakaimbo nsakaimbo added [Feature] WordPress Desktop App Features and improvements related to the WordPress Desktop App. [Type] Feature Request Feature requests labels Dec 2, 2020
@github-actions
Copy link

github-actions bot commented Jun 2, 2021

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

@synora synora added the Triaged To be used when issues have been triaged. label Jun 4, 2021
@synora
Copy link
Contributor

synora commented Jun 4, 2021

@nsakaimbo It looks like this issue has gone stale. Is it still relevant or can it be closed?

@nsakaimbo
Copy link
Contributor Author

Hi, @synora - Thanks for checking in. We will be re-instating within the next couple weeks, but until then doesn't hurt to leave this issue open for tracking purposes.

@simison
Copy link
Member

simison commented Nov 10, 2021

This probably can be closed now? @nsakaimbo @belcherj

@nsakaimbo
Copy link
Contributor Author

@simison You can boot the desktop app to double-check, but I expect this is no longer an issue.

(You can use yarn run dev from the desktop folder of the Calypso repo to run the desktop app without having to build and package the app.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] WordPress Desktop App Features and improvements related to the WordPress Desktop App. [Pri] Low Triaged To be used when issues have been triaged. [Type] Feature Request Feature requests [Type] Task
Projects
Development

No branches or pull requests

5 participants