feat: frontend context values in segment#5766
Conversation
…end-context-values-in-segment
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Docker builds report
|
Oh they certainly are going to be supported, no need to impose the restriction here. |
| const isContextPropertyEnabled = | ||
| Utils.getFlagsmithHasFeature('context_values') | ||
| const contextValues: OptionType[] = JSON.parse( | ||
| Utils.getFlagsmithValue('context_values') || '{}', | ||
| ) |
There was a problem hiding this comment.
I'm not convinced with this approach. We loose in control / validation and i'm not sure about the upside.
Maybe use it to disable specific values if needed?
There was a problem hiding this comment.
I wonder if we can utilise the evaluation context schema: #5764
There was a problem hiding this comment.
A bit complicated in its current shape because it doesn't work with the json-path we are using.
For identifier we would need something like $.defs.IdentityEvaluationContext.properties.identifier.title so it looks like quite a lot of gymnastic
There was a problem hiding this comment.
Jsonschema doesn't seem too hard to parse? https://stackoverflow.com/a/60297881
There was a problem hiding this comment.
As discussed offline, added custom properties to the schema to simplify the schema parsing. It shouldn't be a problem to use titles and descriptions from the schema now.
…end-context-values-in-segment
| const isContextPropertyEnabled = | ||
| Utils.getFlagsmithHasFeature('context_values') | ||
| const contextValues: OptionType[] = JSON.parse( | ||
| Utils.getFlagsmithValue('context_values') || '{}', | ||
| ) |
There was a problem hiding this comment.
I wonder if we can utilise the evaluation context schema: #5764
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature!Changes
Related: #5764 and #5675
identifierorenvironment_namefor now) as condition properties.How did you test this code?