-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial changes * adding strengths and weaknesses * edits and renaming * another name change and airtable stuff * updating google sheets * adding screen shot * adding screen shot * adding shopify and Salesforce skeleton * final first-pass updates to tutorials * Airtable tutorial grammatical fixes Signed-off-by: brookewp <[email protected]> * Google sheets tutorial grammatical fixes Signed-off-by: brookewp <[email protected]> * Salesforce tutorial grammatical fixes Signed-off-by: brookewp <[email protected]> * Shopify tutorial grammatical fixes Signed-off-by: brookewp <[email protected]> * HTTP tutorial grammatical fixes Signed-off-by: brookewp <[email protected]> * Concepts grammatical fixes and formatting Signed-off-by: brookewp <[email protected]> * Tutorial docs formatting Signed-off-by: brookewp <[email protected]> * Remaining proof-read docs Signed-off-by: brookewp <[email protected]> * adding block-bindings document * cleaning up final changes from Workflows to Tutorials * Add links from concepts index page * Fix formatting * Reordering to reflect sequence of events and utility * Flesh out block registration options * small updates * updates to query * settings forms fixes (#297) * allow undefined values for handleOnChange to match allowed undefined in state values * allow adding invalid string in google credentials input * reset google spreadsheet and sheet inputs on credentials change * reset airtable base and tables on token change * update the register blocks function names in airtable conference event block registration * url encode sheet name to fix invalid endpoint error (#298) * url encode sheet name to fix invalid endpoint error * use bracket notation for defining JSON path for Google Sheets * Remove example glue code and example access tokens * Update "Conference events" example * Fix formatting * adding better type documentation * Fix block registration code example Signed-off-by: brookewp <[email protected]> * Add ServerSideRender package and types * Update Elden Ring Map example to Leaflet Map block To simplify, this block no longer uses register_remote_data_block or the Interactivity API. * fix typo and improve link by linking to a section of file * fix formatting * Update GitHub example * Update Google Sheets example * Minor example README updates * Update Shopify example * Restore linting to example code * Remove unused suppression * Update Beta warning * Update Zip code example * Update Art example * Fix typo * Add entrypoint README --------- Signed-off-by: brookewp <[email protected]> Co-authored-by: brookewp <[email protected]> Co-authored-by: chriszarate <[email protected]> Co-authored-by: Shekhar Wagh <[email protected]> Co-authored-by: Shekhar Wagh <[email protected]>
- Loading branch information
1 parent
fb788ec
commit a000be7
Showing
83 changed files
with
1,429 additions
and
1,063 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,54 @@ | ||
--- | ||
### :warning: This plugin is currently in Beta. Breaking changes could occur with any update. Please test each release thoroughly before updating. | ||
--- | ||
|
||
# Remote Data Blocks | ||
|
||
**Remote Data Blocks** is a WordPress plugin that makes it easy to combine content and remote data in the block editor. Easily register blocks that load data from Airtable, Google Sheets, Shopify, GitHub, or any other API. Your data stays in sync. Built-in caching ensures performance and reliability. | ||
|
||
[](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/Automattic/remote-data-blocks/trunk/blueprint.json) | ||
Remote Data Blocks lets you take tabular data, stored elsewhere and display it as headings, paragraphs, images and buttons in WordPress. Either as a list of all the rows in your table or as a single entry. [Read more about well supported use cases](docs/concepts/index.md#supported-use-cases). | ||
|
||
[](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/Automattic/remote-data-blocks/trunk/blueprint.json) | ||
|
||
[Launch the plugin in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/Automattic/remote-data-blocks/trunk/blueprint.json) and explore. An example API ("Conference Event") is included, or visit Settings > Remote Data Blocks to add your own. Visit the [workflows guide](docs/workflows/index.md) to dive in. | ||
|
||
## Installation | ||
|
||
[](https://github.com/Automattic/remote-data-blocks/releases/latest/download/remote-data-blocks.zip) | ||
The latest version of the plugin is available in the default `trunk` branch of this repository. | ||
|
||
### Install via `git subtree` | ||
|
||
We recommend installing the latest plugin version [via `git subtree`][wpvip-plugin-subtrees] within your site's repository: | ||
|
||
```bash | ||
# Enter your project's root directory: | ||
cd my-site-repo/ | ||
|
||
# Add a subtree for the trunk branch: | ||
git subtree add --prefix plugins/remote-data-blocks [email protected]:Automattic/remote-data-blocks.git trunk --squash | ||
``` | ||
|
||
To deploy the plugin to a remote branch, `git push` the committed subtree. | ||
|
||
The `trunk` branch will stay up to date with the latest version of the plugin. Use this command to pull the latest `trunk` branch changes: | ||
|
||
### Requirements | ||
```bash | ||
git subtree pull --prefix plugins/remote-data-blocks [email protected]:Automattic/remote-data-blocks.git trunk --squash | ||
``` | ||
|
||
Ensure that the plugin is up-to-date by pulling changes often. | ||
|
||
Note: We **do not recommend** using `git submodule`. [Submodules on WPVIP that require authentication][wpvip-plugin-submodules] will fail to deploy. | ||
|
||
### Install via ZIP file | ||
|
||
The latest version of the plugin can be downloaded from the [repository's Releases page](https://github.com/Automattic/remote-data-blocks/releases/latest/download/remote-data-blocks.zip). Unzip the downloaded plugin and add it to the `plugins/` directory of your site's GitHub repository. | ||
|
||
### Plugin activation | ||
|
||
We recommend [activating plugins with code][wpvip-plugin-activate]. | ||
|
||
## Requirements | ||
|
||
- PHP 8.1+ | ||
- WordPress 6.7+ | ||
|
@@ -19,11 +57,8 @@ A [persistent object cache](https://developer.wordpress.org/reference/classes/wp | |
|
||
## Next steps | ||
|
||
> [!WARNING] | ||
> This plugin is under heavy active development and breaking changes may land without warning. If you are interested in evaluating or testing this plugin, please [open an issue](https://github.com/Automattic/remote-data-blocks/issues/new/choose) and we'll be in touch! | ||
- Learn about the [core concepts](docs/concepts/index.md) behind Remote Data Blocks. | ||
- Follow along with [example workflows](docs/workflows/index.md) to see Remote Data Blocks in action. | ||
- Create your first connecting following our [tutorials](docs/tutorials/index.md) to see Remote Data Blocks in action. | ||
- If you're a developer, you're ready to [extend Remote Data Blocks with custom code](docs/extending/index.md). | ||
- Interested in contributing? Issues, pull requests, and discussions are welcome. Please see our [contribution guide](CONTRIBUTING.md) for more information. | ||
|
||
|
@@ -34,3 +69,7 @@ Remote Data Blocks is licensed under the [GPLv2 (or later)](LICENSE). | |
--- | ||
|
||
Made with ❤️ by [WordPress VIP](https://wpvip.com/). | ||
|
||
[wpvip-plugin-activate]: https://docs.wpvip.com/how-tos/activate-plugins-through-code/ | ||
[wpvip-plugin-submodules]: https://docs.wpvip.com/technical-references/plugins/installing-plugins-best-practices/#h-submodules | ||
[wpvip-plugin-subtrees]: https://docs.wpvip.com/technical-references/plugins/installing-plugins-best-practices/#h-subtrees |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
# Block bindings | ||
|
||
Remote Data Blocks takes advantage of the [Block Bindings API](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-bindings/). This Core WordPress API allows you to “bind” dynamic data to the block's attributes, which are then reflected in the final HTML markup. | ||
|
||
The Block Bindings API allows Remote Data Blocks to read from different sources without needing to write custom block boilerplate, React, block registration, and other particulars of writing custom blocks from scratch for each new source you want to read from. | ||
|
||
For a quick overview, the [announcement post](https://make.wordpress.org/core/2024/03/06/new-feature-the-block-bindings-api/) is very helpful. The Block Bindings API is evolving, and an in-depth understanding isn't necessary for day-to-day use. | ||
|
||
But if you want to dig deeper into the internals of how Remote Data Blocks works, the [public documentation](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-bindings/) is available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
# Field shortcodes | ||
|
||
One of the current limitations of the [block bindings API](./block-bindings.md) is that it is restricted to a small number of core blocks and attributes. For example, currently, you cannot bind to the content of a table block or a custom block. You also cannot bind to a _subset_ of a block's content. | ||
|
||
As a partial workaround, this plugin provides a way to use remote data in some places where block bindings are not supported. We call this feature "field shortcodes," and it is available in any block that uses [rich text](https://developer.wordpress.org/block-editor/reference-guides/richtext/), such as tables, lists, and custom blocks. Look for the field shortcode button in the rich text formatting toolbar: | ||
|
||
<img width="535" alt="Field shortcode button" src="https://github.com/user-attachments/assets/8ce0bd18-367e-46d5-a870-22819c42ff4a" /> | ||
|
||
Clicking this button will open a modal that allows you to select a field from a remote data source, resulting in an inline remote data binding. Just like remote data blocks, this binding will load the latest data from the remote source when the content is rendered. | ||
|
||
<img width="684" alt="A bulleted list using several field shortcodes to describe three conference events" src="https://github.com/user-attachments/assets/6527dcc0-c0ed-42ab-9655-b8fc2510e15b" /> | ||
|
||
Field shortcodes compile to HTML, so they are portable, safe, and have a built-in fallback. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.