Skip to content

Use different label for array/exclude widget#77296

Merged
octref merged 12 commits intomasterfrom
pine/array-settings
Jul 15, 2019
Merged

Use different label for array/exclude widget#77296
octref merged 12 commits intomasterfrom
pine/array-settings

Conversation

@octref
Copy link
Contributor

@octref octref commented Jul 12, 2019

Fix #62440

@octref octref marked this pull request as ready for review July 12, 2019 17:37
@octref octref requested a review from roblourens July 12, 2019 17:37
@octref octref force-pushed the pine/array-settings branch from 2c94c56 to e5eabc5 Compare July 12, 2019 21:16
@octref octref added this to the July 2019 milestone Jul 12, 2019
@octref
Copy link
Contributor Author

octref commented Jul 12, 2019

@roblourens OK, think this is ready for review!

: [...template.context.value];

// Add pattern
if (e.pattern && !e.originalPattern) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should use the term "pattern", that's from exclude patterns.

}
// Delete pattern
else if (!e.pattern && e.originalPattern) {
const patternIndex = newValue.indexOf(e.originalPattern);
Copy link
Member

Choose a reason for hiding this comment

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

What if the same value appears multiple times in the list? If I delete the 3rd one it should always remove exactly that one.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe this event should be index based

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch.

Integer = 'integer',
Number = 'number',
Boolean = 'boolean',
ListOfString = 'list-of-string',
Copy link
Member

Choose a reason for hiding this comment

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

I think this could still be array. I suggested list for the view which displays multiple data types, but I think the data type should still match the setting type which is "array"

@octref
Copy link
Contributor Author

octref commented Jul 14, 2019

Fixed all. Should be good to go.

} else if (this.setting.type === 'boolean') {
this.valueType = SettingValueType.Boolean;
} else if (this.setting.type === 'array' && this.setting.listItemType === 'string') {
this.valueType = SettingValueType.Array;
Copy link
Member

Choose a reason for hiding this comment

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

This could still be ArrayOfString or whatever, I was just pointing out 'list' vs 'array'. But it's up to you


scope?: ConfigurationScope;
type?: string | string[];
listItemType?: string;
Copy link
Member

Choose a reason for hiding this comment

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

I think this should also be 'array' to match the type name right?

@octref octref merged commit 42ff04d into master Jul 15, 2019
@octref octref deleted the pine/array-settings branch July 19, 2019 17:28
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose more of Settings gui api

2 participants