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

Fixes #3281 - Convert issue page to be server rendered (part 1) #3294

Merged
merged 25 commits into from
Apr 29, 2020

Conversation

miketaylr
Copy link
Member

Right now I'm going to leave this as a draft. I decided to not tackle existing comments here just to keep things small. I'll file a follow-up on that and tackle it once this lands.

@miketaylr

This comment has been minimized.

@miketaylr

This comment has been minimized.

@miketaylr

This comment has been minimized.

@miketaylr
Copy link
Member Author

miketaylr commented Apr 24, 2020

TODO:

  • create a template filter to handle the milestone / state text (Closed: Needs Diagnosis, or Needs Diagnosis, etc.) Right now we just show the milestone name (which is a single lowercase word)
  • fix bugs in AsideView.render() -- I forgot about handling the state (closed vs open)
  • Remove the xhr request to the API endpoint (if we can get away with it, I haven't thought much about it... might require dumping initial state for asideview into the document)
  • fix HTTP caching
  • Handle GitHub error (if the issue doesn't exist, for example)

@miketaylr miketaylr force-pushed the issues/3281/1 branch 2 times, most recently from 6c0e0d6 to 2b00a2f Compare April 24, 2020 21:06
@miketaylr

This comment has been minimized.

@miketaylr

This comment has been minimized.

@miketaylr

This comment has been minimized.

@miketaylr miketaylr marked this pull request as ready for review April 28, 2020 21:59
@miketaylr miketaylr requested review from karlcow and ksy36 April 28, 2020 21:59
@miketaylr
Copy link
Member Author

OK, ready for review now. Not urgent, any time this week. 🙇 🙇‍♀️

r? @ksy36 for JS
r? @karlcow for Python

Copy link
Member

@karlcow karlcow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of comments. :) hope it helps.

Super encouraging, super cool to work on that. thanks @miketaylr

tests/unit/test_template.py Outdated Show resolved Hide resolved
tests/unit/test_template.py Outdated Show resolved Hide resolved
tests/unit/test_template.py Outdated Show resolved Hide resolved
tests/unit/test_template.py Outdated Show resolved Hide resolved
webcompat/helpers.py Show resolved Hide resolved
webcompat/templates/__init__.py Show resolved Hide resolved
webcompat/templates/__init__.py Outdated Show resolved Hide resolved
webcompat/templates/__init__.py Outdated Show resolved Hide resolved
webcompat/views.py Show resolved Hide resolved
webcompat/views.py Outdated Show resolved Hide resolved
Mike Taylor and others added 6 commits April 29, 2020 16:07
The server handles the initial render, but the client needs
to react accordingly when things get changed.
We just bootstrap the issue model by dumping the data we already
have to JSON.

(In retrospect, we could have done this at the beginning and called
it a day...)
The nonce was random for each request, so it broke etags / caching.
@miketaylr
Copy link
Member Author

Heh, managed to mess things up while rebase. git reflog to the rescue...

@miketaylr
Copy link
Member Author

OK, apologies for the messy merge commit.

r? @karlcow

Copy link
Member

@karlcow karlcow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple more code suggestions for tests.

tests/unit/test_template.py Outdated Show resolved Hide resolved
tests/unit/test_template.py Outdated Show resolved Hide resolved
tests/unit/test_template.py Outdated Show resolved Hide resolved
tests/unit/test_template.py Outdated Show resolved Hide resolved
@karlcow
Copy link
Member

karlcow commented Apr 29, 2020

some edits, one rebase, let's run the tests.

Copy link
Member

@karlcow karlcow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all green

@karlcow karlcow merged commit ed96b3d into master Apr 29, 2020
@karlcow karlcow deleted the issues/3281/1 branch April 29, 2020 23:05
@karlcow
Copy link
Member

karlcow commented Apr 29, 2020

And this is merged.

@miketaylr
Copy link
Member Author

❤️

@magsout
Copy link
Member

magsout commented Apr 30, 2020

Super nice work 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants