Skip to content

🚀 [Story performance] Remove media query matcher#36747

Merged
mszylkowski merged 4 commits intoampproject:mainfrom
mszylkowski:removeMeidaQueryMatcher
Nov 5, 2021
Merged

🚀 [Story performance] Remove media query matcher#36747
mszylkowski merged 4 commits intoampproject:mainfrom
mszylkowski:removeMeidaQueryMatcher

Conversation

@mszylkowski
Copy link
Copy Markdown
Contributor

Closes #36695

We don't use the media query matcher, so we can remove it from the bundle

@mszylkowski mszylkowski requested a review from gmajoulet November 3, 2021 19:29
@amp-owners-bot
Copy link
Copy Markdown

amp-owners-bot bot commented Nov 3, 2021

Hey @gmajoulet, @newmuis! These files were changed:

extensions/amp-story/1.0/amp-story-media-query-service.js
extensions/amp-story/1.0/amp-story.css
extensions/amp-story/1.0/amp-story.js
extensions/amp-story/1.0/test/test-amp-story-media-query-service.js

@mszylkowski mszylkowski self-assigned this Nov 3, 2021

this.initializePromise_ = new Promise((resolve) => {
this.matcher_ = this.win_.document.createElement('iframe');
this.matcher_.classList.add('i-amphtml-story-media-query-matcher');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This CSS can be removed too

* @return {!AmpStoryMediaQueryService}
*/
export const getMediaQueryService = (win) => {
let service = Services.storyMediaQueryService(win);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This can be removed too from #service

@mszylkowski
Copy link
Copy Markdown
Contributor Author

@jridgewell for service/index.html

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.

[Story] Remove media query matcher

4 participants