Skip to content

Feature Management Modal improvements#5361

Merged
hikalkan merged 4 commits intodevfrom
liangshiwei/feature-management
Sep 16, 2020
Merged

Feature Management Modal improvements#5361
hikalkan merged 4 commits intodevfrom
liangshiwei/feature-management

Conversation

@realLiangshiwei
Copy link
Copy Markdown
Contributor

Resolve #5327

ng

var group = context.AddGroup("MyGroup");

var reporting = group.AddFeature(
    "MyGroup.Reporting",
    displayName: new FixedLocalizableString("Reporting"),
    defaultValue: "false",
    valueType: new ToggleStringValueType());

var pdfReporting = reporting.CreateChild(
    "MyGroup.Reporting.PdfReporting",
    displayName: new FixedLocalizableString("Pdf Reporting"),
    defaultValue: "false",
    valueType: new ToggleStringValueType());


pdfReporting.CreateChild(
    "MyGroup.Reporting.PdfReporting.Quality",
    displayName: new FixedLocalizableString("PdfReporting Quality"),
    defaultValue: "",
    valueType: new SelectionStringValueType()
    {
        ItemSource = new StaticSelectionStringValueItemSource(
            new LocalizableSelectionStringValueItem
            {
                Value = "TestValue",
                DisplayText = new LocalizableStringInfo("TestResourceName", "TestName")
            }, new LocalizableSelectionStringValueItem
            {
                Value = "TestValue2",
                DisplayText = new LocalizableStringInfo("TestResourceName", "TestName")
            }),
        Validator = new AlwaysValidValueValidator()
    });

var pdf = reporting.CreateChild(
    "MyGroup.Reporting.ExcelReporting",
    displayName: new FixedLocalizableString("Excel Reporting"),
    defaultValue: "false",
    valueType: new ToggleStringValueType());

pdf.CreateChild(
    "MyGroup.Reporting.ExcelReporting.FileName",
    displayName: new FixedLocalizableString("Pdf FileName"),
    defaultValue: "",
    valueType: new FreeTextStringValueType(new StringValueValidator(1, 3)));

reporting.CreateChild(
    "MyGroup.Reporting.MaxPage",
    displayName: new FixedLocalizableString("Max page"),
    defaultValue: "1",
    valueType: new FreeTextStringValueType());

group.AddFeature("MyGroup.Count",
    displayName: new FixedLocalizableString("Export max count"),
    valueType: new FreeTextStringValueType(new NumericValueValidator(0, 20)),
    defaultValue: "10");

@hikalkan
Copy link
Copy Markdown
Member

Looks good :)

@hikalkan
Copy link
Copy Markdown
Member

Please resolve the conflict ;)

@realLiangshiwei
Copy link
Copy Markdown
Contributor Author

@hikalkan done

@hikalkan hikalkan merged commit 1f06e06 into dev Sep 16, 2020
@hikalkan hikalkan deleted the liangshiwei/feature-management branch September 16, 2020 06:45
@hikalkan
Copy link
Copy Markdown
Member

Thanks, great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Management Modal improvements (MVC UI)

2 participants