Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Correct broken *.md links #7108

Merged
merged 2 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# WooCommerce Blocks <!-- omit in toc -->

[![Latest Tag](https://img.shields.io/github/tag/woocommerce/woocommerce-gutenberg-products-block.svg?style=flat&label=Latest%20Tag)](https://github.com/woocommerce/woocommerce-gutenberg-products-block/releases)
[![View](https://img.shields.io/badge/Project%20Components-brightgreen.svg?style=flat)](https://woocommerce.github.io/woocommerce-gutenberg-products-block)
[![View](https://img.shields.io/badge/Project%20Components-brightgreen.svg?style=flat)](https://woocommerce.github.io/woocommerce-blocks/)
![JavaScript and CSS Linting](https://github.com/woocommerce/woocommerce-gutenberg-products-block/workflows/JavaScript%20and%20CSS%20Linting/badge.svg?branch=trunk)
![PHP Coding Standards](https://github.com/woocommerce/woocommerce-gutenberg-products-block/workflows/PHP%20Coding%20Standards/badge.svg?branch=trunk)
![Automated tests](https://github.com/woocommerce/woocommerce-gutenberg-products-block/workflows/Automated%20tests/badge.svg?branch=trunk)
Expand Down
4 changes: 2 additions & 2 deletions assets/js/base/components/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# WooCommerce Blocks - General Purpose Components

These are shared components used in WooCommerce blocks, and may be used in the store front end (shopper experience) as well as the editor or admin dashboard.
These are shared components used in WooCommerce blocks, and may be used in the store front end (shopper experience) as well as the editor or admin dashboard.

See [_Components & Storybook_](docs/contributors/storybook.md) doc for more information.
See [_Components & Storybook_](../../../../docs/contributors/contributing/storybook-and-components.md) doc for more information.
1 change: 0 additions & 1 deletion assets/js/data/schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

## Table of contents <!-- omit in toc -->

- [Table of contents](#table-of-contents)
- [Actions](#actions)
- [`receiveRoutes( routes, namespace = '/wc/blocks' )`](#receiveroutes-routes-namespace--wcblocks-)
- [Selectors](#selectors)
Expand Down
2 changes: 1 addition & 1 deletion assets/js/editor-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ These are shared components used in WooCommerce blocks for the editor (Gutenberg

Many of our blocks need rich, smart components to provide an interface for selecting or configuring blocks with WooCommerce data. Often there are multiple blocks that need such components. Components in this collection are used in multiple blocks, and may include logic for working with Woo data specifically (e.g. products, shipping methods, product categories).

See [Storybook & Components](docs/contributors/storybook.md) doc for more information.
See [Storybook & Components](../../../docs/contributors/contributing/storybook-and-components.md) doc for more information.

<!-- FEEDBACK -->

Expand Down
2 changes: 1 addition & 1 deletion bin/hook-docs/data/actions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/johnbillion/wp-hooks-generator/0.7.0/schema.json",
"$schema": "https://raw.githubusercontent.com/wp-hooks/generator/0.9.0/schema.json",
"hooks": [
{
"name": "woocommerce_add_to_cart",
Expand Down
14 changes: 1 addition & 13 deletions bin/hook-docs/data/filters.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/johnbillion/wp-hooks-generator/0.7.0/schema.json",
"$schema": "https://raw.githubusercontent.com/wp-hooks/generator/0.9.0/schema.json",
"hooks": [
{
"name": "__experimental_woocommerce_blocks_add_data_attributes_to_block",
Expand Down Expand Up @@ -339,18 +339,6 @@
},
"args": 1
},
{
"name": "woocommerce_admin_disabled",
"file": "InboxNotifications.php",
"type": "filter",
"doc": {
"description": "",
"long_description": "",
"tags": [],
"long_description_html": ""
},
"args": 1
},
{
"name": "woocommerce_apply_individual_use_coupon",
"file": "StoreApi/Utilities/CartController.php",
Expand Down
2 changes: 1 addition & 1 deletion bin/hook-docs/format-hook-doc/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const files = ( sources ) => {
return sources && sources.length
? {
ul: sources.map( ( file ) => {
return `[${ file }](../../src/${ file })`;
return `[${ file }](../../../../src/${ file })`;
} ),
}
: null;
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ The following tutorials from [developer.woocommerce.com](https://developer.wooco

[We're hiring!](https://woocommerce.com/careers/) Come work with us!

🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/readme.md)
🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/README.md)

<!-- /FEEDBACK -->

12 changes: 5 additions & 7 deletions docs/contributors/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@

This repo includes [Storybook](https://storybook.js.org) tooling so we can test and develop components in isolation.

The storybook is automatically built and published to [GitHub pages](https://woocommerce.github.io/woocommerce-gutenberg-products-block/) on every push to the main branch. See [travis.yml](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/trunk/.travis.yml) for details.

<https://woocommerce.github.io/woocommerce-gutenberg-products-block/>
The storybook is automatically built and published to [GitHub pages](https://woocommerce.github.io/woocommerce-blocks/) on every push to the main branch.

## Where are our components?

We have components in a few folders, for different contexts.

- [`assets/js/base/components`](https://github.com/woocommerce/woocommerce-gutenberg-products-block/tree/trunk/assets/js/base/components)
- [`assets/js/editor-components`](https://github.com/woocommerce/woocommerce-gutenberg-products-block/tree/trunk/assets/js/editor-components)
- [`assets/js/icons`](https://github.com/woocommerce/woocommerce-gutenberg-products-block/tree/trunk/assets/js/icons)
- [`assets/js/base/components`](../../assets/js/base/components)
- [`assets/js/editor-components`](../../assets/js/editor-components)
- [`assets/js/icons`](../../assets/js/icons)

**`assets/js/base/components`** are used in front-end code, as well as editor & admin.
These components help us build consistent interfaces across the front end (shopper) experience and elsewhere.
Expand All @@ -27,7 +25,7 @@ They allow us to build a consistent and powerful UI for merchants for authoring

**`assets/js/icons`** is a suite of icons and SVG images that we use in our interfaces.

For more info about individual components, refer to [Storybook](https://woocommerce.github.io/woocommerce-gutenberg-products-block/) or individual readme files.
For more info about individual components, refer to [Storybook](https://woocommerce.github.io/woocommerce-blocks/) or individual readme files.

## How to run Storybook locally and test components

Expand Down
38 changes: 19 additions & 19 deletions docs/contributors/contributing/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

## Table of contents <!-- omit in toc -->

- [Cloning the Git Repository](#cloning-the-git-repository)
- [Configuring your WordPress site](#configuring-your-wordpress-site)
- [Installing dependencies](#installing-dependencies)
- [Building the plugin files](#building-the-plugin-files)
- [Legacy builds](#legacy-builds)
- [Create a plugin package in ZIP format](#create-a-plugin-package-in-zip-format)
- [Linting](#linting)
- [Running the Blocks plugin](#running-the-blocks-plugin)
- [Developer Tools (Visual Studio Code)](#developer-tools-visual-studio-code)
- [EditorConfig](#editorconfig)
- [ESLint](#eslint)
- [Prettier](#prettier)
- [Testing](#testing)
- [Cloning the Git Repository](#cloning-the-git-repository)
- [Configuring your WordPress site](#configuring-your-wordpress-site)
- [Installing dependencies](#installing-dependencies)
- [Building the plugin files](#building-the-plugin-files)
- [Legacy builds](#legacy-builds)
- [Create a plugin package in ZIP format](#create-a-plugin-package-in-zip-format)
- [Linting](#linting)
- [Running the Blocks plugin](#running-the-blocks-plugin)
- [Developer Tools (Visual Studio Code)](#developer-tools-visual-studio-code)
- [EditorConfig](#editorconfig)
- [ESLint](#eslint)
- [Prettier](#prettier)
- [Testing](#testing)

Before you can begin contributing to the Blocks plugin there are several steps and tools required to setup your local development environment.

Expand Down Expand Up @@ -52,7 +52,7 @@ To install dependencies, you will need the following tools installed on your mac
- [`npm` and `node.js`](https://nodejs.org)
- [`composer`](https://getcomposer.org)

See [`package.json` `engines`](../../package.json) for details of required versions.
See [`package.json` `engines`](../../../package.json) for details of required versions.

Once you have `node` and `composer` setup, install the dependencies from the command line:

Expand All @@ -79,7 +79,7 @@ This plugin supports two type of builds:

The legacy builds are loaded in a site environment where the WordPress version doesn't meet minimum requirements for a component used in a set build.

You can read more about legacy builds in the [this doc](./assets/js/legacy/README.md).
You can read more about legacy builds in the [this doc](../../../assets/js/legacy/README.md).

## Create a plugin package in ZIP format

Expand All @@ -96,9 +96,9 @@ Run `$ npm run lint` to check code against our linting rules.

This script runs 3 sub-commands: `lint:php`, `lint:css`, `lint:js`. Use these to run linters across the codebase (linters check for valid syntax).

- `lint:php` runs phpcs via composer, which uses the [phpcs.xml](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/trunk/phpcs.xml) rule set.
- `lint:css` runs stylelint over all the scss code in `assets/css`, using the rules in [.stylelintrc.json.](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/trunk/.stylelintrc.json)
- `lint:js` runs eslint over all the JavaScript, using the rules in [.eslintrc.js.](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/trunk/.eslintrc.js)
- `lint:php` runs phpcs via composer, which uses the [phpcs.xml](../../../phpcs.xml) rule set.
- `lint:css` runs stylelint over all the scss code in `assets/css`, using the rules in [.stylelintrc.json.](../../../.stylelintrc.json)
- `lint:js` runs eslint over all the JavaScript, using the rules in [.eslintrc.js.](../../../.eslintrc.js)

Note; linters are also ran before commits via Git. If there are any violations, you will not be able to commit your changes until they are fixed, unless you add the `--no-verify` flag to your commit command.

Expand Down Expand Up @@ -148,7 +148,7 @@ You’ll find a handful of scripts in `package.json` that performs the automated
- JS tests: `npm run test`
- Run `npm run wp-env` command to setup the development environment in Docker.

To find out more about how to run automated JavaScript tests, check out the documentation on [JavaScript Testing](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/trunk/docs/contributors/javascript-testing.md).
To find out more about how to run automated JavaScript tests, check out the documentation on [JavaScript Testing](../../contributors/contributing/javascript-testing.md).

<!-- FEEDBACK -->

Expand Down
10 changes: 5 additions & 5 deletions docs/contributors/contributing/storybook-and-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
- [How to run Storybook locally and test components](#how-to-run-storybook-locally-and-test-components)
- [How to add a story for a component](#how-to-add-a-story-for-a-component)

This repo includes [Storybook](https://storybook.js.org) tooling so we can test and develop components in isolation. The storybook is automatically built and published to [GitHub pages](https://woocommerce.github.io/woocommerce-gutenberg-products-block/) on every push to the main branch. See [travis.yml](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/trunk/.travis.yml) for details.
This repo includes [Storybook](https://storybook.js.org) tooling so we can test and develop components in isolation. The storybook is automatically built and published to [GitHub pages](https://woocommerce.github.io/woocommerce-blocks/) on every push to the main branch.

## Where are our components?

We have components in a few folders, for different contexts.

- [`assets/js/base/components`](https://github.com/woocommerce/woocommerce-gutenberg-products-block/tree/trunk/assets/js/base/components)
- [`assets/js/editor-components`](https://github.com/woocommerce/woocommerce-gutenberg-products-block/tree/trunk/assets/js/editor-components)
- [`assets/js/icons`](https://github.com/woocommerce/woocommerce-gutenberg-products-block/tree/trunk/assets/js/icons)
- [`assets/js/base/components`](../../../assets/js/base/components)
- [`assets/js/editor-components`](../../../assets/js/editor-components)
- [`assets/js/icons`](../../../assets/js/icons)

**`assets/js/base/components`** are used in front-end code, as well as editor & admin.
These components help us build consistent interfaces across the front end (shopper) experience and elsewhere.
Expand All @@ -29,7 +29,7 @@ They allow us to build a consistent and powerful UI for merchants for authoring

**`assets/js/icons`** is a suite of icons and SVG images that we use in our interfaces.

For more info about individual components, refer to [Storybook](https://woocommerce.github.io/woocommerce-gutenberg-products-block/) or individual readme files.
For more info about individual components, refer to [Storybook](https://woocommerce.github.io/woocommerce-blocks/) or individual readme files.

## How to run Storybook locally and test components

Expand Down
2 changes: 1 addition & 1 deletion docs/designers/theming/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This page includes all documentation regarding WooCommerce Blocks and themes.

### Block and component class names

WooCommerce Blocks follows BEM for class names, as [stated in our coding guidelines](../contributors/coding-guidelines.md). All classes start with one of these two prefixes:
WooCommerce Blocks follows BEM for class names, as [stated in our coding guidelines](../../contributors/contributing/coding-guidelines.md). All classes start with one of these two prefixes:

- `.wc-block-`: class names specific to a single block.
- `.wc-block-components-`: class names specific to a component. The component might be reused by different blocks.
Expand Down
12 changes: 6 additions & 6 deletions docs/internal-developers/block-client-apis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

This folder contains documentation for API interfaces for Blocks. In _most cases_, these docs describe APIs and interfaces that are _internal_ only, and thus are provided to assist with developing the blocks in this repository. Documentation will tend to focus on high level overviews.

For more details about extensibility points in the blocks, you can reference the [extensibility docs](../extensibility/README.md).
For more details about extensibility points in the blocks, you can reference the [extensibility docs](../../third-party-developers/extensibility/README.md).

| Document | Description |
| -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| [Checkout API interface](checkout/checkout-api.md) | This doc goes into some detail about some of the API specifics for the checkout block architecture. |
| [Checkout Flow and Events](../../third-party-developers/extensibility/checkout-flow-and-events.md) | All about the checkout flow in the checkout block and the various emitted events that can be subscribed to. |
| [Notices](notices.md) | Explains how the notices system works and which methods are available to add an remove them. |
| Document | Description |
| ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| [Checkout API interface](checkout/checkout-api.md) | This doc goes into some detail about some of the API specifics for the checkout block architecture. |
| [Checkout Flow and Events](../../internal-developers/block-client-apis/checkout/checkout-flow-and-events.md) | All about the checkout flow in the checkout block and the various emitted events that can be subscribed to. |
| [Notices](notices.md) | Explains how the notices system works and which methods are available to add an remove them. |

<!-- FEEDBACK -->

Expand Down
22 changes: 11 additions & 11 deletions docs/internal-developers/block-client-apis/checkout/checkout-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

## Table of contents <!-- omit in toc -->

- [Contexts](#contexts)
- [Notices Context](#notices-context)
- [Customer Data Context](#customer-data-context)
- [Shipping Method Data context](#shipping-method-data-context)
- [Payment Method Data Context](#payment-method-data-context)
- [Checkout Context](#checkout-context)
- [Hooks](#hooks)
- [`usePaymentMethodInterface`](#usepaymentmethodinterface)
- [Contexts](#contexts)
- [Notices Context](#notices-context)
- [Customer Data Context](#customer-data-context)
- [Shipping Method Data context](#shipping-method-data-context)
- [Payment Method Data Context](#payment-method-data-context)
- [Checkout Context](#checkout-context)
- [Hooks](#hooks)
- [`usePaymentMethodInterface`](#usepaymentmethodinterface)

This document gives an overview of some of the major architectural components/APIs for the checkout block. If you haven't already, you may also want to read about the [Checkout Flow and Events](../../extensibility/checkout-flow-and-events.md).
This document gives an overview of some of the major architectural components/APIs for the checkout block. If you haven't already, you may also want to read about the [Checkout Flow and Events](../../../internal-developers/block-client-apis/checkout/checkout-flow-and-events.md).

## Contexts

Much of the data and api interface for components in the Checkout Block are constructed and exposed via [usage of `React.Context`](https://reactjs.org/docs/context.html). In some cases the context maintains the "tree" state within the context itself (via `useReducer`) and in others it interacts with a global `wp.data` store (for data that communicates with the server).

You can find type definitions (`typedef`) for contexts in [this file](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/trunk/assets/js/types/type-defs/contexts.js).
You can find type definitions (`typedef`) for contexts in [this file](../../../../assets/js/types/type-defs/contexts.js).

### Notices Context

Expand Down Expand Up @@ -108,7 +108,7 @@ These docs currently don't go into detail for all the hooks as that is fairly st

### `usePaymentMethodInterface`

This hook is used to expose all the interfaces for the registered payment method components to utilize. Essentially the result from this hook is fed in as props on the registered payment components when they are setup by checkout. You can use the typedef ([`PaymentMethodInterface`](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/trunk/assets/js/type-defs/payment-method-interface.ts)) to see what is fed to payment methods as props from this hook.
This hook is used to expose all the interfaces for the registered payment method components to utilize. Essentially the result from this hook is fed in as props on the registered payment components when they are setup by checkout. You can use the typedef ([`PaymentMethodInterface`](../../../../assets/js/types/type-defs/payment-method-interface.ts)) to see what is fed to payment methods as props from this hook.

_Why don't payment methods just implement this hook_?

Expand Down
Loading