Skip to content

Releases: zackify/gutenblock

1.0.1

12 Oct 21:08
Compare
Choose a tag to compare

1.0.0

01 Aug 21:04
Compare
Choose a tag to compare

New major version bump due to WP moving some components around inside of the wp global object.

Only update if you are using Gutenberg 3.4 or higher

0.7.0

26 Jun 21:19
Compare
Choose a tag to compare

Updates gutenblock-controls to 0.6.0. Adds new collapsable tabs:

image

<Repeat title="Tab" addNew="Add Tab" attribute="tabs" collapsable>
      <Input name="title" placeholder="Tab Title" />

      <Repeat title="Items" addNew="Add Item" attribute="items">
        <Input name="url" placeholder="URL" />
        <MediaSelect name="logo" label="Select logo" />
      </Repeat>
    </Repeat>

Collapse top level repeats!

0.6.7

22 May 16:14
Compare
Choose a tag to compare

Add config section for gutenblock 023bb8a

0.6.5

08 May 01:02
Compare
Choose a tag to compare

Add editor component for injected attributes and change function inside of the editor

https://github.com/crossfield/gutenblock/blob/master/plugin/src/notes/edit.js

0.6.3

08 May 00:53
Compare
Choose a tag to compare

Refactor repeat component to not use state

#9

796477c

0.6.1

03 May 14:58
Compare
Choose a tag to compare

Inject a delete button inside of repeater items

0.6.0

27 Apr 17:37
Compare
Choose a tag to compare

Breaking change

Passes in webpack to gutenblock.config.js:

module.exports = webpack => ({
  plugins: [new webpack.EnvironmentPlugin(['REACT_APP_API'])],
})

If you imported webpack yourself to access plugins and other built ins, it would resolve locally which may not be the same webpack version and cause errors.

0.5.2

27 Apr 01:26
Compare
Choose a tag to compare
  • Fix bug with not being able to call onDelete inside inputs that are nested in a Repeat 93d088a

0.5.1

24 Apr 19:39
Compare
Choose a tag to compare

Eslint

Added create-react-app's eslint config with minor changes for it to work correctly with this project. Now you will see errors about unused variables and other useful things.

Simplified Input

Before, there was RepeatInput and InspectorInput. Now, there's just Input which can be rendered in the inspector, or inside of a repeat:

import { Inspector, Repeat, Input } from 'gutenblock-controls';

export default () => (
  <Inspector>
    <Input name="title" placeholder="Title" />

    <Repeat title="Projects" addNew="Add Project" attribute="projects">
      <Input name="title" />
    </Repeat>

  </Inspector>
);

Add MediaSelect component

import { Inspector, MediaSelect } from 'gutenblock-controls';

export default () => (
  <Inspector>
    <MediaSelect name="backgroundURL" />
  </Inspector>
);

This will prompt the user to select or upload photos and store the resulting image inside the attributes.

Add Async select component

Load in items from an api and store the value on attributes

import { Inspector, Select } from 'gutenblock-controls';

export default () => (
  <Inspector>
    <Select name="id" loadOptions={async search => {
       let response = await fetch(`/wp-json/wp/v2/posts?search=${search}`);
       let json = await response.json();
       return {
         options: json.map(item => ({ label: item.title.rendered, value: item.id })),
       };
} />
  </Inspector>
);