From 81620fad1e1436ccc917593c76381eec722c05d1 Mon Sep 17 00:00:00 2001 From: riknoll Date: Fri, 28 Aug 2015 17:21:41 -0700 Subject: [PATCH 1/4] Removed plugin issue tracker link --- www/static/plugins/app.js | 1 - 1 file changed, 1 deletion(-) diff --git a/www/static/plugins/app.js b/www/static/plugins/app.js index a27e5c49af1..592093faa3e 100755 --- a/www/static/plugins/app.js +++ b/www/static/plugins/app.js @@ -415,7 +415,6 @@ var App = React.createClass({ From cb423b4def15b9e6adf4bf6343cb6136e92d3533 Mon Sep 17 00:00:00 2001 From: riknoll Date: Fri, 28 Aug 2015 17:53:56 -0700 Subject: [PATCH 2/4] Fixed some plugins CSS, links, and added npmsearch credit --- www/static/css-src/_plugins.scss | 13 ++++++++++++- www/static/plugins/app.js | 3 +++ www/static/plugins/pluginlist.jsx | 10 +++------- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/www/static/css-src/_plugins.scss b/www/static/css-src/_plugins.scss index f2ef37240c7..e3f11ad568e 100644 --- a/www/static/css-src/_plugins.scss +++ b/www/static/css-src/_plugins.scss @@ -101,7 +101,7 @@ */ .plugins-results-container { - margin-bottom:40px; + margin-bottom:20px; padding:0; } @@ -116,6 +116,12 @@ background-color:$gray-5; position: relative; } + +.plugin-results-show-more { + text-align: center; + cursor:pointer; +} + .version_and_author { display: inline-block; } @@ -129,6 +135,11 @@ cursor:pointer; } +.plugin-search-credit { + margin-left: 0px; + margin-bottom: 5px; +} + @media (min-width: 767px) { .version_and_author { float:right; diff --git a/www/static/plugins/app.js b/www/static/plugins/app.js index 592093faa3e..f29f7fc69b5 100755 --- a/www/static/plugins/app.js +++ b/www/static/plugins/app.js @@ -441,6 +441,9 @@ var App = React.createClass({ +
+ Search results powered by npmsearch.com +
); } diff --git a/www/static/plugins/pluginlist.jsx b/www/static/plugins/pluginlist.jsx index 4d83a09a1d7..e8b8f9467f2 100755 --- a/www/static/plugins/pluginlist.jsx +++ b/www/static/plugins/pluginlist.jsx @@ -39,19 +39,15 @@ var PluginList = React.createClass({ var showMore = null, visiblePlugins = []; if (plugins.length - this.state.searchPage * PageExtensionLength > InitialPageLength) { showMore = -
-
-
-
Show More
-
-
+
+ Show More
; } if (plugins.length === 0) { return (
- No plugins found. Learn how to create one + No plugins found. Learn how to create one
); } else { From f5a706252a99b5d9c386fd6121d59625c74ac9ee Mon Sep 17 00:00:00 2001 From: riknoll Date: Mon, 31 Aug 2015 11:25:12 -0700 Subject: [PATCH 3/4] Converted plugin help pages to markdown and fixed minor content errors --- www/_layouts/plugins-help.html | 8 ++++++ www/plugins/authors.html | 50 ---------------------------------- www/plugins/authors.md | 47 ++++++++++++++++++++++++++++++++ www/plugins/faq.html | 29 -------------------- www/plugins/faq.md | 41 ++++++++++++++++++++++++++++ 5 files changed, 96 insertions(+), 79 deletions(-) create mode 100644 www/_layouts/plugins-help.html delete mode 100644 www/plugins/authors.html create mode 100644 www/plugins/authors.md delete mode 100644 www/plugins/faq.html create mode 100644 www/plugins/faq.md diff --git a/www/_layouts/plugins-help.html b/www/_layouts/plugins-help.html new file mode 100644 index 00000000000..c5ff10db72d --- /dev/null +++ b/www/_layouts/plugins-help.html @@ -0,0 +1,8 @@ +--- +layout: cordova +plugins_tab: true +--- + +
+{{ content }} +
diff --git a/www/plugins/authors.html b/www/plugins/authors.html deleted file mode 100644 index fe9eda8ca8e..00000000000 --- a/www/plugins/authors.html +++ /dev/null @@ -1,50 +0,0 @@ ---- -layout: cordova -title: Apache Cordova Plugin Contributors -plugins_tab: true ---- - -
-

npm Plugin Search for Plugin Authors

-

How do I add a new plugin to Plugin Search?

-

If you want your Cordova Plugin to show up in search, simply add ecosystem:cordova keyword to the package.json file of your plugin and publish it to npm registry.

-

How can I tag supported platforms for my plugin?

-

Similar to ecosystem:cordova, platform support too uses keywords. Just add the platform name prefixed with "cordova-" to plugins list of keywords. E.g.

-
  "keywords": [
-      "ecosystem:cordova",
-      "cordova-android",
-      "cordova-ios",
-      "cordova-windows"
-    ]
-

My plugin is in plugins.cordova.io but I want to publish to npm. How do I do that?

-
    -
  1. - Optional Decide if you want to change your plugin’s id. If you decide to change it, -
      -
    1. Update the id in plugin.xml and update your readme with the new id.
    2. -
    3. Send a pull request adding your new id and old id to Cordova Registry Mapper.
    4. -
    5. We integrate that module into the Cordova CLI to warn users to use the new id when adding plugins to their projects.
    6. -
    -
  2. -
  3. Add a package.json to your plugins, -
      -
    • - Note: To keep things simple, please make sure your id in plugin.xml is the same as your package-name in package.json.
    • -
    • Use plugman createpackagejson [PLUGIN DIRECTORY] to create package.json. -
        -
      • This will create defaults based on existing values in your plugin.xml.
      • -
      • It will also automatically add the keyword ecosystem:cordova to your newly generated package.json file.
      • -
      • In addition, a cordova key will be added to your package.json which we plan to use in future updates of the tooling.
      • -
      -
    • -
    • View the package.json of cordova-plugin-device to see an example of what your package.json should look like after running plugman createpackagejson [PLUGIN DIRECTORY] command.
    • -
    • Plugins still require a plugin.xml to be installed into Cordova projects.
    • -
    -
  4. -
  5. Publish your plugin to npm using the npm publish [PLUGIN DIRECTORY].
  6. -
-

Are there any additional documents to assist me with plugins?

-

Yes there are. Please take a look at Plugin Development Guide for a more detailed guide.

-

I don't like X. How can I help improve the website?

-

You can help improving this site by opening bugs on JIRA or by sending PRs on GitHub.

-
diff --git a/www/plugins/authors.md b/www/plugins/authors.md new file mode 100644 index 00000000000..ac5da384a35 --- /dev/null +++ b/www/plugins/authors.md @@ -0,0 +1,47 @@ +--- +layout: plugins-help +title: Apache Cordova Plugin Contributors +--- + +# npm Plugin Search for Plugin Authors + +## How do I add a new plugin to Plugin Search? + +If you want your Cordova Plugin to show up in search, simply add the `ecosystem:cordova` keyword to the `package.json` file of your plugin and publish it to npm registry. + +## How can I tag supported platforms for my plugin? + +Similar to `ecosystem:cordova`, platform support too uses keywords. Just add the platform name prefixed with "**cordova-**" to the plugin's list of keywords. E.g. + + + "keywords": [ + "ecosystem:cordova", + "cordova-android", + "cordova-ios", + "cordova-windows" + ] + + +## My plugin is in plugins.cordova.io but I want to publish to npm. How do I do that? + +1. **Optional** Decide if you want to change your plugin’s id. If you decide to change it, + 1. Update the id in `plugin.xml` and update your readme with the new id. + 2. Send a pull request adding your new id and old id to Cordova Registry Mapper. + 3. We integrate that module into the Cordova CLI to warn users to use the new id when adding plugins to their projects. +2. Add a `package.json` to your plugins, + * **Note**: To keep things simple, please make sure your `id` in `plugin.xml` is the same as your `package-name` in `package.json`. + * Use `plugman createpackagejson [PLUGIN DIRECTORY]` to create `package.json`. + * This will create defaults based on existing values in your `plugin.xml`. + * It will also automatically add the keyword `ecosystem:cordova` to your newly generated `package.json` file. + * In addition, a cordova key will be added to your `package.json` which we plan to use in future updates of the tooling. + * View the `package.json` of [cordova-plugin-device](https://github.com/apache/cordova-plugin-device/blob/master/package.json) to see an example of what your `package.json` should look like after running `plugman createpackagejson [PLUGIN DIRECTORY]` command. + * Plugins still require a `plugin.xml` to be installed into **Cordova** projects. +3. Publish your plugin to npm using the `npm publish [PLUGIN DIRECTORY]`. + +## Are there any additional documents to assist me with plugins? + +Yes there are. Please take a look at the [Plugin Development Guide]({{ site.baseurl }}/docs/en/edge/guide/hybrid/plugins/index.html) for a more detailed guide. + +## I don't like X. How can I help improve the website? + +You can help improve this site by opening bugs on [JIRA](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20%3D%20Open%20AND%20component%20%3D%20%22Registry%20Web%22) or by sending PRs on [GitHub](https://github.com/apache/cordova-docs/tree/cordova-website). diff --git a/www/plugins/faq.html b/www/plugins/faq.html deleted file mode 100644 index afd25213109..00000000000 --- a/www/plugins/faq.html +++ /dev/null @@ -1,29 +0,0 @@ ---- -layout: cordova -title: Apache Cordova Plugins FAQ -plugins_tab: true ---- - -
-

npm Plugin Search FAQ

-

What is npm Plugin Search?

-

On April 21 2015, Cordova team announced plans to move core and 3rd party plugins to npm ecosystem. npm Plugin Search page offers an easy and user friendly way to browse plugins that have completed this transition.

-

What version of Cordova do I need to use npm?

-

To start using plugins from npm, Cordova CLI version 5.0.0 or higher is required.

-

How do I install plugins from npm?

-

Cordova team decided to change official plugin IDs from org.apache.cordova.* to cordova-plugin-* to better fit within the npm ecosystem. Developers can install a plugin using the command cordova plugin add cordova-plugin-device.

-

How do I know which platforms are supported for a plugin?

-

Plugin Search displays plugins in form of cards. Each card contains important information about the plugin. Supported platforms is represented in form of platform tags.

-

Can I still download plugins if I'm using Cordova CLI 4.3.0 or lower?

-

Yes! You can use Cordova Plugins from the old plugin registry.

-

What’s happening to the old plugin registry?

-

See Cordova blog for more details. It’s being phased out:

-
    -
  • Read-only after July 15th
  • -
  • End of support after October 15th
  • -
-

Are there any additional documents to assist me with plugins?

-

Yes there are. Please take a look at Add Plugin Features for a more detailed guide.

-

I don't like X. How can I help improve the website?

-

You can help improving this site by opening bugs on JIRA or by sending PRs on GitHub.

-
diff --git a/www/plugins/faq.md b/www/plugins/faq.md new file mode 100644 index 00000000000..343ee40fe6a --- /dev/null +++ b/www/plugins/faq.md @@ -0,0 +1,41 @@ +--- +layout: plugins-help +title: Apache Cordova Plugins FAQ +--- + +# npm Plugin Search FAQ + +## What is npm Plugin Search? + +On April 21 2015, Cordova team announced plans to move core and 3rd party plugins to the npm ecosystem. The [npm Plugin Search]({{ site.baseurl }}/plugins) page offers an easy and user friendly way to browse plugins that have completed this transition. + +## What version of Cordova do I need to use npm? + +To start using plugins from npm, Cordova CLI version 5.0.0 or higher is required. + +## How do I install plugins from npm? + +Cordova team decided to change official plugin IDs from org.apache.cordova.* to cordova-plugin-* to better fit within the npm ecosystem. Developers can install a plugin using the command `cordova plugin add [PLUGIN ID]`. + +## How do I know which platforms are supported for a plugin? + +Plugin Search displays plugins in the form of cards. Each card contains important information about the plugin. Supported platforms are represented in the form of platform icons across the bottom of the card. + +## Can I still download plugins if I'm using Cordova CLI 4.3.0 or lower? + +Yes! You can use Cordova Plugins from the [old plugin registry](http://plugins.cordova.io/). + +## What’s happening to the old plugin registry? + +See Cordova [blog]({{ site.baseurl }}/announcements/2015/04/21/plugins-release-and-move-to-npm.html) for more details. It’s being phased out: + +* Read-only after July 15th +* End of support after October 15th + +## Are there any additional documents to assist me with plugins? + +Yes there are. Please take a look at [Add Plugin Features]({{ site.baseurl }}/docs/en/edge/guide/cli/#link-add-plugin-features) for a more detailed guide. + +## I don't like X. How can I help improve the website? + +You can help improve this site by opening bugs on [JIRA](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20%3D%20Open%20AND%20component%20%3D%20%22Registry%20Web%22) or by sending PRs on [GitHub](https://github.com/apache/cordova-docs/tree/cordova-website). From 7b148293a4411a38270c28ee31cadc8a5e8eac83 Mon Sep 17 00:00:00 2001 From: riknoll Date: Mon, 31 Aug 2015 13:14:29 -0700 Subject: [PATCH 4/4] Added title text for the icons in plugin cards --- www/static/plugins/supportedplatforms.jsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/www/static/plugins/supportedplatforms.jsx b/www/static/plugins/supportedplatforms.jsx index 98918157065..cc9c6be9383 100755 --- a/www/static/plugins/supportedplatforms.jsx +++ b/www/static/plugins/supportedplatforms.jsx @@ -5,14 +5,14 @@ var SupportedPlatforms = React.createClass({ render: function() { var keywords = this.props.keywords; var sortedPlatforms = [ - {present:false, icon: "android"}, - {present:false, icon: "ios"}, - {present:false, icon: "windows"}, - {present:false, icon: "blackberry"}, - {present:false, icon: "ubuntu"}, - {present:false, icon: "firefox"}, - {present:false, icon: "webos"}, - {present:false, icon: "fireos"} + {present:false, icon: "android", alt:"Android"}, + {present:false, icon: "ios", alt:"iOS"}, + {present:false, icon: "windows", alt:"Windows"}, + {present:false, icon: "blackberry", alt:"Blackberry"}, + {present:false, icon: "ubuntu", alt:"Ubuntu"}, + {present:false, icon: "firefox", alt:"FirefoxOS"}, + {present:false, icon: "webos", alt:"webOS"}, + {present:false, icon: "fireos", alt:"FireOS"} ]; var platformsSupported = []; @@ -58,7 +58,9 @@ var SupportedPlatforms = React.createClass({ sortedPlatforms.forEach(function(platform) { if(platform.present) { - platformsSupported.push(
  • ) + // Becuase these images are taken from a sprite sheet, we have + // to use title rather than alt-text + platformsSupported.push(
  • ) } }); return (