Skip to content

Enhance ColorSplasher functionality and localization#3005

Merged
jmcouffin merged 20 commits intodevelopfrom
localize-color-splasher-ui
Jan 14, 2026
Merged

Enhance ColorSplasher functionality and localization#3005
jmcouffin merged 20 commits intodevelopfrom
localize-color-splasher-ui

Conversation

@jmcouffin
Copy link
Copy Markdown
Contributor

@jmcouffin jmcouffin commented Jan 10, 2026

Description

  • Refactored ColorSplasher UI to improve user experience with localized strings for category and parameter selection.
  • Updated event handling for selection changes and color application, ensuring robust error handling and logging.
  • Improved data binding for list boxes and added placeholder items for better guidance.
  • Enhanced color selection and gradient application features, ensuring compatibility with WPF elements.
  • Fixed visibility settings and task dialog messages to reflect localized content accurately.

Checklist

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

  • Code follows the PEP 8 style guide.
  • Code has been formatted with Black using the command:
    pipenv run black {source_file_or_directory}
  • Changes are tested and verified to work as expected.

Related Issues

If applicable, link the issues resolved by this pull request:

- Refactored ColorSplasher UI to improve user experience with localized strings for category and parameter selection.
- Updated event handling for selection changes and color application, ensuring robust error handling and logging.
- Improved data binding for list boxes and added placeholder items for better guidance.
- Enhanced color selection and gradient application features, ensuring compatibility with WPF elements.
- Fixed visibility settings and task dialog messages to reflect localized content accurately.
@jmcouffin jmcouffin self-assigned this Jan 10, 2026
@jmcouffin jmcouffin added Tools Issues related to pyRevit commands [subsystem] Localization Issues related to pyRevit localization [subsystem] labels Jan 10, 2026
@jmcouffin jmcouffin marked this pull request as draft January 10, 2026 18:43
…asher

- Introduced a new placeholder string for selecting a category and parameter across multiple language resource files (Chinese, German, English, Spanish, French, and Russian).
- Updated the ColorSplasher UI to display the placeholder text when the corresponding list box is empty, enhancing user guidance and experience.
devloai[bot]

This comment was marked as outdated.

- Adjusted margins and heights of various UI elements in ColorSplasherWindow.xaml to enhance visual alignment and user experience.
- Standardized button heights and margins for a more cohesive look across the interface.
- Adjusted the margin of the search TextBox to improve layout consistency and visual alignment within the ColorSplasher UI.
- Introduced new buttons for selecting all elements and clearing selections in the ColorSplasher UI, enhancing user interaction.
- Updated localization files to include translations for the new buttons and tooltips in English, French, and Russian.
- Improved event handling to capture Shift key state for multi-selection, ensuring a more intuitive user experience.
- Simplified data access methods in ColorSplasherWindow to enhance clarity and reduce redundancy.
- Removed unnecessary comments and improved existing ones for better understanding of the code flow.
- Streamlined event handling and UI updates to ensure a more efficient user experience.
- Enhanced error handling during data access to prevent potential crashes and improve logging.
@jmcouffin jmcouffin requested a review from Copilot January 10, 2026 20:29
@jmcouffin jmcouffin marked this pull request as ready for review January 10, 2026 20:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request migrates the ColorSplasher tool from Windows Forms to WPF, adds comprehensive localization support for multiple languages (English, Spanish, French, German, Russian, and Chinese), and introduces new features including element selection via Shift+Click and Select All/None buttons. The refactoring improves user experience with better UI organization, placeholder text, and robust error handling.

Changes:

  • Migrated UI from WinForms to WPF with XAML-based layout
  • Added localization support with ResourceDictionary files for 6 languages
  • Implemented new element selection features (Shift+Click, Select All/None buttons)

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
script.py Refactored from WinForms to WPF; updated event handlers from SelectedIndexChanged to SelectionChanged; replaced DataSource/DisplayMember with ItemsSource; changed property access from Checked/Visible to IsChecked/Visibility; added localization support and new selection features
ColorSplasherWindow.xaml New WPF window definition with grid-based layout, dynamic resource bindings for localization, and structured UI organization
ColorSplasherWindow.ResourceDictionary.en_us.xaml English localization strings for all UI elements, messages, tooltips, and dialog text
ColorSplasherWindow.ResourceDictionary.ru.xaml Russian localization strings (complete)
ColorSplasherWindow.ResourceDictionary.fr_fr.xaml French localization strings (complete)
ColorSplasherWindow.ResourceDictionary.es_es.xaml Spanish localization strings (missing Select All/None translations)
ColorSplasherWindow.ResourceDictionary.de_de.xaml German localization strings (missing Select All/None translations)
ColorSplasherWindow.ResourceDictionary.chinese_s.xaml Chinese (Simplified) localization strings (missing Select All/None translations)

jmcouffin and others added 10 commits January 10, 2026 21:41
…olorSplasher.pushbutton/ColorSplasherWindow.ResourceDictionary.es_es.xaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…olorSplasher.pushbutton/ColorSplasherWindow.ResourceDictionary.chinese_s.xaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…olorSplasher.pushbutton/script.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Improved the logic for applying gradient colors to enhance clarity and maintainability.
- Streamlined the process of updating existing ValuesInfo objects while preserving their data.
- Enhanced error handling and event management during color updates for a smoother user experience.
- Added comments to clarify optional error handling for document closure, ScrollViewer setup, icon loading, and event handler unsubscription.
- Improved robustness of the ColorSplasherWindow by ensuring the application continues smoothly even when certain operations fail.
- Enhanced the exception handling for horizontal scrollbar visibility in the ColorSplasherWindow.
- Added debug logging to capture details when scrollbar configuration fails, ensuring better diagnostics without disrupting the UI.
- Removed redundant assignment of the window variable to streamline the code.
- Ensured that the window variable is only accessed when necessary, improving clarity and performance.
- Maintained existing error handling and UI behavior during view selection.
- Introduced new translations for buttons, tooltips, and messages in the ColorSplasherWindow.ResourceDictionary.de_de.xaml file.
- Added options for "Select All" and "Select None" functionalities to enhance user experience.
- Updated tooltips to provide clearer guidance on selection actions.
- Added translations for "Select All" and "Select None" buttons to enhance user functionality.
- Updated tooltips for selection actions in both languages to improve user guidance.
- Removed duplicate entries for buttons and tooltips to streamline the resource dictionaries.
@jmcouffin
Copy link
Copy Markdown
Contributor Author

@tay0thman Please give it a ride and merge if good to go

video recording of implementation

  • one improvement I can foresee is to create a legend of lines instead of swatch when selection only line replacement color

@Wurschdhaud
Copy link
Copy Markdown
Contributor

Wurschdhaud commented Jan 11, 2026

Nice Idea! I didn't run into issues yet, only the font size is way too small for a high dpi screen.

EDIT: also #2941 could be used for positioning

@jmcouffin
Copy link
Copy Markdown
Contributor Author

Nice Idea! I didn't run into issues yet, only the font size is way too small for a high dpi screen.

Do you have a screen capture, so that I can adjust?

EDIT: also #2941 could be used for positioning

The floor is yours, show me! @Wurschdhaud

@tay0thman
Copy link
Copy Markdown
Contributor

@jmcouffin I like it, and I agree on the font size:
image

I don't think the update captured the issue #3001
I the intent of the request is to have a similar functionality of "Select Similar", see highlight below

image

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26023+2136-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26023+2141-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26025+1329-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26025+1418-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26030+2037-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26030+2039-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26030+2101-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26030+2136-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26030+2147-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26030+2212-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1043-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1111-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1304-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1323-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1433-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1538-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1543-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1553-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1612-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1624-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1738-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1743-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1829-wip

@jmcouffin jmcouffin deleted the localize-color-splasher-ui branch February 1, 2026 19:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1937-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 6.0.0.26032+1956-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 6.0.0.26032+2005-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 6.0.0.26032+2008-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New public release are available for 6.0.0.26032+2040

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New public release are available for 6.0.0.26032+2040

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Localization Issues related to pyRevit localization [subsystem] Tools Issues related to pyRevit commands [subsystem]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Color Splasher - Select elements

4 participants