Skip to content

Allow conditional section to match any value from comma-seperated list#152

Open
jakubmirejovsky wants to merge 1 commit into
apostrophecms-legacy:mainfrom
bohemicastudio:bohemica_dev
Open

Allow conditional section to match any value from comma-seperated list#152
jakubmirejovsky wants to merge 1 commit into
apostrophecms-legacy:mainfrom
bohemicastudio:bohemica_dev

Conversation

@jakubmirejovsky

Copy link
Copy Markdown
Contributor

Summary

Allow conditional section to match any value from comma-seperated list.
Prior to this, conditional groups only allowed matching ONE option (eg. from a select dropdown). This should allow matching multiple options.
Useful when you need to show a conditional section based on a select dropdown where more than one option satisfy the condition.

Summarize the changes briefly, including which issue/ticket this resolves. If it closes an existing Github issue, include "Closes #[issue number]"

What are the specific steps to test this change?

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

Other information:
Needs to be tested properly.

@boutell boutell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for this contribution. One concern that occurs to me is that someone could be counting on that comma as part of the value they want to match right now, it's not that common but it would be a backwards compatibility break. Another is that we're not doing anything to help them pick a valid value, but that's actually not new. @abea what do you think?

@abea

abea commented Jan 31, 2022

Copy link
Copy Markdown
Contributor

It is a BC break, as much as I'd like to lean on any problems from it being very rare. A module option (documented) that allows comma separated conditions would resolve it.

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.

3 participants