Skip to content

Option to restrict simple list item creation#1548

Open
Jess2896 wants to merge 10 commits intomasterfrom
sites-admin-tags
Open

Option to restrict simple list item creation#1548
Jess2896 wants to merge 10 commits intomasterfrom
sites-admin-tags

Conversation

@Jess2896
Copy link
Copy Markdown

@Jess2896 Jess2896 commented Nov 3, 2022

Feature Info

Jira Ticket Url

Description

  • Added some simple logic to have the option to restrict the creation of simple list items, if the new argument is not received, the simple list works in the same way it did before

@coveralls
Copy link
Copy Markdown

coveralls commented Nov 3, 2022

Coverage Status

Coverage decreased (-0.06%) to 34.871% when pulling 3071ce5 on sites-admin-tags into edf59e3 on master.

Comment thread inputs/simple-list-input.vue Outdated
// Only saves values from the autocomplete list if tag creation restriction is enabled
if (this.restrictItemCreation) {
if (!this.autocompleteValue) {
this.autocompleteValue = false;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If autocompleteValue is false and meets the criteria, why do you assign false again to it? 👀

Comment thread inputs/simple-list.vue Outdated
}

.restriction-error-message {
color: rgba(255, 0, 0, 0.54);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use the corresponding hex value of this color?

Comment thread inputs/simple-list.vue Outdated
}
},
onTriggerRestrictionError() {
if (this.args.restrictedErrrorMessage) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (this.args.restrictedErrrorMessage) {
if (this.args.restrictedErrorMessage) {

Comment thread inputs/simple-list.vue Outdated
{{ valueLength + '/' + maxLength }}
</div>
</div>
<div class="restriction-error-message" v-if="showRestrictionError">{{ args.restrictedErrrorMessage }}</div>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<div class="restriction-error-message" v-if="showRestrictionError">{{ args.restrictedErrrorMessage }}</div>
<div class="restriction-error-message" v-if="showRestrictionError">{{ args.restrictedErrorMessage }}</div>

Also, should you add this property to the docs too?

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

Successfully merging this pull request may close these issues.

4 participants