mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Add tag() action for CollectionService tags
Adds a built-in `vide.tag()` action that wraps `Instance:AddTag()` / `Instance:RemoveTag()` so tags can be applied through `create()` props. It accepts a static string or array of strings, or a reactive source returning either. The reactive variant diffs the previous and new tag sets so only the delta is applied. All tags added by the action are removed when the surrounding scope is destroyed. Includes mock support for `AddTag`/`RemoveTag`/`HasTag`/`GetTags`, tests, API reference docs, and a closing note in the actions tutorial. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
19eaeb424f
commit
18c1d02d43
7 changed files with 276 additions and 0 deletions
|
|
@ -8,6 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
|
||||
## Unreleased
|
||||
|
||||
### Added
|
||||
|
||||
- `tag()` action for adding CollectionService tags to instances. Supports
|
||||
static strings and arrays as well as reactive sources for dynamic tag sets.
|
||||
Tags are automatically removed when the surrounding scope is destroyed.
|
||||
|
||||
### Changed
|
||||
|
||||
- `branch()` is now allowed to be used within a reactive scope.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue