Skip to content

fix: Waves concat order#208

Merged
DanielRuf merged 1 commit intomaterializecss:mainfrom
Smankusors:fix-waves-concat-order
Oct 16, 2021
Merged

fix: Waves concat order#208
DanielRuf merged 1 commit intomaterializecss:mainfrom
Smankusors:fix-waves-concat-order

Conversation

@Smankusors
Copy link
Copy Markdown
Member

Proposed changes

There's a breaking change when we updated the Waves 0.6 to Waves 0.7. The Waves 0.7 now have module.exports, that inference with our module.exports. This becomes a problem when we want to use materializecss with require function (usually in a node environment like testing a React app, not in the browser).

I also merged the same arrays into one variable jsFile.

There should be no breaking change, but let me know if this ordering change somehow breaking something.

Code Example:

global.M = require("@materializecss/materialize");
console.log(M);

Output on materialize 1.0

  <ref *1> {
      jQueryLoaded: false,
      default: [Circular *1],
      version: '1.0.0',
      keys: { TAB: 9, ENTER: 13, ESC: 27, ARROW_UP: 38, ARROW_DOWN: 40 },
      tabPressed: false,
      keyDown: false,
      initializeJqueryWrapper: [Function (anonymous)],
      AutoInit: [Function (anonymous)],
      ...

Output on materialize 1.1-alpha

    {
      init: [Function (anonymous)],
      attach: [Function (anonymous)],
      ripple: [Function (anonymous)],
      calm: [Function (anonymous)],
      displayEffect: [Function (anonymous)]
    }

As you can see, the M in the materialize 1.1-alpha is not from materialize, but from the Waves.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).

Checklist:

  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@DanielRuf DanielRuf requested a review from a team October 15, 2021 18:09
@DanielRuf
Copy link
Copy Markdown

I guess when we would replace the current build setup this could be easily prevented @Smankusors?

@Smankusors
Copy link
Copy Markdown
Member Author

I guess when we would replace the current build setup this could be easily prevented @Smankusors?

eh, to be honest, I don't have any idea about alternative build setup 😅

Copy link
Copy Markdown

@LoganTann LoganTann left a comment

Choose a reason for hiding this comment

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

By reading the code, it looks even better than the original one.
However, I'm not experienced enough to tell if these changes are breaking something, nor proposing a better build system.

Copy link
Copy Markdown
Member

@wuda-io wuda-io left a comment

Choose a reason for hiding this comment

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

LGTM

@DanielRuf DanielRuf merged commit 9363a94 into materializecss:main Oct 16, 2021
@Smankusors Smankusors added the bug Something isn't working label Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants