Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for initialisms in spice names #18

Merged

Conversation

harlanhaskins
Copy link
Contributor

Description

This improves handling for multiple sequenced uppercase characters in spice names when formatting for display.

Motivation and Context

Right now all uppercase characters are being treated as word boundaries, which is sub-optimal. It causes property names like "localURL" to become "Local U R L", necessitating overrides for all the properties.

This new implementation keeps multiple uppercase characters together as a single word, and splits instead on the boundary where an uppercase character is introduced after a lowercase one.

This does a better job of preserving initialisms, but doesn't properly handle initialisms at the start of the spice name. I'm not sure a great solution for that, so clients should just override those where appropriate.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

harlanhaskins and others added 2 commits February 28, 2025 12:28
Right now all uppercase characters are being treated as word boundaries, which is sub-optimal.
It causes property names like "localURL" to become "Local U R L", necessitating overrides
for all the properties.

This new implementation keeps multiple uppercase characters together as a single word, and splits
instead on the boundary where an uppercase character is introduced after a lowercase one.

This does a better job of preserving initialisms, but doesn't properly handle initialisms at the start of
the spice name. I'm not sure a great solution for that, so clients should just override those where appropriate.
@simonbs simonbs enabled auto-merge March 1, 2025 15:02
@simonbs simonbs merged commit 4478e71 into shapehq:main Mar 1, 2025
9 checks passed
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.

2 participants