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

Make "Add property" button optional #61

Closed
beepsoft opened this issue Aug 23, 2023 · 4 comments
Closed

Make "Add property" button optional #61

beepsoft opened this issue Aug 23, 2023 · 4 comments
Assignees

Comments

@beepsoft
Copy link
Contributor

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 marcolarosa self-assigned this Aug 23, 2023
@marcolarosa
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor

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

@marcolarosa
Copy link
Contributor

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.

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