Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

feat(auto-init): initialize components once with multiple mdc.autoInit() calls #4691

Merged
merged 11 commits into from
May 17, 2019

Conversation

moog16
Copy link
Contributor

@moog16 moog16 commented May 8, 2019

fixes #4495

@mdc-web-bot
Copy link
Collaborator

All 645 screenshot tests passed for commit f634e82 vs. master! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 645 screenshot tests passed for commit 57bbcef vs. master! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 687 screenshot tests passed for commit 989f298 vs. master! 💯🎉

Matt Goo added 2 commits May 14, 2019 13:45
…erial-components/material-components-web into feat/auto-init/add-auto-init-trackng
@moog16
Copy link
Contributor Author

moog16 commented May 14, 2019

ready for rereview

@mdc-web-bot
Copy link
Collaborator

All 687 screenshot tests passed for commit 165194e vs. master! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 687 screenshot tests passed for commit f20eb17 vs. master! 💯🎉

export const strings = {
AUTO_INIT_ATTR: 'data-mdc-auto-init',
AUTO_INIT_STATE_ATTR: 'data-mdc-auto-init-state',
INTIALIZED_STATE: 'initialized',
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo* INITIALIZED_STATE

@mdc-web-bot
Copy link
Collaborator

All 687 screenshot tests passed for commit 22a86ae vs. master! 💯🎉

@moog16
Copy link
Contributor Author

moog16 commented May 16, 2019

The :not() selector within the mdcAutoInit method is not supported by IE11.

const nodes: Element[] = [].slice.call(root.querySelectorAll(
    `[${AUTO_INIT_ATTR}]:not([${AUTO_INIT_STATE_ATTR}="${INITIALIZED_STATE}"])`));

Looking for other solutions.

Failure seen in https://travis-ci.com/material-components/material-components-web/jobs/200896441

@mdc-web-bot
Copy link
Collaborator

All 687 screenshot tests passed for commit 364139d vs. master! 💯🎉

Matt Goo added 2 commits May 17, 2019 14:31
…erial-components/material-components-web into feat/auto-init/add-auto-init-trackng
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@63ef3e2). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #4691   +/-   ##
=========================================
  Coverage          ?   98.97%           
=========================================
  Files             ?      129           
  Lines             ?     6331           
  Branches          ?      821           
=========================================
  Hits              ?     6266           
  Misses            ?       64           
  Partials          ?        1
Impacted Files Coverage Δ
packages/mdc-auto-init/index.ts 95.83% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63ef3e2...525eb29. Read the comment docs.

@mdc-web-bot
Copy link
Collaborator

All 687 screenshot tests passed for commit 525eb29 vs. master! 💯🎉

@moog16 moog16 merged commit 218d2e5 into master May 17, 2019
@moog16 moog16 deleted the feat/auto-init/add-auto-init-trackng branch May 17, 2019 21:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-init: Enable it to run twice and track what has been initialized
5 participants