Skip to content

Commit

Permalink
docs: Update docs with new constraint availability (#2113)
Browse files Browse the repository at this point in the history
* docs: fix duplicated image.

* docs: add announcement banner for constraints

* docs: style announcement bar via CSS

* docs: update doc availability notices

* docs: remove commented-out announcement bar code
  • Loading branch information
thomasheartman committed Oct 4, 2022
1 parent 688ca2c commit 0e4734a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
7 changes: 6 additions & 1 deletion website/docs/advanced/strategy-constraints.md
Expand Up @@ -4,13 +4,18 @@ title: Strategy Constraints
---

:::info Availability
Strategy constraints are available to Unleash Pro and Enterprise users.

Before Unleash 4.16, strategy constraints were only available to Unleash Pro and Enterprise users. From 4.16 onwards, they're **available to everyone**.


Unleash 4.9 introduced a more comprehensive set of constraint operators. These require that both Unleash *and* your client SDK of choice support them. See the [SDK compatibility table](../sdks/index.md#strategy-constraints) for more information. Prior to Unleash 4.9, the only available operators were `IN` and `NOT_IN`.

:::

:::caution undefined behavior

When using _advanced strategy constraints_ (any operator that isn't `IN` or `NOT_IN`), *make sure your client SDK is up to date* and supports this feature. For older versions of the client SDKs we **cannot guarantee** any specific behavior. Please see the [incompatibilities section](#incompatibilities) for more information.

:::

**Strategy constraints** are conditions that must be satisfied for an [activation strategy](../user_guide/activation_strategy) to be evaluated for a feature toggle.
Expand Down
4 changes: 2 additions & 2 deletions website/docs/how-to/how-to-add-strategy-constraints.md
Expand Up @@ -4,7 +4,7 @@ title: How to add strategy constraints

:::info Availability

Strategy constraints are available to Unleash Pro and Enterprise users.
Before Unleash 4.16, strategy constraints were only available to Unleash Pro and Enterprise users. From 4.16 onwards, they're **available to everyone**.

:::

Expand All @@ -18,7 +18,7 @@ You'll need to have an existing feature toggle with a defined strategy to add a

On the strategy you're working with, find and select the "edit strategy" button.

![A feature toggle with one strategy. The "edit strategy" button is highlighted.](/img/add-constraint.png)
![A feature toggle with one strategy. The "edit strategy" button is highlighted.](/img/create-toggle-edit-strategy.png)

On the "edit strategy" screen, select the "add constraint" button to open the constraints menu.

Expand Down
5 changes: 4 additions & 1 deletion website/docs/how-to/how-to-define-custom-context-fields.md
Expand Up @@ -3,7 +3,10 @@ title: How to define custom context fields
---

:::info Availability
Custom context fields are available to Pro and Enterprise users. They were introduced in Unleash 3.2.28.


Before Unleash 4.16, custom context fields were only available to Unleash Pro and Enterprise users. From 4.16 onwards, they're **available to everyone**. They were introduced in Unleash 3.2.28.

:::

This guide shows you how to create [custom context field for the Unleash Context](../user_guide/unleash-context.md#custom-context-fields). You can use custom context fields for [strategy constraints](../advanced/strategy-constraints.md) and for [custom stickiness calculations](../advanced/stickiness.md#custom-stickiness). If there are [standard Unleash Context fields](../user_guide/unleash-context.md#structure) missing from the context fields page, you can use the same steps to add them too.
Expand Down
4 changes: 3 additions & 1 deletion website/docs/user_guide/unleash-context.md
Expand Up @@ -44,7 +44,9 @@ As an example: You've created a custom field called `groupId`. You know group ID
## Custom context fields

:::info Availability
Custom context fields are available to Pro and Enterprise users.

Before Unleash 4.16, custom context fields were only available to Unleash Pro and Enterprise users. From 4.16 onwards, they're **available to everyone**. They were introduced in Unleash 3.2.28.

:::

Custom context fields allow you to extend the Unleash Context with more data that is applicable to your situation. Each context field definition consists of a name and an optional description. Additionally, you can choose to define a set of [_legal values_](#legal-values "legal values for custom context fields"), and you can choose whether or not the context field can be used in [custom stickiness calculations](../advanced/stickiness.md#custom-stickiness) for the [gradual rollout strategy](activation-strategies.md#customize-stickiness-beta) and for [feature toggle variants](../advanced/feature-toggle-variants.md).
Expand Down
6 changes: 6 additions & 0 deletions website/docusaurus.config.js
Expand Up @@ -26,6 +26,12 @@ module.exports = {
apiKey: '9772249a7262b377ac876853d32bd760',
indexName: 'getunleash',
},
announcementBar: {
id: 'strategy-constraints-announcement',
content:
'🚀 Unleash brings powerful Constraints feature to OSS users. <a href=https://www.getunleash.io/blog/unleash-brings-powerful-constraints-feature-to-oss-users title="Unleash blog: Constraints are now available to open-source users">Read more</a> →',
isCloseable: true,
},
navbar: {
title: 'Unleash',
logo: {
Expand Down
6 changes: 6 additions & 0 deletions website/src/css/custom.css
Expand Up @@ -63,6 +63,12 @@ html[data-theme='dark'] {
--docsearch-primary-color: var(--ifm-color-primary-darkest);
}

div[class^='announcementBar_'],
div[class^='announcementBar_'] svg {
background-color: var(--ifm-color-primary);
color: var(--ifm-color-primary-contrast-background);
}

.visually-hidden {
border: 0;
clip: rect(0 0 0 0);
Expand Down

0 comments on commit 0e4734a

Please sign in to comment.