shlinkio / shlink-web-component

Minimal UI to interact with Shlink on React applications
MIT License
1 stars 2 forks source link

QR code modal ignores default errorCorrection value #382

Open inukiwi opened 1 week ago

inukiwi commented 1 week ago

shlink-web-client version

4.1.2

How do you use shlink-web-client

https://app.shlink.io

Current behavior

When opening the QR code modal it prepopulates the parameters in the URL, therefore ignoring the default values set on the Shlink server. This causes issues for us because we need a higher default errorCorrection value to still work with the custom logo feature.

Expected behavior

Ideally the modal settings would be populated from the default settings configured on the Shlink server, but I'm not sure if that is possible. Another option would be to leave the settings empty when opening the modal, so it would just use the basic url without parameters.

Minimum steps to reproduce

acelaya commented 1 week ago

I'm removing the "bug", as this is working as expected, but I hear you.

It would be good if initial values were those from Shlink, but as you guessed, Shlink does not expose them.

Another option would be to let you configure initial config in the web clients, but that would require defining defaults twice, which is also not great.

The options of not appending any params at first, might also be a good idea. I'll explore it.

Or maybe I do a combination of the last two. Let's see.

inukiwi commented 1 week ago

Thanks for looking into it!

Defining the config in the web client would all be clientside right? It's a definitely nice option, but it would also require all users to be made aware of the proper settings, having them enter those on every client and it would be hard to provision new settings.

I've made a small pull request that takes the approach of not appending any params initially.