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

feat(menu): Convert JS to TypeScript #4342

Merged
merged 80 commits into from
Feb 6, 2019

Conversation

acdvorak
Copy link
Contributor

@acdvorak acdvorak commented Feb 2, 2019

Refs #4225

acdvorak and others added 30 commits January 18, 2019 22:33
…omponents/material-components-web into feat/typescript--menu-surface
@acdvorak acdvorak force-pushed the feat/typescript--menu-surface--menu branch from 90855bb to af4ea8f Compare February 5, 2019 19:29
@acdvorak acdvorak changed the base branch from feat/typescript--menu-surface to feat/typescript February 5, 2019 21:20
@codecov-io
Copy link

codecov-io commented Feb 6, 2019

Codecov Report

Merging #4342 into feat/typescript will increase coverage by 0.12%.
The diff coverage is 98.64%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           feat/typescript    #4342      +/-   ##
===================================================
+ Coverage             98.4%   98.52%   +0.12%     
===================================================
  Files                   93       93              
  Lines                 5819     5832      +13     
  Branches               783      789       +6     
===================================================
+ Hits                  5726     5746      +20     
+ Misses                  92       85       -7     
  Partials                 1        1
Impacted Files Coverage Δ
packages/mdc-menu/index.ts 100% <100%> (ø)
packages/mdc-list/index.ts 98.5% <100%> (ø) ⬆️
packages/mdc-select/index.js 98.34% <100%> (ø) ⬆️
packages/mdc-menu/foundation.ts 95.38% <96.55%> (ø)

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 0b28992...4b99848. Read the comment docs.

@mdc-web-bot
Copy link
Collaborator

All 621 screenshot tests passed for commit 2cfb7de vs. feat/typescript! 💯🎉

Copy link
Contributor

@moog16 moog16 left a comment

Choose a reason for hiding this comment

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

looks good - just some minor changes

`getParentElement(element: HTMLElement) => ?HTMLElement` | Returns the `.parentElement` element of the `element` provided.
`getSelectedElementIndex(element: HTMLElement) => number` | Returns the `index` value of the element within the selection group provided, `element` that contains the `mdc-menu-item--selected` class.
`getElementIndex(element: Element) => number` | Returns the `index` value of the `element`.
`getParentElement(element: Element) => ?Element` | Returns the `.parentElement` element of the `element` provided.
Copy link
Contributor

Choose a reason for hiding this comment

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

Also TS lib.dom.d.ts states it is an HTMLElement

/**
     * Returns the parent element.
     */
    readonly parentElement: HTMLElement | null;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

*/
getParentElement(element) {}
getParentElement(element: Element): Element | null;
Copy link
Contributor

Choose a reason for hiding this comment

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

according to TS Node class it is an HTMLElement that is returned

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

ha - ya that makes sense. I would think they want it to be Element. Ok let's leave it for now.

@mdc-web-bot
Copy link
Collaborator

All 621 screenshot tests passed for commit e53bd13 vs. feat/typescript! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 621 screenshot tests passed for commit 06892e7 vs. feat/typescript! 💯🎉

Copy link
Contributor

@moog16 moog16 left a comment

Choose a reason for hiding this comment

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

one comment about the year. looks good!

@mdc-web-bot
Copy link
Collaborator

All 621 screenshot tests passed for commit ac33ef4 vs. feat/typescript! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 621 screenshot tests passed for commit 4b99848 vs. feat/typescript! 💯🎉

@acdvorak acdvorak merged commit dc4e92c into feat/typescript Feb 6, 2019
@acdvorak acdvorak deleted the feat/typescript--menu-surface--menu branch February 6, 2019 22:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants