“Add category” - button selectable (not hidden) when branch limit has been met
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
Description
The “add a category” button is displayed when it should be disabled (or ideally hidden) when the “branch limit” is set to “1” and a category has already been selected.
Steps to reproduce
- Create a category field, point to your category source and set the branch limit to 1
- Create a new section and add the new category field
- Create a new entry in the section
- Select a category
- The “add a category” button is still selectable (should be hidden) as the branch limit has been met.
The behaviour should mimic the “add asset” button which is hidden when the number of selected images matches the limit set for the field.
Additional info
- Craft version: RC9
- PHP version: 7.0.27
- Database driver & version: MySQL 5.7.21
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the category-field behavior with branch limit 1, then compare it with the add-asset control described in the issue. Trace the category field's add-category control and verify that it becomes hidden or disabled after one category is selected; add or run a regression test if the existing field tests cover this behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- content
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100