Skip to content
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

Feature Management Modal improvements #5361

Merged
merged 4 commits into from
Sep 16, 2020
Merged

Conversation

realLiangshiwei
Copy link
Member

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
Member

Looks good :)

@hikalkan
Copy link
Member

Please resolve the conflict ;)

@realLiangshiwei
Copy link
Member 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
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