-
Notifications
You must be signed in to change notification settings - Fork 192
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
Fixes #821: Add Tablet info to browser name #941
Conversation
r? @miketaylr Made an initial commit to verify that if I'm moving in the right direction. |
Looks like you're on the right track, yes! It might be good to add a few tests to https://github.com/webcompat/webcompat.com/blob/master/tests/test_helpers.py to make sure the right UA strings get the Tablet treatment and some non-Tablet ones don't. |
r? @miketaylr I'm a bit confused on moving forwards. As the browser name has been set to include tablets, what else should be changed in the backend logic? Could you give me some hints please? :) |
hehe @miketaylr ping. But to help. The science of UA strings is black magic. So basically there's no perfection. But we want to make sure that indeed we get the right label when there is a tablet hitting webcompat. So currently get_browser_name is used in which calls itself the templating engine for the index page and prepopulate the form: <div class="wc-Form-group js-Form-group">
<label class="wc-Form-label" for="browser">Browser / Version</label> <input class="wc-Form-item" id="browser" name="browser" value="Firefox 47.0" type="text">
</div> When we actually submit the form we get the value of the UA from form['ua_header'] = request.headers.get('User-Agent') https://github.com/dshgna/webcompat.com/blob/issue/821/webcompat/views.py#L162 Then we head to https://github.com/dshgna/webcompat.com/blob/issue/821/webcompat/issues.py#L19 which is using which is reading the but also triggers the labels: aka SO I guess the final question is what type of labels do we want in the bug reporting system when there is a tablet :) |
Oh! So sorry @dshgna, this mention escaped me. 🙈 |
@dshgna if you click on the Details link of the travis-ci build (see https://cloudup.com/cy5FSvXC0WB), you'll see the following error (scroll down and look for the red text):
Can you re-run pep8 and fix any errors there (and push the fixes)? |
@karlcow do you think it makes sense to have "firefox mobile tablet" label in addition to "firefox mobile"? Or is the name in the bug report "Firefox Mobile (Tablet)" sufficient? I don't have any strong feelings, I'm sort of leaning towards just one "firefox mobile" label... |
@dshgna a few commit nits to take care of if you don't mind: When you fix up pep8 errors, can you add "Issue #821. " to the beginning of the commit message (for the test commit)? Likewise, for the first commit -- can you add a hash mark in front of the issue number, e.g., "Fixes #821"? That will help link all the commits to the issue. If you need help on how to re-write a commit message just let me know! |
@miketaylr about
I would rather have two differents labels such as:
and/or an information about the screen size. The reason it has happen often that I didn't know if the bug reporter was talking about tablets and was testing on a small viewport device. In some cases, Web sites choose to send desktop sites to the tablet form factor. I suspect you guess the form factor by looking at the UA in general and because you spent most of your time in github instead of webcompat ;) :p (Use the force, mike, it helps to improve the product hmm no laser sabre in emojis. Maybe this will do ⚡️🗡🐸) |
OK, that's what this should do. 👍
Sounds like a good feature request. File a bug? This would be good info to put in the bug body.
Yes and no. :p |
Fixes #821: Add Tablet info to browser name
@miketaylr Just a bit confused here on the merge :)
I got the understanding that I had to change the 'browser mobile tablet' to 'browser tablet' and just made a commit as such. So, is this okay as is? |
Personally I think "firefox mobile tablet" is ok! Let's see how it feels and we can change it up as needed. |
@miketaylr sure thanks! 👍 |
Initial commit.