Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(timepicker): Add ability to set readonly/disabled state #3602 #3611

Merged

Conversation

IraErshova
Copy link
Contributor

@IraErshova IraErshova commented Feb 1, 2018

Add ability to set readonly/disabled state
Add disable state demo
Fix bug related to highlight input in readonly state

Close #3602 #3371

  • read and followed the CONTRIBUTING.md guide.
  • built and tested the changes locally.
  • added/updated tests.
  • added/updated API documentation.
  • added/updated demos.

@IraErshova IraErshova force-pushed the feat-timepicker-disabled-state branch from 3e5fc5a to 61f76d7 Compare February 1, 2018 09:52
@codecov
Copy link

codecov bot commented Feb 1, 2018

Codecov Report

Merging #3611 into development will increase coverage by 0.16%.
The diff coverage is 89.47%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #3611      +/-   ##
===============================================
+ Coverage        72.05%   72.21%   +0.16%     
===============================================
  Files              252      252              
  Lines             8159     8225      +66     
  Branches          1552     1566      +14     
===============================================
+ Hits              5879     5940      +61     
- Misses            1858     1863       +5     
  Partials           422      422
Impacted Files Coverage Δ
src/timepicker/timepicker.utils.ts 97.97% <100%> (+1.68%) ⬆️
src/timepicker/timepicker.config.ts 100% <100%> (ø) ⬆️
src/timepicker/timepicker-controls.util.ts 100% <100%> (+4.05%) ⬆️
src/timepicker/reducer/timepicker.reducer.ts 76.74% <12.5%> (-12.45%) ⬇️
src/timepicker/timepicker.component.ts 93.15% <97.5%> (+1.25%) ⬆️
src/chronos/i18n/pl.ts 75% <0%> (-2.78%) ⬇️
src/chronos/i18n/uk.ts 78.04% <0%> (-2.44%) ⬇️

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 465ed0d...cb50a42. Read the comment docs.

@IraErshova IraErshova force-pushed the feat-timepicker-disabled-state branch from 61f76d7 to 1459aea Compare February 1, 2018 10:20
IlyaSurmay
IlyaSurmay previously approved these changes Feb 1, 2018
@YevheniiaMazur
Copy link

Tested, looks good

import { TimeChangeEvent, TimepickerComponentState, TimepickerControls } from '../../timepicker/timepicker.models';
import * as timepickerControlsUtil from '../../timepicker/timepicker-controls.util';

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.


function testTime(hours?: number, minutes?: number, seconds?: number) {
import { Time, TimepickerComponentState } from '../../timepicker/timepicker.models';
import * as timepickerUtils from '../../timepicker/timepicker.utils';

This comment was marked as off-topic.

This comment was marked as off-topic.

@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Action } from '../../mini-ngrx/index';
import { Action } from '../../mini-ngrx';

This comment was marked as off-topic.

@@ -1,4 +1,4 @@
import { Action } from '../../mini-ngrx/index';

This comment was marked as off-topic.

import { Action } from '../../mini-ngrx/index';
import { MiniStore } from '../../mini-ngrx/store.class';
import { MiniState } from '../../mini-ngrx/state.class';
import { Action, MiniStore, MiniState } from '../../mini-ngrx';

This comment was marked as off-topic.

<!-- increment hours button-->
<td>
<a class="btn btn-link" [class.disabled]="!canIncrementHours"
<a class="btn btn-link" [class.disabled]="!canIncrementHours || !isActive()"

This comment was marked as off-topic.


// ui variables
hours: string;
minutes: string;
seconds: string;
meridian: string;

get isSpinnersVisible(): boolean {

This comment was marked as off-topic.

this.invalidSeconds = false;
}

isActive() {

This comment was marked as off-topic.

@valorkin
Copy link
Member

valorkin commented Feb 6, 2018

@IlyaSurmay please check my comments
@IraErshova don't forget to rebase you changes

@IraErshova IraErshova force-pushed the feat-timepicker-disabled-state branch 2 times, most recently from 5bd0fad to d7ad6cd Compare February 7, 2018 13:25
Add validation for timepicker based on ui-bootstrap validation.
Fix min-max validation issue.

close valor-software#3549 valor-software#3288
@IraErshova IraErshova force-pushed the feat-timepicker-disabled-state branch from d7ad6cd to 22db077 Compare February 8, 2018 13:30
…ftware#3602

Add ability to set readonly/disabled state
Add disabled demo
Fix bud related to highlight input in readonly mood
Extend test for timepicker

Close valor-software#3602 valor-software#3371
@valorkin valorkin merged commit 4e5f828 into valor-software:development Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants