Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
30457cf
fix: (pagination) - fix pagination according to specs
Jan 19, 2021
5a70018
fix: (pagination) - linting
DmitiryPotychkin Jan 19, 2021
ecd1e78
fix: (pagination) - button borders color/radius
Jan 19, 2021
a661fcd
Merge branch 'fix-pagination-ui' of github.com:DmitiryPotychkin/hyper…
Jan 19, 2021
9212b30
fix: (pagination) - ht-popover width equal to select width
Jan 21, 2021
1ec2fea
fix: (pagination) - remove unused enum
Jan 21, 2021
c125d7c
fix: (pagination) - increase dropdown margins
Jan 21, 2021
6d5f0e1
fix: (pagination) - change pagination button component
Jan 22, 2021
1f87366
fix: (pagination) - linting, test
DmitiryPotychkin Jan 22, 2021
fa2b7d9
Merge branch 'main' of github.com:hypertrace/hypertrace-ui into fix-p…
DmitiryPotychkin Jan 22, 2021
2b98e28
fix: (pagination) - remove unused style
DmitiryPotychkin Jan 22, 2021
7d6b7f0
Merge branch 'main' of github.com:hypertrace/hypertrace-ui into fix-p…
Jan 26, 2021
0c8621b
fix: (pagination) - refactor set min width of dropdown
DmitiryPotychkin Jan 26, 2021
2e0f243
fix: (pagination) - change buttons component
DmitiryPotychkin Jan 28, 2021
4f00afb
Merge branch 'main' of github.com:DmitiryPotychkin/hypertrace-ui into…
DmitiryPotychkin Jan 28, 2021
9c9d45c
Merge branch 'fix-pagination-ui' of github.com:DmitiryPotychkin/hyper…
Jan 28, 2021
5cd8848
fix(pagination-ui): remove unused styles
Jan 28, 2021
d4bbe32
fix(select): add style to select option, remove unused styles
DmitiryPotychkin Feb 2, 2021
72e51b1
Merge branch 'fix-pagination-ui' of github.com:DmitiryPotychkin/hyper…
DmitiryPotychkin Feb 2, 2021
0741e28
Merge main
Feb 2, 2021
a6a4ef6
Merge branch 'fix-pagination-ui' of github.com:DmitiryPotychkin/hyper…
Feb 2, 2021
48b357c
fix(select): trigger container element for ref
Feb 2, 2021
01663a6
fix(paginaion-ui): remove unused ref
Feb 2, 2021
402ce14
Merge branch 'main' of github.com:hypertrace/hypertrace-ui into fix-p…
Feb 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions projects/components/src/paginator/paginator.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
}

.page-size-select {
min-width: 86px;
margin-left: 12px;
}

Expand All @@ -28,16 +27,22 @@
.previous-button {
::ng-deep {
.button {
border-radius: 4px 0 0 4px;
width: 32px;

border-radius: 6px 0 0 6px;
border-color: $gray-2;
}
}
}

.next-button {
::ng-deep {
.button {
border-radius: 0 4px 4px 0;
width: 32px;
margin-left: -1px;

border-radius: 0 6px 6px 0;
border-color: $gray-2;
}
}
}
Expand Down
12 changes: 5 additions & 7 deletions projects/components/src/paginator/paginator.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { IconType } from '@hypertrace/assets-library';
import { TypedSimpleChanges } from '@hypertrace/common';
import { Observable } from 'rxjs';
import { ButtonStyle } from '../button/button';
import { ButtonSize, ButtonStyle } from '../button/button';
import { PageEvent } from './page.event';
import { PaginationProvider } from './paginator-api';

Expand All @@ -25,14 +25,13 @@ import { PaginationProvider } from './paginator-api';
label="{{ this.firstItemNumberForPage() }}-{{ this.lastItemNumberForPage() }} of {{ this.totalItems }}"
>
</ht-label>

<div class="pagination-buttons">
<!-- TODO: Change ToggleButtonComponent to be more generic ButtonGroupComponent to accommodate this use case -->
<ht-button
class="button previous-button"
htTooltip="Go to previous page"
display="${ButtonStyle.Bordered}"
icon="${IconType.Previous}"
size="${ButtonSize.Small}"
icon="${IconType.ArrowLeft}"
[disabled]="!this.hasPrevPage()"
(click)="this.gotoPreviousPage()"
>
Expand All @@ -41,15 +40,14 @@ import { PaginationProvider } from './paginator-api';
class="button next-button"
htTooltip="Go to next page"
display="${ButtonStyle.Bordered}"
icon="${IconType.Next}"
size="${ButtonSize.Small}"
icon="${IconType.ArrowRight}"
[disabled]="!this.hasNextPage()"
(click)="this.gotoNextPage()"
>
</ht-button>
</div>

<ht-label class="label" label="Rows per Page:"></ht-label>

<div class="page-size-select" *ngIf="this.pageSizeOptions.length">
<ht-select [selected]="this.pageSize" (selectedChange)="this.onPageSizeChange($event)" showBorder="true">
<ht-select-option *ngFor="let pageSize of this.pageSizeOptions" [value]="pageSize" [label]="pageSize">
Expand Down
3 changes: 2 additions & 1 deletion projects/components/src/paginator/paginator.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import { NgModule } from '@angular/core';
import { ButtonModule } from '../button/button.module';
import { LabelModule } from '../label/label.module';
import { SelectModule } from '../select/select.module';
import { ToggleButtonModule } from '../toggle-button-group/toggle-button.module';
import { TooltipModule } from '../tooltip/tooltip.module';
import { PaginatorComponent } from './paginator.component';

@NgModule({
declarations: [PaginatorComponent],
imports: [CommonModule, SelectModule, LabelModule, ButtonModule, TooltipModule],
imports: [CommonModule, SelectModule, LabelModule, ToggleButtonModule, ButtonModule, TooltipModule],
exports: [PaginatorComponent]
})
export class PaginatorModule {}
1 change: 0 additions & 1 deletion projects/components/src/select/select.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@

.select-content {
@include dropdown();
min-width: 120px;
max-height: 204px;

.select-option {
Expand Down
4 changes: 2 additions & 2 deletions projects/components/src/select/select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ import { SelectSize } from './select-size';
>
<ht-popover [disabled]="this.disabled" [closeOnClick]="true" class="select-container">
<ht-popover-trigger>
<div class="trigger-content" [ngClass]="this.justifyClass">
<div class="trigger-content" [ngClass]="this.justifyClass" #triggerContainer>
<ht-icon *ngIf="this.icon" class="trigger-prefix-icon" [icon]="this.icon" size="${IconSize.Small}">
</ht-icon>
<ht-label class="trigger-label" [label]="selected?.label || this.placeholder"> </ht-label>
<ht-icon class="trigger-icon" icon="${IconType.ChevronDown}" size="${IconSize.ExtraSmall}"> </ht-icon>
</div>
</ht-popover-trigger>
<ht-popover-content>
<div class="select-content">
<div class="select-content" [ngStyle]="{ 'minWidth.px': triggerContainer.offsetWidth }">
<div
*ngFor="let item of items"
(click)="this.onSelectionChange(item)"
Expand Down