7da3a59465
* Add initial (rough) help panel. Only includes "products" task items. * Add help links for other tasks. * Add header to help tab content. * Toggle activity panel tabs when performing a setup task. * Move query string parsing up a level. * Pass query string as prop to ActivityPanel. Fixes rerendering issue when entering a task. * Pass current task to Help panel. * Filter payments task help items by available payment methods. * Filter shipping and tax help items based on WCS install. * Add generic docs link to all help panels. * Track help panel open. * Track help panel link clicks. * Show WCS help items when prompted to install. * Tasks are only performed on the main route. E.g. no value for "path". * Small tweaks to make AcivityPanel more easily testable. * Add initial tests for ActivityPanel tab logic. * Modify HelpPanel component for easier testing. * Add tests for conditional help panel links. * Fix tracking keyboard "clicks" on help links. * Fix query prop on embedded pages. * Allow filtering of help tab items. |
||
---|---|---|
.. | ||
activity-panel | ||
test | ||
README.md | ||
index.js | ||
style.scss |
README.md
Header
A basic component for the app header. The header outputs breadcrumbs via the sections
prop (required) and access to the activity panel. It also sets the document title.
How to use:
import Header from 'header';
render: function() {
return (
<Header
sections={ [
[ '/analytics', __( 'Analytics', 'woocommerce-admin' ) ],
__( 'Report Title', 'woocommerce-admin' ),
] }
/>
);
}
Props
sections
(required): Used to generate breadcrumbs. Accepts a single items or an array of items. To make an item a link, wrap it in an array with a relative link (example:[ '/analytics', __( 'Analytics', 'woocommerce-admin' ) ]
).isEmbedded
: Boolean describing if the header is embedded on an existing wp-admin page. False if rendered as part of a full react page.
Activity Panel
This component contains the Activity Panel. This is shown on every page and is rendered as part of the header.