describo / crate-builder-component

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

Make "Add property" button optional #61

Closed beepsoft closed 10 months ago

beepsoft commented 10 months ago

It would be great to have an option to make displaying the Add property button optional. In our application we want to control all user inputs via the Profile and don't want to support adding random properties via "Add".

I imagine something like this:

        <describo-crate-builder
            :enable-add-property="..."
        />

I can provide a PR for this if you agree.

marcolarosa commented 10 months ago

If you set definition to "override" in each of your defined classes then that control gets disabled for that class.

The reason for not making it a component wide configuration param is so that any classes not defined in the profile at least get the base properties from Thing (https://schema.org/Thing) like name and description. If that control is disabled and there is no definition for a class in the crate (that may have come in from somewhere else) then even name and description won't be available.

beepsoft commented 10 months ago

Thanks, Marco!

I already have "definition": "override" for my classes in the profiles,, which makes the button disabled all the time.

This, however, causes confusion for our users why that button is disabled and when gets it enabled and usable. That's why it would be great to be able to allow not do display this button at all. As in our application we are full control of the profile and the type of data our users can enter via our profiles they won't need/be able to add any properties in an ad-hoc manner.

So I think it would be safe in this case to not have the "Add property" button at all.

marcolarosa commented 10 months ago

Ahh ok - make sense. Let's discuss this next week as well (implementation) but it sounds good to me!

marcolarosa commented 10 months ago

This is dealt with by #66 in the AROMA case where they will actually disable the whole controls bar. If this becomes an user for users that want to keep controls but just disabled the add button then we can revisit.