Skip to content

Conversation

calebcordry
Copy link
Member

@calebcordry calebcordry commented Jul 17, 2020

I know it says 3000 lines, but it's really not so bad if you use the ?w=1 whitespace trick :)

I will start working on enabling the integration test tomorrow, but I didn't want to lose the momentum on this. Happy to wait to merge until we get integration test going. I haven't looked at integration yet, but 3p fallback is not yet fully supported so may have to wait for that.

Part of #27189

@calebcordry calebcordry requested review from powerivq and lannka July 17, 2020 00:57
@google-cla google-cla bot added the cla: yes label Jul 17, 2020
this.creativeSize_ = size || this.creativeSize_;

// Update priority.
this.updateLayoutPriority(LayoutPriority.CONTENT);
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't this too early? should update priority when we know it's (claimed to be) AMP.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah you are probably right, but I haven't implemented the check for ⚡️ or fallback yet. Added a todo to make sure I update this value where appropriate.

streamResponseToWriter(this.win, response, detachedStream);

this.sanitizedHeadPromise_ = transformStream
transformStream
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a unreferenced promise chain. might cause issues. do we want to return or catch?

Copy link
Contributor

Choose a reason for hiding this comment

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

or shall we assign it to this.sanitizedHeadPromise_ ? i saw it is used in renderFriendlyTrustless_.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry I'm not quite sure what you mean here

Copy link
Contributor

Choose a reason for hiding this comment

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

i don't quite understand the reason for the change in L909 to L912

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah I see, yes the change was so that we initialize as a promise instead of null, otherwise if layoutCallback was called before the fetch response returned it would throw that null has no .then in renderFriendlyTrustless.

Copy link
Contributor

@lannka lannka left a comment

Choose a reason for hiding this comment

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

Approved with one last question

@calebcordry calebcordry merged commit 804ca49 into ampproject:master Jul 20, 2020
@calebcordry calebcordry deleted the unsigned-render branch July 20, 2020 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants