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

Show warning when QR code size is too large for overflow menu #35

Open
rugk opened this issue Apr 22, 2018 · 9 comments
Open

Show warning when QR code size is too large for overflow menu #35

rugk opened this issue Apr 22, 2018 · 9 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Hacktoberfest 2020, https://hacktoberfest.digitalocean.com
Milestone

Comments

@rugk
Copy link
Owner

rugk commented Apr 22, 2018

When the size of the QR code is manually set or remembered, it would be good to show a warning when the maximum size (especially width, as that is fixed) of a popup window there is exceeded.

Otherwise this happens:
grafik

@rugk rugk added the enhancement New feature or request label Apr 22, 2018
@rugk
Copy link
Owner Author

rugk commented Apr 22, 2018

@rugk rugk added the blocked This issue is blocked by something from the outside and cannot be done currently. label Apr 22, 2018
@rugk rugk removed the blocked This issue is blocked by something from the outside and cannot be done currently. label May 17, 2018
@rugk rugk changed the title Warning when size is too large for popup window in overflow menu Show warning when QR code size is too large for overflow menu May 17, 2018
@rugk
Copy link
Owner Author

rugk commented May 17, 2018

One can just estimate it based on the width…

STR:

  • manual set high QR code size
  • open in overflow menu

So what may be done here:

  • check that the popup is shown like that (width)
  • compare with QR code size
  • if it is likely to be shown distorted as in the image above, maybe show a warning message (depends on Implement (styling of) warning message #83) that it may be shown in a not-so good way
    Add an action button that takes the user to the settings. (Try to let it highlight using the target selector, which has been made for this/can be used for exactly that. Oh, wait, you cannot manually open the about:addons like that, too bad.)

@rugk rugk added the good first issue Good for newcomers label May 17, 2018
@jmichael2497
Copy link

seems like Firefox overflow system breaks several add-ons, so easiest start may be just adding note in the options menu size area stating size will be limited if it is in the overflow menu.

@rugk rugk added the hacktoberfest Hacktoberfest 2020, https://hacktoberfest.digitalocean.com label Oct 14, 2018
@rugk rugk removed the hacktoberfest Hacktoberfest 2020, https://hacktoberfest.digitalocean.com label Oct 31, 2018
@rugk
Copy link
Owner Author

rugk commented Apr 25, 2019

Why not just canvas {width: 100%}?

Because the size can be dynamically adjusted by the user/by settings in the options. "Automatically adjust" should roughly correspond to this.

adding note in the options menu size area stating size will be limited if it is in the overflow menu

I want to avoid showing such a thing when the user does not actually use the overflow menu.

So some ideas I have:

  • totally ignore the user's size setting, when the overflow menu is detected and just choose 100% width as noted?
  • show some error, if overflow is detected (as this issue originally proposed)

This whole size thing is also related to Android. Also there, depending on the setting, the size of the QR code can be a little suboptimal… (#151)


Generally, I have to admit, that this whole size handling got quite complex and we have edge cases like this one.
What I, however, want to keep, is the custom resizer (#57). And even on Android tablets, this may be a useful.

@rugk
Copy link
Owner Author

rugk commented Apr 25, 2019

The default size is specified in the options:
grafik

@rugk
Copy link
Owner Author

rugk commented Apr 25, 2019

Because they likely do not want to resize it each time the popup is opened. That's also why there is the "remember size" option: You can open the popup, adjust it for your screen/environment etc. and it is just restored again.

I'll certainly won't remove that feature. Or what are you actually suggesting?

@rugk
Copy link
Owner Author

rugk commented Apr 25, 2019

I'm not actually a user of your extension but I like its simple popup UI...

Well… then you should definitively try it out. 😃
(Please do so, without having done so, you can hardly judge what features may be missed or how it currently works.)

mobile screen: fill screen

Problem I would have here is the case of tablets… There you are unlikely to want this…

overflow menu: fill available area

That is a good idea and I am thinking about it, as I've said:

So some ideas I have:
[…]

  • totally ignore the user's size setting, when the overflow menu is detected and just choose 100% width as noted?

This extension even accounts for managed options... who needs managed options for a QR code generator?

I don't know/care, it's easy to implement though if you've abstracted it once… 😊 (actually, it's not even properly tested: #177) So I cannot answer you this option.


If you skip all of these options, your extension is already done and you can move onto a new project.

Well… implementing this properly certainly takes work, but yes, it could eliminate several problems.

Anyway, let's better discuss this in a new issue, as I like the general idea. I've summarized problems and your ideas in #187, so please let's discuss this there.

This issue could be obsoleted by it, but for now, let's keep this issue a "good first issue" for a small warning. 😄

@rugk
Copy link
Owner Author

rugk commented Apr 25, 2019

Right, that's the whole point, you added more work for yourself because now you also have to maintain and test it sweat_smile

Well yeah, but remember I use the same for other add-on's too. So there it is potentially more useful than for a QR code generator. Anyway, that's hardly a thing we need to discuss here…

I don't use QRs

At least for trying/testing it out, you should have a look. 😃

@rugk rugk added the hacktoberfest Hacktoberfest 2020, https://hacktoberfest.digitalocean.com label Sep 25, 2019
@rugk
Copy link
Owner Author

rugk commented Sep 25, 2019

https://github.com/TinyWebEx/EnvironmentDetector could help here.

@rugk rugk removed the hacktoberfest Hacktoberfest 2020, https://hacktoberfest.digitalocean.com label Nov 7, 2019
@rugk rugk added this to the v1.7 milestone Jan 24, 2020
@rugk rugk modified the milestones: v1.7, 2.0 May 31, 2020
@rugk rugk added the hacktoberfest Hacktoberfest 2020, https://hacktoberfest.digitalocean.com label Sep 29, 2020
@rugk rugk modified the milestones: 1.8, next Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Hacktoberfest 2020, https://hacktoberfest.digitalocean.com
Projects
None yet
Development

No branches or pull requests

2 participants