-
Notifications
You must be signed in to change notification settings - Fork 14
Provide selectable page size controls for RSDs fixes #307 #344
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c308a38
Add size pagination
manuel-delvillar 0ea3bd5
Update CSS
manuel-delvillar 4619dc2
Update page size options
manuel-delvillar 93bdc8f
Add size pagination
manuel-delvillar b06fb4c
added test for new size-pagination component
wgu-edwin 6ec368d
added test for page size in skills-list componenet
wgu-edwin 68935fe
added sizeChange test to collection-public component
wgu-edwin 0bc654b
Paginated size options is a constant
manuel-delvillar bb0b48a
Remove not provided property
manuel-delvillar d743c2e
Moving size pagination to filter controls.
manuel-delvillar dbf1cd9
No select size pagination when less than 50 RSDs
manuel-delvillar 86b0fca
Add again current size property
manuel-delvillar e2eadef
Added test that verifies that value inputed in the change value call …
wgu-edwin d537f5b
Size pagination above in collection-public
manuel-delvillar 8968d44
Rename FormModule to OsmtFormModule
manuel-delvillar 64ce73d
Using function in size pagination
manuel-delvillar 8131ea6
Add minimum threshold constant
manuel-delvillar ccecb24
Use minimum from size pagination values
manuel-delvillar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
ui/src/app/table/skills-library-table/size-pagination/size-pagination.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <div class="size-pagination-container" *ngIf="isVisible()"> | ||
| <label> | ||
| Items per page | ||
| </label> | ||
| <select name="size-pagination" #size (change)="onValueChange(+size.value)" [ngModel]="currentSize" class="m-text"> | ||
| <option [value]="value" *ngFor="let value of values"> | ||
| {{value}} | ||
| </option> | ||
| </select> | ||
| </div> |
19 changes: 19 additions & 0 deletions
19
ui/src/app/table/skills-library-table/size-pagination/size-pagination.component.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| select { | ||
| width: fit-content; | ||
| margin-left: 20px; | ||
| border-radius: 8px; | ||
| -webkit-box-sizing: border-box; | ||
| background-color: var(--color-background300); | ||
| border: 1px solid var(--color-background500); | ||
| outline: 2px solid transparent; | ||
| outline-offset: 4px; | ||
| box-sizing: border-box; | ||
| padding: 1px 8px; | ||
| -webkit-appearance: menulist; | ||
| transition: outline var(--t-transition),outline-offset var(--t-transition),border-radius var(--t-transition),border-color var(--t-transition),background-color var(--t-transition),box-shadow var(--t-transition); | ||
| } | ||
|
|
||
| .size-pagination-container { | ||
| display: flex; | ||
| margin-bottom: 20px; | ||
| } |
36 changes: 36 additions & 0 deletions
36
ui/src/app/table/skills-library-table/size-pagination/size-pagination.component.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import { ComponentFixture, TestBed } from "@angular/core/testing" | ||
|
|
||
| import { SizePaginationComponent } from "./size-pagination.component" | ||
|
|
||
| describe("SizePaginationComponent", () => { | ||
| let component: SizePaginationComponent | ||
| let fixture: ComponentFixture<SizePaginationComponent> | ||
|
|
||
| beforeEach(async () => { | ||
| await TestBed.configureTestingModule({ | ||
| declarations: [ SizePaginationComponent ] | ||
| }) | ||
| .compileComponents() | ||
| }) | ||
|
|
||
| beforeEach(() => { | ||
| fixture = TestBed.createComponent(SizePaginationComponent) | ||
| component = fixture.componentInstance | ||
| fixture.detectChanges() | ||
| }) | ||
|
|
||
| it("should create", () => { | ||
| expect(component).toBeTruthy() | ||
| }) | ||
|
|
||
| it("Should call onValueChange with a param of type number", () => { | ||
| const param = 100 | ||
| const onValueChangeSpy = spyOn(component, "onValueChange").withArgs(param).and.callThrough() | ||
|
|
||
| component.onValueChange(100); | ||
|
|
||
| expect(component.values).toContain(param) | ||
| expect(onValueChangeSpy).toHaveBeenCalled() | ||
| expect(typeof param).toEqual('number') | ||
| }) | ||
| }) |
23 changes: 23 additions & 0 deletions
23
ui/src/app/table/skills-library-table/size-pagination/size-pagination.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import {Component, Input} from "@angular/core" | ||
| import {FormControl} from "@angular/forms" | ||
|
|
||
| @Component({ | ||
| selector: "app-size-pagination", | ||
| templateUrl: "./size-pagination.component.html", | ||
| styleUrls: ["./size-pagination.component.scss"] | ||
| }) | ||
| export class SizePaginationComponent { | ||
|
|
||
| readonly values: number[] = [50, 100, 150] | ||
| @Input() | ||
| control?: FormControl | ||
| @Input() | ||
| currentSize = 50 | ||
| @Input() | ||
| isVisible: () => boolean = () => false | ||
|
|
||
| onValueChange(value: number): void { | ||
| this.control?.patchValue(value) | ||
| } | ||
|
|
||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.