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

Add Tablet info to browser name #821

Closed
miketaylr opened this issue Nov 5, 2015 · 4 comments
Closed

Add Tablet info to browser name #821

miketaylr opened this issue Nov 5, 2015 · 4 comments

Comments

@miketaylr
Copy link
Member

See #819 (comment).

The idea would be if we have device.model == 'Tablet', we add a (Tablet) after the browser name. Just need to investigate how other tablet browsers are currently displayed so we don't do something silly like Chrome Tablet (Tablet).

@miketaylr
Copy link
Member Author

To fix this bug, you'll probably want to add some logic to get_labels (label is a weird choice here, it's really more of hidden metadata we wrap in an HTML comment) to figure out if the UA is a tablet. That might involve re-parsing the UA string (or not, it's been a while since I've looked at this code).

https://github.com/webcompat/webcompat.com/blob/master/webcompat/form.py#L106

Code that sets a label on an issue:
https://github.com/webcompat/webcompat.com/blob/master/webcompat/webhooks/__init__.py &
https://github.com/webcompat/webcompat.com/blob/master/webcompat/webhooks/helpers.py#L27

get_browser_name and get_browser:
https://github.com/webcompat/webcompat.com/blob/master/webcompat/helpers.py#L102

(But it occurs to me that might be theoretical, I'm not sure I changed the endpoints in GitHub yet 👻)

@miketaylr
Copy link
Member Author

And for it to work at that point, we need to add a label to the web-bugs repo "firefox-mobile-tablet" (or similar, just has to match what we send to GitHub).

@miketaylr
Copy link
Member Author

@dshgna want to take a look at this bug?

@dshgna
Copy link
Contributor

dshgna commented Mar 4, 2016

@miketaylr working on it! Made an initial commit in #941 to check if I'm moving in the right direction.

Is there a way that I can simulate different devices when testing? I tried the responsive view in Firefox dev tools, but it doesn't change the user agent.

dshgna pushed a commit to dshgna/webcompat.com that referenced this issue Mar 8, 2016
dshgna pushed a commit to dshgna/webcompat.com that referenced this issue Mar 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants