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

feat(linear-progress): Implement Linear Progress indicators #672

Merged
merged 9 commits into from
May 23, 2017

Conversation

lynnmercier
Copy link
Contributor

Resolves #29: Implement Linear Progress Indicator Component

Resolves #29: Implement Linear Progress Indicator Component
@lynnmercier lynnmercier requested a review from amsheehan May 18, 2017 18:49
@codecov-io
Copy link

codecov-io commented May 18, 2017

Codecov Report

Merging #672 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #672      +/-   ##
==========================================
+ Coverage   99.92%   99.92%   +<.01%     
==========================================
  Files          59       62       +3     
  Lines        2504     2572      +68     
  Branches      291      295       +4     
==========================================
+ Hits         2502     2570      +68     
  Misses          2        2
Impacted Files Coverage Δ
packages/mdc-linear-progress/foundation.js 100% <100%> (ø)
packages/mdc-animation/index.js 100% <100%> (ø) ⬆️
packages/mdc-linear-progress/constants.js 100% <100%> (ø)
packages/mdc-linear-progress/index.js 100% <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 25414ac...c6116ea. Read the comment docs.

Copy link
Contributor

@amsheehan amsheehan left a comment

Choose a reason for hiding this comment

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

There are just a few small things I can find. This looks really good. 👏 👏 👏

demos/index.html Outdated
@@ -167,6 +167,14 @@
</li>

<li class="mdc-list-item">
<span class="catalog-list-icon mdc-list-item__start-detail"><img class="catalog-component-icon" src="/images/ic_component_24px.svg" /></span>
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this image should be:

https://material.io/components/images/component_icons/progress_activity.svg

At least, that's what iOS uses.

<main class="mdc-toolbar-fixed-adjust">

<section class="hero">
<div role="progressbar" class="mdc-linear-progress mdc-linear-progress--indeterminate">
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: indent level

@@ -0,0 +1,186 @@
<!DOCTYPE html>
Copy link
Contributor

@amsheehan amsheehan May 19, 2017

Choose a reason for hiding this comment

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

This demos look gorgeous. The only thing I might change is giving each example a little more space to breath. For a good minute I was looking at the reverse LPI thinking it was a very wrong implementation of buffer LPI. 😝

transform: translateX(0);
}

59.15% {
Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Contributor

@amsheehan amsheehan May 19, 2017

Choose a reason for hiding this comment

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

Just looking for clarification, not necessarily that it's wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

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

width: 100%;
height: 4px;
transform: translateZ(0);
transition: opacity 250ms linear;
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using mdc-animation here

@@ -0,0 +1,89 @@
/**
* Copyright 2016 Google Inc. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

2017

@@ -0,0 +1,68 @@
/**
* Copyright 2016 Google Inc. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

2017

@@ -0,0 +1,132 @@
// Copyright 2016 Google Inc. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

2017

@@ -0,0 +1,136 @@
/**
* Copyright 2016 Google Inc. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

2017

@@ -0,0 +1,87 @@
/**
* Copyright 2016 Google Inc. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

2017

@lynnmercier
Copy link
Contributor Author

Addressed comments. PTAL

Copy link
Contributor

@amsheehan amsheehan left a comment

Choose a reason for hiding this comment

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

two more nits and then LGTM.

getBuffer: () => this.root_.querySelector(MDCLinearProgressFoundation.strings.BUFFER_SELECTOR),
hasClass: (className) => this.root_.classList.contains(className),
removeClass: (className) => this.root_.classList.remove(className),
setTransform: (el, value) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider extending mdc-animation and extract this out to make the adapter conform more to our recommended best practices. That said, there's nothing mysterious about what this adapter method is doing, so up to you. :)

position: absolute;
width: 100%;
height: 100%;
// SVG is optimized for daya URI (https://codepen.io/tigt/post/optimizing-svgs-in-data-uris)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: misspelled 'data'


setScale(el, scaleValue) {
const value = 'scaleX(' + scaleValue + ')';
for (let i=0; i<transformStyleProperties.length; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

...forEach?

Copy link
Contributor

@amsheehan amsheehan left a comment

Choose a reason for hiding this comment

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

LGTM. Merge when CI passes 👏 👏 👏

@lynnmercier lynnmercier merged commit c47d1c2 into master May 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants