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

fix: Truncate Notion select options that exceed length limit #451

Merged
merged 3 commits into from
Jan 27, 2024

Conversation

dvanoni
Copy link
Owner

@dvanoni dvanoni commented Jan 27, 2024

Fixes #240

Summary

Notion imposes a limit of 100 characters for the names of select and multi-select options. This presented an issue for the Collections property when collections with long-enough names were nested. Tags could also suffer from the same issue if a single tag had a name longer than 100 characters.

To resolve this, we now truncate option names in the middle of the string so that they conform to the 100-character limit.

Example

The following nested collections result in a name with 117 characters:

This name has 27 characters ▸ This name has 27 characters ▸ This name has 27 characters ▸ This name has 27 characters

This name is now truncated to the following:

This name has 27 characters ▸ This name has 27 cha…e has 27 characters ▸ This name has 27 characters

Copy link
Contributor

🤖 Build Bot

✅ Successful build

⬇️ Download: notero-0.5.12-370

@dvanoni dvanoni merged commit ebcdc9d into main Jan 27, 2024
5 checks passed
@dvanoni dvanoni deleted the truncate-option-names branch January 27, 2024 03:42
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.

Error when collection or tag name exceeds Notion length limit
1 participant