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

feat: add boostLevel prop and support value segmentation #374

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

offirgolan
Copy link
Contributor

@offirgolan offirgolan commented Oct 10, 2024

Hi @zpao, I've been using this lib for some time now and its been great! My most recent project has very specific requirements for the version and ECL which requires the following features to be added:

  • Add boostLevel prop which gets passed into encodeSegments (Closes Missing “Boost ECC” flag causing discrepancy with other libraries #356)
    • Without this prop, even if we specify an ECL of L, it gets boosted to M
    • Let me know if you want me to change the name of this prop
  • Add support for the value to be a string array that represents specific segments for improved version optimization. Since qrcodegen does single segment detection the version is increased in certain situations.
    • For example, https://foo.bar.com/ABC/DEF123 will become version 3, but if split like this ['https://foo.bar.com', '/ABC/DEF123'], it will become version 2 since the first segment is Bit and the second is alphanumeric.

@offirgolan
Copy link
Contributor Author

@zpao bump 😄

Copy link
Owner

@zpao zpao left a comment

Choose a reason for hiding this comment

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

I was hesitant when the issue was filed but this is pretty innocuous and backwards compatible. Let's do it.

I did want to make trunk v5 but that can wait since this would be a minor bump.

@zpao zpao merged commit 3bf5f08 into zpao:trunk Oct 22, 2024
8 checks passed
@zpao zpao added this to the 4.1.0 milestone Oct 22, 2024
zpao added a commit that referenced this pull request Oct 22, 2024
- Ran formatter
- Updated encoding mode section to cover multiple values
@sunknudsen
Copy link

Thanks for submitting PR @offirgolan and thanks for merging it @zpao.

@offirgolan offirgolan deleted the boost-ecl-and-multi-segment-support branch October 22, 2024 17: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.

Missing “Boost ECC” flag causing discrepancy with other libraries
3 participants