futpib / policeman

Firefox extention for cross-site requests control (kind of RequestPolicy clone)
https://addons.mozilla.org/en-US/firefox/addon/policeman/
142 stars 11 forks source link

Popup gets cropped on smaller resolution displays and depending on toolbar button placement #40

Open heforfree opened 9 years ago

heforfree commented 9 years ago

as you can see some optons not visible when all content type enabled if you can make some how position of this button Dynamic or you can change font size to 11px with Stylish i set below style and everything show fine

policeman-popup {

font-size:11px; }

edit:change font size work but if i change location of policeman toolbar icon it not working edit2:i set 10.9px And show fine again.i put policeman toolbar icon to addressbar with url-addon-bar so it need smaller font

image 1

bastik-1001 commented 9 years ago

I run policeman 0.12 in FF 33.0.2 (32bit German, policeman is also German) on Win7 (64bit, German) with a screen resolution of 1920x1080. All categories in the popup are enabled.

I can not reproduce it. If I move the toolbar icon to the far left, everything gets displayed, like it is when the icon is on the far right.

I'm just reporting that it works for me to help to track down the cause of this.

@heforfree What is your resolution? The popup seems to cover almost the entire width of the screen.

heforfree commented 9 years ago

@bastik-tor my resolution is 1280 x 1024

bastik-1001 commented 9 years ago

@heforfree After I asked you I tested it myself. When I use 1280x720 (just for testing, just an example) I can reproduce it. If the resolution is "too" low the popup elements get cut off.

It would be better to support resolutions below whatever is "required" right now.

futpib commented 9 years ago

Yes, those buttons should shrink I guess. Also there was a reviewer on AMO who pointed out that if one moves toolbar icon closer to the centre of the panel, popup covers only half of a screen and gets cropped (especially on smaller displays).

ghost commented 9 years ago

The fact is that Policeman's popup is programmed to appear relatively to Policeman toolbar button's position. So if the toolbar button is far right or far left the whole width of the screen (minus a few pixels) will be available. Otherwise there will be a problem when popup content requires more width.

With an example of a long domain name for testing : http://3.141592653589793238462643383279502884197169399375105820974944592.com/

With toolbar button far right, no problem, elsewhere impossible here with a 1600px wide screen. Why not have the popup displayed at (0,0) ? No more problems.

ghost commented 9 years ago

I have problems editing here, sorry. I'm used to forums ...

Screenshot with toolbar far right : http://hpics.li/fa02ed2 Screenshot with toolbar center-left : http://hpics.li/87d0dc8

futpib commented 9 years ago

Yeah, well, (0,0) is like a workaround, it would do the trick, but a real solution would be to grow beyond anchor-button if necessary, and I am not sure how to do that yet.

ghost commented 9 years ago

When I see all that has been improved from Policeman 0.8 to latest 0.13 I really start getting nervous for this one little detail :) It's a pity because being able to move the toolbar button far from the extremes and closer to the center would serve users who have built their GUI with a logic for toolbar grouping...

I understand what you mean futpib, especially that (0,0) would not resolve the popup rendering on small screens... but meanwhile it would help! I know what it is to search the right answer rather than a workaround, that means you strive for quality! But sometimes... temporary solutions can help :)

heforfree commented 9 years ago

this is maybe can improve,but not Ideal Solution.or can be temp Solution url in origin,distination,Related temporary rules,Related persistent rules will good breacked in two or more line after 30 character. and same thing for rejected request,allowed request but after 40 character so full url breacked in to two or more line(and good sorted such request at the end) and if "Show types if no request of this type was made" also select by user,that button show correct too sine all site dont use all content type also you can rename rejected request,allowed request to Rejected and Allowed So that button will be smaller

thank you edit:or can be hided and visible on tooltip

edit2:most like this http://perishablepress.com/wrapping-content/

Thomas-N commented 9 years ago

I'm sorry I didn't see this issue was already posted. As I posted in the issue heforfree referenced (I think, I'm still new to github) I'm experiencing this as well, on my laptop. The popup has the entire screen available if necessary, but some domain names are still too long. Maybe there could be some change in how really long domain names are displayed?

heforfree commented 9 years ago

@futpib for0.18pre5 comparing below screenshot with first post screenshot it is really better.at least on my screen resolution image 1

and after i click on other request it is look below and it is really smaller.and good for smaller resolution image 2

Uncategorized is show as ??? if you want rename it to N/A and limit Length of rejected request,allowed request,so popup dont fill screen

i also see this in a log TypeError: elements[low].getBoundingClientRect is not a function scrollbox.xml:387

futpib commented 9 years ago

@heforfree Yes, n/a is definitely better. That log line looks unrelated to policeman.

EDIT: the log line is actually very policeman-related, thx.

heforfree commented 9 years ago

see yellow high light part of screenshot it is clickable. image 3

futpib commented 9 years ago

So I think the last part of this issue is the long domain names problem (like with 3.1415... domain above). Tell me if I'm wrong.

Halibut80 commented 9 years ago

Maybe, this better for buttons: display:inline for #policeman-popup-rejected-requests-filters-container and for #policeman-popup-allowed-requests-filters-container

without "short" name.

heforfree commented 9 years ago

@futpib i use below style to limit long url in rejected request allowed request.so fix this and then the only problem is long domain names. https://gist.github.com/heforfree/1b0ef5477c8e01707631

image 1

futpib commented 9 years ago

@heforfree I don't get what you think is a problem, long links are elided without any external style.

futpib commented 9 years ago

@Halibut80 Actually, I think this should be the default behaviour, maybe I'll leave smallish buttons as an option.

heforfree commented 9 years ago

@futpib yes it is not problem but all i say it is better the popup dont fill whole screen.

xarragon commented 9 years ago

I also experienced these issues on my older Thinkpad with a XGA (1024x768) resolution and complex URLs. Version 0.18.1.1. I would just add horizontal scrollbars if the size is too small. Otherwise I love this extension, far surpasses RequestPolicy in usefulness because of the excellent panel. I can leave a more detailed bug report with a screencapture showing the issues if needed.