Skip to content

Commit 5a26f45

Browse files
authored
docs(Context values): Remove the local evaluation warning (#6381)
1 parent f7ca9cd commit 5a26f45

File tree

3 files changed

+15
-31
lines changed

3 files changed

+15
-31
lines changed

docs/docs/flagsmith-concepts/segments/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ Identity overrides always take precedence over segment overrides. Simply put, th
7070

7171
## Context values
7272

73-
:::warning
73+
:::info
7474

75-
Currently, context values are only available for remote evaluation. In local evaluation, rules using context values will evaluate to `false`.
75+
See [minimum required SDK versions](/flagsmith-concepts/segments/segment-rule-operators#minimum-sdk-versions-for-local-evaluation-mode) to use Context values in local evaluation mode.
7676

7777
:::
7878

docs/docs/flagsmith-concepts/segments/segment-rule-operators.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,19 @@ This segment will include all identities having a `user_id` trait that is divisi
7777

7878
When running in local evaluation mode, SDK clients evaluate segment rules locally, which means they must be updated to support the latest operators.
7979

80-
If an SDK client tries to evaluate a segment rule that has an unrecognised operator, that rule will silently evaluate to `false`. The table below lists the minimum required SDK version required by each operator:
81-
82-
| | Modulo | In |
83-
| ------- | ------ | ----- |
84-
| Python | 2.3.0 | 3.3.0 |
85-
| Java | 5.1.0 | 7.1.0 |
86-
| .NET | 4.2.0 | 5.0.0 |
87-
| Node.js | 2.4.0 | 2.5.0 |
88-
| Ruby | 3.1.0 | 3.2.0 |
89-
| PHP | 3.1.0 | 4.1.0 |
90-
| Go | 2.2.0 | 3.1.0 |
91-
| Rust | 0.2.0 | 1.3.0 |
92-
| Elixir | 1.1.0 | 2.0.0 |
80+
If an SDK client tries to evaluate a segment rule that has an unrecognised operator or context value, that rule will silently evaluate to `false`. The table below lists the minimum required SDK version required by each operator or a context value:
81+
82+
| | Modulo Operator | In Operator | Environment Name context value | Identifier context value |
83+
| ------- | --------------- | ----------- | ------------------------------ | ------------------------ |
84+
| Python | 2.3.0 | 3.3.0 | 5.0.3 | 5.0.3 |
85+
| Java | 5.1.0 | 7.1.0 | 8.0.0 | 8.0.0 |
86+
| .NET | 4.2.0 | 5.0.0 | 9.0.0 | 9.0.0 |
87+
| Node.js | 2.4.0 | 2.5.0 | 7.0.2 | 7.0.2 |
88+
| Ruby | 3.1.0 | 3.2.0 | 5.0.0 | 5.0.0 |
89+
| PHP | 3.1.0 | 4.1.0 | 5.0.0 | 5.0.0 |
90+
| Go | 2.2.0 | 3.1.0 | 5.0.0 | 5.0.0 |
91+
| Rust | 0.2.0 | 1.3.0 | 2.1.0 | 2.1.0 |
92+
| Elixir | 1.1.0 | 2.0.0 | N/A | N/A |
9393

9494
## Limits
9595

frontend/web/components/segments/Rule/components/RuleConditionRow.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import Button from 'components/base/forms/Button'
1111
import ErrorMessage from 'components/ErrorMessage'
1212
import RuleConditionPropertySelect from './RuleConditionPropertySelect'
1313
import RuleConditionValueInput from './RuleConditionValueInput'
14-
import { RuleContextValues } from 'common/types/rules.types'
1514
import { useRuleOperator, useRuleContext } from 'components/segments/Rule/hooks'
1615
import classNames from 'classnames'
1716

@@ -70,11 +69,6 @@ const RuleConditionRow: React.FC<RuleConditionRowProps> = ({
7069
return null
7170
}
7271

73-
const showEvaluationContextWarning = isLastRule && isValueFromContext
74-
const isSkippingEvaluationContextWarning =
75-
operator === 'PERCENTAGE_SPLIT' &&
76-
rule.property === RuleContextValues.IDENTITY_KEY
77-
7872
return (
7973
<div className='rule__row reveal' key={ruleIndex}>
8074
{hasOr && (
@@ -179,16 +173,6 @@ const RuleConditionRow: React.FC<RuleConditionRowProps> = ({
179173
</Row>
180174
)}
181175

182-
{showEvaluationContextWarning && !isSkippingEvaluationContextWarning && (
183-
<Row className='mt-2'>
184-
<div className='d-flex align-items-center gap-1'>
185-
<Icon name='info-outlined' width={16} height={16} />
186-
<span>
187-
Context values are only compatible with remote evaluation
188-
</span>
189-
</div>
190-
</Row>
191-
)}
192176
{(ruleErrors?.property || ruleErrors?.value) && (
193177
<Row className='mt-2'>
194178
<ErrorMessage error={ruleErrors} />

0 commit comments

Comments
 (0)