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

[4.x]: User Group condition rule is available when there are no user groups #11252

Closed
mattstein opened this issue May 17, 2022 · 0 comments · Fixed by #11260
Closed

[4.x]: User Group condition rule is available when there are no user groups #11252

mattstein opened this issue May 17, 2022 · 0 comments · Fixed by #11260
Labels
bug craft4 ui 👀 features related to the control panel UI

Comments

@mattstein
Copy link
Contributor

mattstein commented May 17, 2022

Description

In the early days of a new Craft 4 project, I might add a Current User Condition to a field layout element with a User Group rule—but if my site doesn’t have any user groups, it’s unclear what I’m supposed to do with the rule’s last field:

Screen Shot 2022-05-17 at 01 20 40 PM@2x

The text input makes it seem like maybe I can enter something, but without any suggestions or other hints it may not be clear there’s just nothing I can enter.

To help reinforce the expected usage, the condition rule should either...

  • a) include a note that no user groups are available to select (ideally with a link to create one)
  • b) not appear in the first place if it’s not a relevant option

Steps to reproduce

  1. Start with a Craft site that does not have any user groups.
  2. Create some fields and a field layout.
  3. Pick a field and add a User Condition with a User Group condition rule.
  4. Make sensible choices for each field in the User Group condition rule. (Hint: you can’t.)

Expected behavior

The condition rule would be unavailable if it doesn’t apply, or some UI hint would help me understand there’s nothing to select.

Actual behavior

The rule is available even though I can’t provide any meaningful input.

Craft CMS version

4.0.2

PHP version

8.0.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug craft4 ui 👀 features related to the control panel UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant