-
Notifications
You must be signed in to change notification settings - Fork 1.7k
HParams: Create filter dialog component #6493
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 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
511c21b
create filter dialogue component and fix existing typing error
rileyajones 2345d8a
rename filter dialogue to filter dialog and fix license
rileyajones f83bbec
change to using non legacy mat component
rileyajones 3cfa943
rename files
rileyajones 16105dc
address pr comments
rileyajones 1e47e93
make tests more rigorous as per pr comments
rileyajones ded89cf
remove bzl file change. Test every possible filter checkbox
rileyajones 967625a
add more checks for the checkbox labels
rileyajones 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
63 changes: 63 additions & 0 deletions
63
tensorboard/webapp/widgets/data_table/filter_dialog_component.ng.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,63 @@ | ||
<!-- | ||
@license | ||
Copyright 2023 The TensorFlow Authors. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<div class="filter-dialog"> | ||
<div | ||
*ngIf="filter.type === DomainType.DISCRETE" | ||
class="discrete-filters-area" | ||
> | ||
<tb-filter-input | ||
*ngIf="filter.possibleValues" | ||
[value]="discreteValueFilter" | ||
(keyup)="discreteValueKeyUp($event)" | ||
placeholder="Filter Discrete Values (regex)" | ||
></tb-filter-input> | ||
<div *ngIf="!getPossibleValues().length" class="no-matches"> | ||
No Matching Values | ||
</div> | ||
<div | ||
*ngFor="let value of getPossibleValues(); index" | ||
(click)="$event.stopPropagation()" | ||
> | ||
<mat-checkbox | ||
[checked]="filter.filterValues.includes(value)" | ||
(change)="discreteFilterChanged.emit(value)" | ||
><span>{{ value }}</span></mat-checkbox | ||
> | ||
</div> | ||
</div> | ||
|
||
<div | ||
*ngIf="filter.type === DomainType.INTERVAL" | ||
(click)="$event.stopPropagation()" | ||
class="range-input-container" | ||
disableRipple | ||
> | ||
<tb-range-input | ||
[min]="filter.minValue" | ||
[max]="filter.maxValue" | ||
[lowerValue]="filter.filterLowerValue" | ||
[upperValue]="filter.filterUpperValue" | ||
(rangeValuesChanged)="intervalFilterChanged.emit($event)" | ||
></tb-range-input> | ||
</div> | ||
|
||
<mat-checkbox | ||
[checked]="filter.includeUndefined" | ||
(change)="includeUndefinedToggled.emit()" | ||
>Include Undefined</mat-checkbox | ||
> | ||
</div> |
44 changes: 44 additions & 0 deletions
44
tensorboard/webapp/widgets/data_table/filter_dialog_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,44 @@ | ||
/* Copyright 2023 The TensorFlow Authors. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
==============================================================================*/ | ||
@use '@angular/material' as mat; | ||
@import 'tensorboard/webapp/theme/tb_theme'; | ||
|
||
.filter-dialog { | ||
padding: 8px; | ||
border-radius: 4px; | ||
border: 1px solid; | ||
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); | ||
border-color: mat.get-color-from-palette($tb-foreground, border); | ||
background-color: mat.get-color-from-palette($tb-background, background); | ||
|
||
@include tb-dark-theme { | ||
border-color: mat.get-color-from-palette($tb-dark-foreground, border); | ||
background-color: mat.get-color-from-palette( | ||
$tb-dark-background, | ||
'background' | ||
); | ||
} | ||
|
||
.discrete-filters-area { | ||
max-height: 100px; | ||
overflow-y: auto; | ||
} | ||
|
||
.no-matches { | ||
// 12px is the width of the checkbox so the text should match the | ||
// indentation of the selectable filters. | ||
padding: 8px 12px; | ||
} | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have unrelated changes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The observer effect (aka ide autoformat) is alive and strong. Sorry I missed this.