Lightroom: Trim spaces from metadata upon entry

  • 4
  • Idea
  • Updated 7 years ago
  • (Edited)
I've had some strange metadata handling snafus due to "hard to detect" trailing spaces in metadata fields. I can't see any reason for the software not to trim spaces, can you? They are trimmed from keywords, but not virtual copy name or title or caption or custom metadata... Even if there is a good reason why somebody might need to have those spaces (perhaps just for backward compatibility), an option to prompt or just always trim upon entry would be good. As it stands, if you have a metadata field with "My Idea", and "His Idea ", then look for everything that ends with "Idea", you'll only see the first of those.

Bonus Idea: Trim spaces from preset names too, and wherever else is applicable. As it stands, you can save: "My Preset ", and then save "My Preset" and it won't be seen as a duplicate.

-R
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 372 Reply Likes

Posted 7 years ago

  • 4
Photo of jdv

jdv, Champion

  • 728 Posts
  • 55 Reply Likes
Keywords are normalized data, but other kinds of string metadata may not be. It's hard to know ahead of time which ones are candidates where someone might want to preserve whitespace.

I tend to agree that leading and trailing whitespace should just be trimmed regardless, but it does mean that we are down the path of normalizing a lot of data. Going from a hands-off approach to full normalization is a slippery slope. So I can see why Lightroom has maintained thed hands-off approach so far. (Well, except for the case of keyword metadata, which is almost always treated special because it has to be categorized and itemized.

No matter what, plug-ins should be comparing normalized strings regardless of what they get back from SDK calls. As for UI labels, we should probably be concentrating on those changes that do not introduce surprise.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 372 Reply Likes
Proposal:

- trim spaces since it would be best for the vast majority of users, whether they've encountered a problem with it yet, that they know of, or not.
- consider an option to preserve spaces for backward compatibility with previous oops, just in case someone has come to take advantage of it (not recommended).

My guess: most users have never even thought about it, or they just assumed spaces are being trimmed, and would be shocked to discover otherwise - I know I was...

I encountered a problem with it a long time ago, but then fixed the spaces manually, and forgot about it, until I had another problem recently - oh yeah, now I remember...

Rob