Skip to content

Commit

Permalink
Goponents release v1.16.1 (#933)
Browse files Browse the repository at this point in the history
* Update go-button.component.scss

Changes for split button option text not to wrap and grow towards left.

* GOP-877-BUG-minimum_height_for_textarea

Fixed GOP-876 uniform card margins, GOP-877 set minimum_height_for_textarea and GOP-847 file uploading component bug fix.

* Changes_bugfix_chore_task

* alignment corrected for icon button

css changes for button padding

* codeclimate issue fix

* Codeclimate fix

* remove extra padding

* Initial components and module interaction

* Accordion_style changes

Accordion styles
Default
Slim
Dark

* Changed dark theme

* Changes [CHORE] 868 max height for toast

Max height for the toast notification will not have an overflow unless specified.

* Changes [CHORE] 767 action sheet design changes #767

1. Handled appearance of scrollbar on accordion's expansion by adjusting the height.
2. Font style changes for the shell area.
3. Fixed the colour issue for the danger action sheet.

* Update _forms.scss

* Changes [CHORE] 767 action sheet design changes #891

Code review suggestion changes

* Determinate and indeterminate progress bar

* style update

* Changes [CHORE] 868 max height for toast #890

1. Code review suggested changes.
2. Change in the code's header part in the documentation.

* UT

* safari styling fix

* Fixing code climate issues

* Changes [CHORE] 868 max height for toast #890

Code review suggested changes.

* Changes [CHORE] 767 action sheet design changes #891

Code review suggestion changes

* comment line message

* clear code climate issues

* code climate fix

* dark theme color changes done

* issue fixed

* removed white spaces

* BUGFIX_TIME_PICKER_ALIGNMENT-CHORE_BACKGROUND_COLOR_CHANGE

* ALIGNMENT AND NAMING CHANGES

* Fix for duplicate modal and offcanvas content

* ALIGNMENT_CHANGES

* removing whitespace

* Re-run Checks

* Re-run Checks

* Increasing test coverage

* Update github src

* GOP-807 empty checkin to trigger build

* Fix select all filtered list (#914)

* bug fixes for select all filtered list

* single item, add remove handled

* handling controls initial value incase of typeahead provided

* changes in handling controls initial value

* small condition fix

* test cases updated and condition change in init control value

* formatting changes

* formatting changes

* edge case handled while removing selected item

* formatting changes

* adding count to select all

* adding count to select all

* linting errors fixed

* typo fixed

* refactored code for better understanding

* refactoring

* lint fix

* indentation changes, private methods and variables grouped, minor ux changes

* renaming methods

* karma config thresold changes

---------

Co-authored-by: Vishal Shah <[email protected]>

* v1.16.0 (#915)

* Incrementing minor version

Changes were made to upgrade "select all filter list"

* Fixing patch version to be 0

Forgot to do this before...

* #918 enhancement of go-date-picker

* #918 - enhance go-date-picker

* Added inout property to control the visibility of go-form-error.
Implemented in all controls with go-form-error.

* updated the documentation.

* Rearranged the property

* Used single quote instead of double quotes.

* Added few more tests

* #918 -  Added test cases

* Added app-drawer stylings

* Fixed code climate lint errors.

* Fixed code climate lint errors.

* Fixed code climate lint errors.

* Fixed code climate lint errors.

* Update CSS for Drodown and add test cases

* add few test cases based on background color

* Add some more test cases for disable color

* Resolve build issue and update test cases

* Resolve code coverage issue and add few more test cases

* Update test cases for enable and disable color for dropdown

* Updating version number to reflect recent changes

---------

Co-authored-by: sudheepdivakargithub <[email protected]>
Co-authored-by: adhiyan-tangoe <[email protected]>
Co-authored-by: Saravanan Muralidharan <[email protected]>
Co-authored-by: Pooja-kj <[email protected]>
Co-authored-by: Vijeta7 <[email protected]>
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: RonMichaud <[email protected]>
Co-authored-by: Vishal Shah <[email protected]>
Co-authored-by: Sinchana <[email protected]>
Co-authored-by: CORP\Sudheep.Divakar <[email protected]>
Co-authored-by: Amit Patra <[email protected]>
Co-authored-by: ankit-tangoe <[email protected]>
  • Loading branch information
13 people authored Jan 5, 2024
1 parent 669fcf9 commit 121e121
Show file tree
Hide file tree
Showing 26 changed files with 984 additions and 548 deletions.
2 changes: 1 addition & 1 deletion projects/go-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tangoe/goponents",
"version": "1.16.0",
"version": "1.16.1",
"repository": {
"type": "git",
"url": "git+https://github.com/mobi/goponents.git"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@
<legend
class="go-form__legend"
[ngClass]="{ 'go-form__legend--dark': theme === 'dark' }"
>{{ legend }}</legend>
>
{{ legend }}
</legend>

<ng-content></ng-content>

<go-hint *ngFor="let hint of hints" [message]="hint" [theme]="theme"></go-hint>

<go-form-errors [control]="control" [theme]="theme"></go-form-errors>
<go-hint
*ngFor="let hint of hints"
[message]="hint"
[theme]="theme"
></go-hint>
<div *ngIf="!hideFieldError">
<go-form-errors [control]="control" [theme]="theme"></go-form-errors>
</div>
</fieldset>
Original file line number Diff line number Diff line change
@@ -1,51 +1,68 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { async, ComponentFixture, TestBed } from "@angular/core/testing";
import {
FormControl,
FormGroup,
FormsModule,
ReactiveFormsModule,
} from "@angular/forms";

import { GoCheckboxGroupComponent } from './go-checkbox-group.component';
import { GoHintModule } from '../go-hint/go-hint.module';
import { GoCheckboxComponent } from './go-checkbox.component';
import { Component } from '@angular/core';
import { GoRequiredTextModule } from '../go-required-text/go-required-text.module';
import { GoFormErrorsModule } from '../go-form-errors/go-form-errors.module';
import { GoCheckboxGroupComponent } from "./go-checkbox-group.component";
import { GoHintModule } from "../go-hint/go-hint.module";
import { GoCheckboxComponent } from "./go-checkbox.component";
import { Component } from "@angular/core";
import { GoRequiredTextModule } from "../go-required-text/go-required-text.module";
import { GoFormErrorsModule } from "../go-form-errors/go-form-errors.module";
import { By } from "@angular/platform-browser";

@Component({
selector: 'go-test',
selector: "go-test",
template: `
<go-checkbox-group label="Options" [control]="checkboxForm">
<div>
<go-checkbox label="Option 1" [control]="checkboxForm.controls.option1"></go-checkbox>
<go-checkbox
label="Option 1"
[control]="checkboxForm.controls.option1"
[hideFieldError]="true"
></go-checkbox>
</div>
<div>
<go-checkbox label="Option 2" [control]="checkboxForm.controls.option2"></go-checkbox>
<go-checkbox
label="Option 2"
[control]="checkboxForm.controls.option2"
[hideFieldError]="true"
></go-checkbox>
</div>
</go-checkbox-group>
`
`,
})
class GoTestCheckboxGroupComponent {
checkboxForm: FormGroup = new FormGroup({
option1: new FormControl(''),
option2: new FormControl('')
option1: new FormControl(""),
option2: new FormControl(""),
});
}

describe('GoCheckboxGroupComponent', () => {
describe("GoCheckboxGroupComponent", () => {
let checkboxOne: GoCheckboxComponent;
let checkboxTwo: GoCheckboxComponent;
let component: GoCheckboxGroupComponent;
let fixture: ComponentFixture<GoTestCheckboxGroupComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [GoCheckboxGroupComponent, GoCheckboxComponent, GoTestCheckboxGroupComponent],
declarations: [
GoCheckboxGroupComponent,
GoCheckboxComponent,
GoTestCheckboxGroupComponent,
],
imports: [
GoFormErrorsModule,
GoHintModule,
GoRequiredTextModule,
FormsModule,
ReactiveFormsModule
]
})
.compileComponents();
ReactiveFormsModule,
],
}).compileComponents();
}));

beforeEach(() => {
Expand All @@ -59,22 +76,42 @@ describe('GoCheckboxGroupComponent', () => {
checkboxTwo = checkboxArray[1];
});

it('should create', () => {
it("should create", () => {
expect(component).toBeTruthy();
});

describe('ngAfterContentInit', () => {
describe("ngAfterContentInit", () => {
beforeEach(() => {
checkboxOne.theme = null;
checkboxTwo.theme = null;
});

it('should set a theme on each child component', () => {
component.theme = 'dark';
it("should set a theme on each child component", () => {
component.theme = "dark";
component.ngAfterContentInit();

expect(checkboxOne.theme).toBe('dark');
expect(checkboxTwo.theme).toBe('dark');
expect(checkboxOne.theme).toBe("dark");
expect(checkboxTwo.theme).toBe("dark");
});
});
it("component should not render go-form-errors if hideFieldError property is true ", () => {
component.hideFieldError = true;
fixture.detectChanges();
expect(
fixture.debugElement.queryAll(By.css("go-form-errors"))?.length
).toBe(0);
});
it("component should render go-form-errors if hideFieldError property is false ", () => {
component.hideFieldError = false;
fixture.detectChanges();
expect(
fixture.debugElement.queryAll(By.css("go-form-errors"))?.length
).toBe(1);
});
it("component should render go-form-errors if hideFieldError is not set ", () => {
fixture.detectChanges();
expect(
fixture.debugElement.queryAll(By.css("go-form-errors"))?.length
).toBe(1);
});
});
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
<div>
<label [for]="_id"
class="go-form__label go-form__label--inline go-form__label--checkbox-container"
[ngClass]="{'go-form__label--dark': theme === 'dark'}">
<label
[for]="_id"
class="go-form__label go-form__label--inline go-form__label--checkbox-container"
[ngClass]="{ 'go-form__label--dark': theme === 'dark' }"
>
{{ label }}
<go-required-text [control]="control"></go-required-text>
<input [id]="_id"
class="go-form__checkbox go-form__checkbox--hidden"
[ngClass]="inputClasses"
type="checkbox"
[formControl]="control"
#hiddenInputRef>
<input
[id]="_id"
class="go-form__checkbox go-form__checkbox--hidden"
[ngClass]="inputClasses"
type="checkbox"
[formControl]="control"
#hiddenInputRef
/>
<span class="go-form__custom-checkbox"></span>
</label>

<go-hint *ngFor="let hint of hints" [message]="hint" [theme]="theme"></go-hint>

<go-form-errors [control]="control"></go-form-errors>
<go-hint
*ngFor="let hint of hints"
[message]="hint"
[theme]="theme"
></go-hint>
<div *ngIf="!hideFieldError">
<go-form-errors [control]="control"></go-form-errors>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { GoFormErrorsModule } from '../go-form-errors/go-form-errors.module';
import { GoHintModule } from '../go-hint/go-hint.module';
import { GoRequiredTextModule } from '../go-required-text/go-required-text.module';
import { GoCheckboxComponent } from './go-checkbox.component';

describe('GoCheckboxComponent', () => {
import { async, ComponentFixture, TestBed } from "@angular/core/testing";
import { FormControl, FormsModule, ReactiveFormsModule } from "@angular/forms";
import { GoFormErrorsModule } from "../go-form-errors/go-form-errors.module";
import { GoHintModule } from "../go-hint/go-hint.module";
import { GoRequiredTextModule } from "../go-required-text/go-required-text.module";
import { GoCheckboxComponent } from "./go-checkbox.component";
import { By } from "@angular/platform-browser";

describe("GoCheckboxComponent", () => {
let component: GoCheckboxComponent;
let fixture: ComponentFixture<GoCheckboxComponent>;

Expand All @@ -17,10 +18,9 @@ describe('GoCheckboxComponent', () => {
ReactiveFormsModule,
GoFormErrorsModule,
GoHintModule,
GoRequiredTextModule
]
})
.compileComponents();
GoRequiredTextModule,
],
}).compileComponents();
}));

beforeEach(() => {
Expand All @@ -30,12 +30,12 @@ describe('GoCheckboxComponent', () => {
fixture.detectChanges();
});

it('should create', () => {
it("should create", () => {
expect(component).toBeTruthy();
});

describe('ngAfterViewInit', () => {
it('sets the hidden input to indeterminate if indeterminate input is true', () => {
describe("ngAfterViewInit", () => {
it("sets the hidden input to indeterminate if indeterminate input is true", () => {
expect(component.hiddenInputRef.nativeElement.indeterminate).toBe(false);

component.indeterminate = true;
Expand All @@ -45,4 +45,24 @@ describe('GoCheckboxComponent', () => {
expect(component.hiddenInputRef.nativeElement.indeterminate).toBe(true);
});
});
it("component should not render go-form-errors if hideFieldError property is true ", () => {
component.hideFieldError = true;
fixture.detectChanges();
expect(
fixture.debugElement.queryAll(By.css("go-form-errors"))?.length
).toBe(0);
});
it("component should render go-form-errors if hideFieldError property is false ", () => {
component.hideFieldError = false;
fixture.detectChanges();
expect(
fixture.debugElement.queryAll(By.css("go-form-errors"))?.length
).toBe(1);
});
it("component should render go-form-errors if hideFieldError is not set ", () => {
fixture.detectChanges();
expect(
fixture.debugElement.queryAll(By.css("go-form-errors"))?.length
).toBe(1);
});
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<label
<label
[attr.for]="_id"
class="go-form__label"
[ngClass]="{'go-form__label--dark': theme == 'dark'}">
[ngClass]="{ 'go-form__label--dark': theme == 'dark' }"
>
{{ label }}
<go-required-text [control]="control"></go-required-text>
</label>
Expand All @@ -17,6 +18,8 @@
[(ngModel)]="selectedDate"
(blur)="validateDate()"
[disabled]="control.disabled"
(input)="onInputCloseCalendar()"
(click)="toggleDatepicker($event)"
/>
<go-icon-button
class="go-datepicker__toggle"
Expand All @@ -39,5 +42,6 @@
</div>

<go-hint *ngFor="let hint of hints" [message]="hint" [theme]="theme"></go-hint>

<go-form-errors [control]="control" [theme]="theme"></go-form-errors>
<div *ngIf="!hideFieldError">
<go-form-errors [control]="control" [theme]="theme"></go-form-errors>
</div>
Loading

0 comments on commit 121e121

Please sign in to comment.