Skip to content

Commit

Permalink
update changelog and docs for configurable features (#879)
Browse files Browse the repository at this point in the history
* update changelog and docs

* update changelog
  • Loading branch information
David Leger authored Jan 28, 2020
1 parent 0970663 commit 1daeaf6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [UNRELEASED]
## [0.9.4]

### Added

- Added costs for configurable string feature options in `manifold-plan-selector`.
- Added `read-only` attribute to `manifold-plan-details` to optionally disable inputs for configurable features.
- Added the ability to create and resize plans with configurable features.

## [0.9.3] - 2019-01-13

Expand Down
30 changes: 15 additions & 15 deletions docs/docs/data/manifold-data-provision-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ An unstyled button for creating resources. 🔒 Requires [authentication][auth].
</manifold-data-provision-button>
```

| Attribute | Required? | Description |
| :--------------- | :-------: | :------------------------------------------------------------------------------------------------------------- |
| `product-label` || Which product this is for, identified by its unique slug (e.g. `mailgun`) |
| `plan-id` || Which plan a user has selected |
| `region-id` || Required only if this is a plan where the user must select a region (most plans do not have this) |
| `resource-label` | | What the user has named this resource (we’ll generate a random name if this is blank) |
| `features` | | Required only if this is a configurable plan that requires a user’s inputs (e.g. JawsDB MySQL **Custom** plan) |
| Attribute | Required? | Description |
| :------------------- | :-------: | :------------------------------------------------------------------------------------------------------------- |
| `product-label` || Which product this is for, identified by its unique slug (e.g. `mailgun`) |
| `plan-id` || Which plan a user has selected |
| `region-id` || Required only if this is a plan where the user must select a region (most plans do not have this) |
| `resource-label` | | What the user has named this resource (we’ll generate a random name if this is blank) |
| `configuredFeatures` | | Required only if this is a configurable plan that requires a user’s inputs (e.g. JawsDB MySQL **Custom** plan) |

For a list of these values like `product-label` and `plan-id`, refer to our GraphQL API:

Expand All @@ -45,12 +45,12 @@ everything in manually. You could do that like so:
```js
const resourceLabel = ''; // Can be obtained from your own input

function updateButton({ detail: { features, planId, productLabel, regionId } }) {
function updateButton({ detail: { configuredFeatures, planId, productLabel, regionId } }) {
const provisionButton = document.querySelector('manifold-data-provision-button');
provisionButton.productLabel = productLabel;
provisionButton.resourceLabel = resourceLabel;
provisionButton.planId = planId;
provisionButton.features = features; // only needed for configurable products such as JawsDB custom
provisionButton.configuredFeatures = configuredFeatures; // only needed for configurable products such as JawsDB custom
provisionButton.regionId = regionId; // only needed for products that allow users to choose a region
}

Expand Down Expand Up @@ -101,12 +101,12 @@ document.addEventListener('manifold-provisionButton-invalid', ({ detail }) => co
// }
```

| Name | Returns | Description |
| ---------------------------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| `manifold-provisionButton-click` | `resourceLabel`, `productLabel`, `planId` | Fires immediately when button is clicked. May be used to trigger a loading state, until `-success` or `-error` is received. |
| `manifold-provisionButton-success` | `message`, `resourceLabel`, `resourceId`, `productLabel`, `planId` | Successful provision. Returns name, along with a resource ID |
| `manifold-provisionButton-error` | `message`, `resourceLabel`, `productLabel`, `planId` | Erred provision, along with information on what went wrong. |
| `manifold-provisionButton-invalid` | `message`, `resourceLabel`, `productLabel`, `planId` | Fires if the resource name isn’t named properly. |
| Name | Returns | Description |
| ---------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `manifold-provisionButton-click` | `resourceLabel`, `productLabel`, `planId`, `configuredFeatures` | Fires immediately when button is clicked. May be used to trigger a loading state, until `-success` or `-error` is received. |
| `manifold-provisionButton-success` | `message`, `resourceLabel`, `resourceId`, `productLabel`, `planId` | Successful provision. Returns name, along with a resource ID |
| `manifold-provisionButton-error` | `message`, `resourceLabel`, `productLabel`, `planId`, `configuredFeatures` | Erred provision, along with information on what went wrong. |
| `manifold-provisionButton-invalid` | `message`, `resourceLabel`, `productLabel`, `planId` | Fires if the resource name isn’t named properly. |

## Styling

Expand Down
10 changes: 5 additions & 5 deletions docs/docs/data/manifold-data-resize-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ document.addEventListener('manifold-resizeButton-error', ({ detail }) => console
// }
```

| Name | Returns | Description |
| :------------------------------ | :------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------- |
| `manifold-resizeButton-click` | `planId`, `resourceId`, `resourceLabel` | Fires immediately when button is clicked. May be used to trigger a loading state, until `-success` or `-error` is received. |
| `manifold-resizeButton-success` | `message`, `planId`, `resourceId`, `resourceLabel` | Successful resize with confirmation on values returned from our backend. |
| `manifold-resizeButton-error` | `message`, `planId`, `resourceId`, `resourceLabel` | Erred resize, along with information on what went wrong. |
| Name | Returns | Description |
| :------------------------------ | :----------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------- |
| `manifold-resizeButton-click` | `planId`, `resourceId`, `resourceLabel`, `configuredFeatures` | Fires immediately when button is clicked. May be used to trigger a loading state, until `-success` or `-error` is received. |
| `manifold-resizeButton-success` | `message`, `planId`, `resourceId`, `resourceLabel` | Successful resize with confirmation on values returned from our backend. |
| `manifold-resizeButton-error` | `message`, `planId`, `resourceId`, `resourceLabel`, `configuredFeatures` | Erred resize, along with information on what went wrong. |

1 comment on commit 1daeaf6

@vercel
Copy link

@vercel vercel bot commented on 1daeaf6 Jan 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.