-
Notifications
You must be signed in to change notification settings - Fork 456
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
Add settings docs #283
Add settings docs #283
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding it!
docs/plugins/plugin-structure.md
Outdated
* `bool` | ||
* `option` | ||
* `array` | ||
* `defaultValue` - `Any`, default value for the setting; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There is also
label
option to specify label text (it is just a field name by default) - I'd notice that
options
andmulti
applicable only forarray
andoption
types - For
array
andoption
types also could be addedclearable
andcreatable
options - We can add screenshot to show how plugin settings look like
- We can add a link to react-select configuration to clarify what is creatable, multi, and clearable. Also, to clarify format of options object
- And the latest step is to add an example plugin with settings to examples.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- True
multi
should actually only be applicable tooption
.array
probably shouldn't ever be restricted to just one value.- The idea for
array
was to be thecreatable
version ofoption
. I think they should all just be clearable by default, but that can be added.
I'll update the others
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrainMaestro agree with 2, but not with 3. I think it is possible case to select the list of provided options, without ability to add new ones, but at the same time it is possible to choose only one, but with ability to create it by user. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I think that's fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we no longer need the array
type though. Since option
can allow the user to create their own option. It should just handle all the possible scenarios.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrainMaestro makes sense! because type=option + multi will be the same as type=array. Let's just leave one
e67f04d
to
3771947
Compare
3771947
to
3c7a5ac
Compare
I updated this with an example and removed the |
👏👏👏 |
Finish last part of #230. Does this need to be more detailed?