Skip to content

Issue title page has no information #1412

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

Closed
1 of 2 tasks
karlcow opened this issue Mar 8, 2017 · 5 comments
Closed
1 of 2 tasks

Issue title page has no information #1412

karlcow opened this issue Mar 8, 2017 · 5 comments

Comments

@karlcow
Copy link
Member

karlcow commented Mar 8, 2017

Currently, our issues individual pages have no information about the issue.

<head>
  <title>webcompat.com</title></head>

This is due to the way we are handling the site. With empty templates fetching the information through JavaScript. It creates a couple of issues

capture d ecran 2017-03-08 a 11 56 09

Suggestions

  • grab the issue number from the template. It's in there already
  • change the way we build the template by pre-fetching the issue JSON file then prepopulating it. (my favorite choice)

Or we could modify the title through JS (but meh…) aka something along…

document.title = IssueNumber + document.body.getElementsByTagName('h1')[0].textContent + SiteTitle
heatherbooker added a commit to heatherbooker/webcompat.com that referenced this issue Mar 9, 2017
@heatherbooker
Copy link
Contributor

@karlcow What do you mean about pre-fetching the JSON and prepopulating the page?

I have a PR coming that I think just does the first suggestion, but if you can tell me a bit more about your preferred suggestion I can definitely do that!

I also added page titles to the majority of other pages while I was at it. LMK if you'd rather not include those.

@karlcow
Copy link
Member Author

karlcow commented Mar 9, 2017

@heatherbooker Ah excellent . Indeed your commit fixes the issue number. This is the low hanging fruit. Excellent. This is my first bullet point.

The second bullet point is to have the title with the domain name.
https://webcompat.com/issues/4999

<title>Issue #4999 - www.skylinewebcams.com - video doesn't play -webcompat.com</title>

To choose on how to do that. There is probably a need of evaluating the performance impact of prefetching the JSON on the server side before generating the HTML. But that's a bigger project. Maybe.

@karlcow
Copy link
Member Author

karlcow commented Mar 9, 2017

It would be good to add a couple of unit tests for testing we received the right title.

heatherbooker added a commit to heatherbooker/webcompat.com that referenced this issue Mar 10, 2017
@heatherbooker
Copy link
Contributor

@karlcow Great point about testing it! I added a test.

Ok I see what you're saying about also having the issue title in the page title. Yeah, that does seem like a larger concern - I've never used flask, jinja, or backbone before but I've been sifting through their docs and webcompat code to try and figure out how one would go about getting that data pre-page load.

If you want to leave that as a bigger project (esp. if concerned about performance impact), I consider this PR ready for review; if you'd like me to continue looking into it, LMK! :)

@karlcow
Copy link
Member Author

karlcow commented Mar 10, 2017

OK let's make this a first step. Thanks a lot. I added myself as a reviewer. I'm boarding a plane soon. I will review it when I reach the other side.

heatherbooker added a commit to heatherbooker/webcompat.com that referenced this issue Mar 13, 2017
heatherbooker added a commit to heatherbooker/webcompat.com that referenced this issue Mar 16, 2017
heatherbooker added a commit to heatherbooker/webcompat.com that referenced this issue Mar 17, 2017
karlcow added a commit that referenced this issue Mar 17, 2017
bastianalbers pushed a commit to bastianalbers/webcompat.com that referenced this issue Mar 27, 2017
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