Skip to content

Conversation

@murraycatto
Copy link
Contributor

The modifier variable type has been added to
Canvas and can be used in site builder schemas.

  • Added modifier to Canvas::Constants::PRIMITIVE_TYPES
  • Created Canvas::Validator::SchemaAttribute::Modifier validator class
  • Supports random as a default value (similar to product/variant types)
  • Can be used as single values or arrays
  • Follows the same validation patterns as other Canvas variable types

@murraycatto murraycatto requested review from a team, eballantine and lluzak and removed request for a team August 26, 2025 11:40
@eballantine eballantine self-assigned this Aug 26, 2025
Copy link
Contributor

@eballantine eballantine left a comment

Choose a reason for hiding this comment

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

Those failures seem somewhat legit?

I can't remember how to manually test this - so I haven't - nice specs!

I've just checked, and there are no custom_types in the wild with key 'modifier' so there will be no clash there too ✨

@murraycatto murraycatto force-pushed the mrd-715-modifier-drop-exposed-and-available-as-a-variable-type branch from 0cde41c to ef7fb8e Compare August 26, 2025 12:41
The `modifier` variable type has been added to
Canvas and can be used in site builder schemas.

- Added `modifier` to `Canvas::Constants::PRIMITIVE_TYPES`
- Created `Canvas::Validator::SchemaAttribute::Modifier` validator class
- Supports `random` as a default value (similar to product/variant types)
- Can be used as single values or arrays
- Follows the same validation patterns as other Canvas variable types
@murraycatto murraycatto force-pushed the mrd-715-modifier-drop-exposed-and-available-as-a-variable-type branch from ef7fb8e to 2d405b3 Compare August 26, 2025 12:58
@murraycatto
Copy link
Contributor Author

@eballantine the failure was due to the gem not being updated in a while

@murraycatto murraycatto marked this pull request as ready for review August 26, 2025 12:59
@murraycatto murraycatto merged commit 10fac9e into main Aug 26, 2025
1 check passed
@murraycatto murraycatto deleted the mrd-715-modifier-drop-exposed-and-available-as-a-variable-type branch August 26, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants