Repository navigation
feat(worldbuilder): Search Filter for Script Actions and Conditions for ZH Worldbuilder - #3483
WebbontheWeb wants to merge 2 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughWorldBuilder’s script action and condition dialogs now provide search fields. A shared function filters template names and rebuilds each tree while retaining the selected template when it matches. ChangesScript-template search
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant User
participant EditAction
participant populateTemplateTree
participant CTreeCtrl
User->>EditAction: Edits the search field
EditAction->>populateTemplateTree: Passes search text, template accessor, and selected index
populateTemplateTree->>CTreeCtrl: Rebuilds and selects matching template items
Merge Risk: ⚪ Minimal · up to
|
4bfba17 to
06ca845
Compare
|
06ca845 to
346b53e
Compare
|
Might want to check with what @AdrianeYves had done to worldbuilder |
|
@Skyaero42 My bad, I wasn't aware of a separate fork focused on that. I checked if there was a similar implementation and there is. Mine does work slightly differently. It filters as you type, matches words separately, and keeps the folders (only showing the ones that match or with matching subitems expanded). I think it'd be useful to have within main. That being said, I can close this out as unneeded if we don't want update the world builder here or are waiting to merge that in. |
|
@WebbontheWeb I have no opinion on it. However, there is not a lot of Worldbuilder knowledge among reviewers here. In the end, it would be great if all the features that @AdrianeYves has implemented are ported over to this repo - feature by feature. So imho it would be good to confer with Adriane before doing double work. |
While creating test maps, I got really annoyed by the inability to filter the script action and condition trees. This PR adds a search box that allows users to filter, hopefully making that process much easier.
I also moved the tree building code shared by
EditActionand EditCondition intoScriptTemplateTree. It seemed to make sense since it was copied and pasted between the 2.The Generals worldbuilder uses a dropdown instead of a tree, so this doesn't update that.
I've tested by filtering on edit and create, making sure it saves, with non-English characters, with items selected, etc.
I'd also like to add filter to the object tree if this works out well. Built and validated with help from AI.