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: Create a plugin interface for wp-admin from Calypso #11620

Closed
wants to merge 31 commits into from

Conversation

ryelle
Copy link
Member

@ryelle ryelle commented Feb 27, 2017

At the JPOP Design+Luna meetup in Amsterdam, the idea of building a plugin (for wp-admin) out of Calypso was proposed (again). This PR is the product of a few days exploration into the idea.

What's been done here:

  • A new project config has been added, called jetpack here but could be made more generic or copied for wp super cache or other plugins
  • The main boot file has been forked here so that API-dependent code could be pulled out, otherwise nothing would load outside of whitelisted URLs
  • A custom Layout was added, but this might be unnecessary
  • 2 new sections were added that only exist in the Jetpack project, a "writing" and "discussion" UI (my head is still in the Jetpack settings project 😄 ), these link to each other.
  • The page options are updated for this project for better compat with wp-admin paths (react-router might be a better approach for this?)
  • A shell script moves the built javascript files into a directory defined by JETPACK_DIR, this was just for easier local testing, and would change once we decide how this process should work

A screen recording of the demo plugin: https://cloudup.com/cKou6HLSNpi

To test this yourself:

  1. Download the demo plugin from this gist and add it to your WP plugins directory
  2. Update JETPACK_DIR in bin/copy-files.sh to point to the folder you've just created for the plugin (or anywhere on your computer where you can then upload the files to your wp install, if it's not local)
  3. Run npm run build-jetpack && ./bin/copy-files.sh — This should create a folder public in the plugin, with 3 JS files and a style.css
  4. Load wp-admin, activate your new plugin called "Jetpack UI Test"
  5. Now you should have a item in the admin menu called "Jetpack UI", and clicking will bring you to the pages generated from calypso
  6. You can click back and forth between a "writing" and "discussion" page using the buttons 🎉

@matticbot
Copy link
Contributor

@matticbot matticbot added the [Size] XL Probably needs to be broken down into multiple smaller issues label Feb 27, 2017
@oskosk oskosk force-pushed the try/jetpack-build-process branch from 67a5c6a to 57bb119 Compare June 13, 2017 11:01
@apeatling
Copy link
Member

This is a great exploration, although it looks like it has come to an end. I am going to close this as I don't see a path to merging. We can still use it for reference in the future, and re-open if it is restarted.

@apeatling apeatling closed this Nov 7, 2017
@apeatling apeatling deleted the try/jetpack-build-process branch November 8, 2017 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Jetpack [Size] XL Probably needs to be broken down into multiple smaller issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants