Skip to content

Conversation

Wurschdhaud
Copy link
Contributor

Description

Adds a detailed count of displayable elements as well as total selected elements to the error message. Calculation is only run inside the if statement.


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:


Additional Notes

Include any additional context, screenshots, or considerations for reviewers.


Thank you for contributing to pyRevit! 🎉

Copy link
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 error message when the linkify function encounters URLs exceeding the 2000 character limit. Instead of a generic "URL was too long and discarded" message, users now see the actual URL length and how many elements could fit within the limit versus the total selected. Also removes an unused DB import.

Review Summary:

The implementation correctly calculates the URL length accounting for separators and provides actionable feedback to users. The logic properly reconstructs the URL format (element[]=id with & separators) and matches the original construction pattern. Code follows Black formatting and PEP 8 naming conventions as required for IronPython 2.7. The fix directly addresses issue #2847 with a clean, straightforward solution.

No critical issues identified. ✅

@jmcouffin jmcouffin merged commit f0c3530 into pyrevitlabs:develop Oct 6, 2025
@Wurschdhaud Wurschdhaud deleted the fix-for-#2847 branch October 7, 2025 03:56
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.

linkify too long error message isn't descriptive
2 participants