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 Request - Exclude Sample DataSources #122

Open
NoralK opened this issue Oct 31, 2023 · 3 comments
Open

Feature Request - Exclude Sample DataSources #122

NoralK opened this issue Oct 31, 2023 · 3 comments

Comments

@NoralK
Copy link

NoralK commented Oct 31, 2023

Greetings and thank you for this wonderful tool.

I do have a feature request to exclude Sample Data DataSources.

Below is a sample of the JSON sample data that is being documented when, in my opinion, should not be documented. I believe you could filter on "IsSampleData", maybe make it a setting in the Output Selection? Thoughts?

I have not found a way to remove these internal DataSources once a control is placed. I would have thought the DataSource would be removed.

Cheers

        {
            "Name": "ColumnChartSample",
            "Schema": "*[Area:n, City:s, Density:n, Population:n]",
            "IsSampleData": true,
            "IsWritable": false,
            "Type": "StaticDataSourceInfo",
            "OriginalSchema": "*[Area:n, City:s, Density:n, Population:n]",
            "Data": "[{\"Area\":31,\"City\":\"Cairo\",\"Density\":39,\"Population\":12},{\"Area\":15,\"City\":\"Delhi\",\"Density\":78,\"Population\":18},{\"Area\":11,\"City\":\"Mexico City\",\"Density\":60,\"Population\":8},{\"Area\":22,\"City\":\"Istanbul\",\"Density\":65,\"Population\":14},{\"Area\":16,\"City\":\"London\",\"Density\":54,\"Population\":8},{\"Area\":25,\"City\":\"Moscow\",\"Density\":48,\"Population\":12},{\"Area\":8,\"City\":\"New York City\",\"Density\":107,\"Population\":8},{\"Area\":6,\"City\":\"Seoul\",\"Density\":172,\"Population\":10},{\"Area\":6,\"City\":\"Shanghai\",\"Density\":38,\"Population\":24},{\"Area\":6,\"City\":\"Tokyo\",\"Density\":146,\"Population\":9}]",
            "OriginalName": "ColumnChartSample",
            "OrderedColumnNames": [
                "City",
                "Population",
                "Area",
                "Density"
            ]
        },
        {
            "Name": "LegendSample",
            "Schema": "*[Value:s]",
            "IsSampleData": true,
            "IsWritable": false,
            "Type": "StaticDataSourceInfo",
            "OriginalSchema": "*[Value:s]",
            "Data": "[{\"Value\":\"Lorem ipsum\"},{\"Value\":\"Dolor sit\"},{\"Value\":\"Amet consectetur \"},{\"Value\":\"Adipisicing elit\"},{\"Value\":\"Sed do\"},{\"Value\":\"Eiusmod tempor \"},{\"Value\":\"Incididunt ut\"}]",
            "OriginalName": "LegendSample",
            "OrderedColumnNames": [
                "Value"
            ]
        },
        {
            "Name": "CustomGallerySample",
            "Schema": "*[SampleHeading:s, SampleImage:i, SampleText:s]",
            "IsSampleData": true,
            "IsWritable": false,
            "Type": "StaticDataSourceInfo",
            "OriginalSchema": "*[SampleHeading:s, SampleImage:i, SampleText:s]",
            "Data": "[{\"SampleHeading\":\"Lorem ipsum 1\",\"SampleImage\":\"/ctrllib/image/images/SampleImage.svg\",\"SampleText\":\"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"},{\"SampleHeading\":\"Lorem ipsum 2\",\"SampleImage\":\"/ctrllib/image/images/SampleImage.svg\",\"SampleText\":\"Suspendisse enim metus, tincidunt quis lobortis a, fringilla dignissim neque.\"},{\"SampleHeading\":\"Lorem ipsum 3\",\"SampleImage\":\"/ctrllib/image/images/SampleImage.svg\",\"SampleText\":\"Ut pharetra a dolor ac vehicula.\"},{\"SampleHeading\":\"Lorem ipsum 4\",\"SampleImage\":\"/ctrllib/image/images/SampleImage.svg\",\"SampleText\":\"Vestibulum dui felis, fringilla nec mi sed, tristique dictum nisi.\"}]",
            "OriginalName": "CustomGallerySample",
            "OrderedColumnNames": [
                "SampleImage",
                "SampleHeading",
                "SampleText"
            ]
        }

@modery
Copy link
Owner

modery commented Jan 18, 2024

Thank you for the suggestion! That sounds quite good to me, will get it implemented (probably via a configurable setting, with the default set to not document it) in the upcoming weeks

@modery
Copy link
Owner

modery commented Feb 16, 2024

This is currently a work in progress. Added the logic to find out if a datasource or a resource is sample data. Still need to

  • add the configurable option
  • add the logic to exclude sample data if the configurable option says so, for both Word and Markdown
  • think about overriding the configurable option (if it says not to include sample data) if the sample data is actually in use in the app
  • update the info table that shows the number of datasources and resources to specify how many of them are samples (think I'll include the mention of the sample data sources here, even if they aren't used)

@NoralK
Copy link
Author

NoralK commented Feb 23, 2024

Thank you - I am still watching this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants