-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for list features #190
Conversation
@@ -24,6 +24,7 @@ | |||
export let value: string = ""; | |||
export let autofocus: boolean = false; | |||
export let className = ""; | |||
export let isInputEnabled: boolean = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if isSearchInputEnabled
or just isSearchEnabled
would be more relevant here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the ongoing backend refactor, I wonder if it is worth it to merge this PR now, as it will likely create some merge conflicts.
Also, renaming scene
and sceneFeatures
into main
and mainFeatures
in the frontend is not really relevant anymore, as the refactor replaced main
by item
in the backend.
ok, we put it on hold then? |
Backend refactor will have merge conflict, for sure. But postponing this PR will not really change that. And merging this PR after backend refactor would cause too much new merge conflict for this PR, that we can avoid by merging now. This way there will be one conflict resolution instead of 2, and the added functionality too.
this PR await since 3 weeks... there is plenty of "main" everywhere... Why not open a "naming refactor" PR ? |
export const mapFeatureList = (featureList: FeatureList = []) => | ||
featureList | ||
export const mapFeatureList = (featureList: FeatureList = { restricted: false, values: [] }) => { | ||
return featureList.values | ||
.sort((a, b) => a.localeCompare(b)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue
Fixes #81
Description
Allow user to define restricted list of values for features (attributes)
Define in db.json "features_values"
exemple:
If a feature is not defined here, or not restricted, then Pixano(back) will look for existing values in corresponding table(s) and merge with existing defined values.
Features are considered as not restricted if not explicitly defined as restricted