Skip to content

[2.x] DataCollections improvements #1712

@emmadesilva

Description

@emmadesilva

Overview

Changes needed to improve the data collections feature, that we save for v2 as they may be breaking

Support standalone Yaml files

We need to change the parsing so we don't need front matter blocks. (Fixed in #1733)

>warning Note that the Yaml file should start with `---` to be parsed correctly.

Normalize class name

It bugs me that it is DataCollections instead of DataCollection. This works fine when it's a facade, so DataCollections::get() is semantic* (so is DataCollection::get()), however, since these classes are also used as instances containing data, it makes less sense for it to be plural, because now calling DataCollections::markdown() implies (many) DataCollections due to the return. Singularizing this would also match the Illuminate Collection.

Additionally, no Laravel facades are plural, however our Includes is plural (and some others, but Includes is a sibling class to this and should match)

*DataCollections::get() is not fully semantic as it may imply it will return multiple collections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions