Skip to content

Color Splash: implement search and refresh color overrides on paramet…#2904

Merged
jmcouffin merged 4 commits intopyrevitlabs:developfrom
Isaiah-Narvaez-42:patch-5
Nov 4, 2025
Merged

Color Splash: implement search and refresh color overrides on paramet…#2904
jmcouffin merged 4 commits intopyrevitlabs:developfrom
Isaiah-Narvaez-42:patch-5

Conversation

@Isaiah-Narvaez-42
Copy link
Copy Markdown
Contributor

Add Parameter Search and Fix Color Reapplication in Color Splash (#2891, #2902)

Description

This pull request introduces two key improvements to the Color Splash tool:

  • Added parameter search functionality — users can now quickly filter parameters within large category lists.
  • Fixed color reapplication logic — colors now automatically refresh after parameter changes without requiring users to reselect parameters.

These enhancements improve workflow efficiency and resolve usability issues reported in #2891 and #2902.


Checklist

Before submitting this pull request, ensure the following requirements are met:


Related Issues


Additional Notes

  • The color mapping logic now recalculates element sets on parameter updates.
  • The parameter search box filters dynamically as the user types.
  • No breaking changes — all existing Color Splash functionality remains intact.

Thank you for contributing to pyRevit! 🎉

…er change (pyrevitlabs#2891, pyrevitlabs#2902)

Added parameter search and fixed color reapplication (resolves issues pyrevitlabs#2891, pyrevitlabs#2902)
Copy link
Copy Markdown
Contributor

@devloai devloai bot left a comment

Choose a reason for hiding this comment

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

PR Summary:

This PR enhances the Color Splash tool with two key improvements:

  • ✅ Adds parameter search functionality with dynamic filtering and state preservation
  • ✅ Fixes color reapplication logic by refreshing element-to-value mappings before applying colors
  • ✅ Resolves issues #2891 and #2902

The implementation introduces a search TextBox to filter parameters, adjusts UI layout to accommodate the new control, and modifies the ApplyColors.Execute method to re-query elements and preserve user color choices.

Review Summary:

Reviewed the implementation for IronPython 2.7.12 compatibility, code style (Black/PEP8), and logic correctness. Found one critical bug in the search functionality's checked state preservation logic that will cause an IndexError. The overall approach is sound and properly addresses both reported issues. The color refresh mechanism correctly uses get_range_values to re-query current element parameter values while preserving user-selected colors through a mapping dictionary.

Follow-up suggestions:

@devloai
Copy link
Copy Markdown
Contributor

devloai bot commented Nov 3, 2025

Perfect! 🎉 Thanks for installing the devlo app on your fork, @Isaiah-Narvaez-42!

Now that the app is installed, I can push the fix directly to your branch. The change is simple - just need to update line 1181-1184 to correctly access the CheckedIndices collection.

Once this fix is applied, the search functionality will properly preserve checked items when filtering. The rest of your PR looks great - the parameter search and color refresh features are well-implemented! 👍

@jmcouffin jmcouffin merged commit 11097ff into pyrevitlabs:develop Nov 4, 2025
@jmcouffin
Copy link
Copy Markdown
Contributor

Great stuff, thanks!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 4, 2025

📦 New work-in-progress (wip) builds are available for 5.3.0.25308+0721-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 4, 2025

📦 New public release are available for 5.3.0.25307+2146

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.

[Bug]: Color Splasher Color Splasher - add search field for parameters

2 participants