describo / crate-builder-component

A VueJS UI component to build an RO-Crate
MIT License
6 stars 3 forks source link

Proposal - revise component configuration #71

Closed marcolarosa closed 1 month ago

marcolarosa commented 10 months ago

@beepsoft

The component now has 15 configurable properties that are passed in to it as params. I'm thinking of revising the component signature to be simpler:

const configuration = {
    lookup,
    entityId,
    enableBrowseEntities,
    enableTemplateSave,
    .... all of the other configurable properties
}

<describo-crate-builder
        :crate="data.crate"
        :profile="data.profile"
        :configuration="data.configuration"
/>

What do you think?

beepsoft commented 10 months ago

In the world of Vue/React components, it's not uncommon to have many configuration properties. For example, <el-button> has around 20, and <el-date-picker> has over 30.

So, it's more a matter of aesthetics than performance or best practices; it depends on the kind of API you want users to see.

I'm okay with the configuration property; I have no problem with that.

marcolarosa commented 10 months ago

I'm not sure one way or the other but I wanted to get this written down. Good points about the element component api's. I hadn't thought of those.

This isn't an important development so i'll leave the ticket around for now and maybe revisit in future.

marcolarosa commented 1 month ago

Not going to do this. It works fine so leaving as is.