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

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: material-components/material-components-web
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0
Choose a base ref
...
head repository: material-components/material-components-web
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.0.1
Choose a head ref
  • 9 commits
  • 87 files changed
  • 7 contributors

Commits on Mar 11, 2019

  1. docs: Replace stackblitz link with glitch for quick start demo (#4477)

    (cherry picked from commit 3dcfe42)
    abhiomkar authored and Kenneth G. Franqueiro committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    6372ae7 View commit details
    Browse the repository at this point in the history
  2. fix(feature-targeting): Move ripple styles into separate mixins (#4454)

    (cherry picked from commit 720bef0)
    mmalerba authored and Kenneth G. Franqueiro committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    f53aacc View commit details
    Browse the repository at this point in the history
  3. chore: Update del to the latest version 🚀 (#4475)

    (cherry picked from commit ac4f8bc)
    greenkeeper[bot] authored and Kenneth G. Franqueiro committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    8b41fe9 View commit details
    Browse the repository at this point in the history
  4. docs: Update versioning docs/references (#4483)

    (cherry picked from commit ec25008)
    kfranqueiro authored and Kenneth G. Franqueiro committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    10c3a50 View commit details
    Browse the repository at this point in the history
  5. chore: Convert custom linter from JS to TS (#4481)

    ### New features
    
    * Converts custom linter from JS to strict TypeScript
    * Adds new custom linter rules (see below)
    * Adds `curly: true` and `quotemark: avoid-escape` to `tslint.json` to match internal style guide
    * Fixes all linter violations (including missing/typo'd methods in `README.md` files)
    * Renames `npm run lint:imports` to `lint:mdc`
    * Renames `lint-imports.js` to `lint-mdc.ts`
    
    ### New linter rules
    
    #### Leading underscores are prohibited in function and property names
    
    ```ts
    function _emit() {} // linter error
    
    class MDCFoo {
      _bar = false; // linter error
    }
    ```
    
    #### Trailing underscores are only allowed on class properties and methods
    
    ```ts
    interface MDCFooAdapter {
      bar_(): void; // linter error (trailing underscore not allowed in interface)
    }
    
    class MDCFooFoundation {
      private bar_() {} // OK
    }
    ```
    
    #### Trailing underscore members must be marked `private` or `protected` (and vice versa)
    
    ```ts
    class MDCFoo {
      root_!: HTMLElement; // OK (there's an exception for root_)
      foo_ = false; // linter error (missing private/protected)
      private bar_ = 1; // OK
      protected baz = 2; // linter error (missing trailing underscore)
    }
    ```
    
    #### Inline-initialized properties that could overwrite method-assigned values are not allowed in `component.ts` files
    
    ```ts
    class MDCFoo {
      private foo_ = -1; // linter error (this.foo_ is reassigned below)
      private bar_ = -1; // OK (value is never reassigned)
    
      initialize() {
        this.foo_ = someCondition ? 16 : 0;
      }
    }
    ```
    
    #### `@returns` (plural) annotations are prohibited in favor of `@return` (singular)
    
    ```ts
    class MDCFoo {
      /**
       * @returns Whether the foo is a bar. // linter error (use `@return` instead)
       */
      isBar() {
        return true;
      }
    
      /**
       * @return Whether the foo is a baz. // OK
       */
      isBaz() {
        return true;
      }
    }
    ```
    
    #### Public class methods and properties must be documented in the package's `README.md` file
    
    This includes interfaces in `adapter.ts` as well.
    
    ```markdown
    ### `MDCFooAdapter`
    
    Method Signature | Description
    --- | ---
    `deregisterFoo() => void` | Deregisters the foo.
    
    ### `MDCFooFoundation`
    
    Method Signature | Description
    --- | ---
    `setFoo(foo: boolean) => void` | Sets the value of `foo`.
    ```
    
    ```ts
    /** @fileoverview adapter.ts */
    
    interface MDCFooAdapter {
      registerFoo(): void; // linter error (missing from README)
      deregisterFoo(): void; // OK (method appears in README)
    }
    ```
    
    ```ts
    /** @fileoverview foundation.ts */
    
    class MDCFooFoundation {
      foo = true; // OK (property appears in README)
      bar = true; // linter error (missing from README)
    
      setFoo(foo) { this.foo = foo; } // OK (method appears in README)
      setBar(bar) { this.bar = bar; } // linter error (missing from README)
    }
    ```
    
    ```ts
    /** @fileoverview types.ts */
    
    interface MDCMenuPoint {
      x: number; // OK (non-adapter interfaces are exempt)
      y: number; // OK (non-adapter interfaces are exempt)
    }
    ```
    
    ### Backward-incompatible changes
    
    Several internal methods had typos in their names prior to the [TS conversion](#4451). This PR fixes them.
    
    Realistically, the changes shouldn't affect any clients, but it's technically possible that someone could be relying on one of these methods:
    
    * `MDCTextField.initialSyncWithDom()` has been renamed to `initialSyncWithDOM()` to override the [base method in `MDCComponent`](https://github.com/material-components/material-components-web/blob/720bef02fe5d55cffe827614de89f6eac8b0526b/packages/mdc-base/component.ts#L50). This typo was [already present in the JS version](https://github.com/material-components/material-components-web/blob/aa4499148b39d1e7a77d68822047df536946fdb6/packages/mdc-textfield/index.js#L199).
    * `MDCDismissibleDrawerFoundation` methods `opened()` and `closed()` have been renamed to `opened_()` and `closed_()` to reflect their `protected` accessibility.
    * All methods with trailing underscores are now explicitly marked `private` or `protected`.
    
    (cherry picked from commit 7357170)
    acdvorak authored and Kenneth G. Franqueiro committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    ece5e88 View commit details
    Browse the repository at this point in the history
  6. docs(notched-outline): Add no-label class to class documentation (#4493)

    (cherry picked from commit 0dc25f4)
    williamernest authored and Kenneth G. Franqueiro committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    f2e75a4 View commit details
    Browse the repository at this point in the history
  7. fix: Don't import * from focus-trap to avoid default export confusion (

    …#4485)
    
    (cherry picked from commit 6082dc3)
    kfranqueiro authored and Kenneth G. Franqueiro committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    bd3d946 View commit details
    Browse the repository at this point in the history
  8. chore: Publish

    Kenneth G. Franqueiro committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    02a54e5 View commit details
    Browse the repository at this point in the history
  9. docs: Update CHANGELOG.md

    Kenneth G. Franqueiro committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    20e7132 View commit details
    Browse the repository at this point in the history
Loading