-
Notifications
You must be signed in to change notification settings - Fork 1
Fixing design for user settings tabs #2
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
Open
wratho
wants to merge
9
commits into
main
Choose a base branch
from
fixing-design
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0e6921f
fixing design
wratho d19bec3
remove custom card component. move exit and relaunch to fixed setting…
wratho f3648e1
fix commands design and cleanup global style overrides
wratho d2ea2bb
fix bookmarks design
wratho f224541
fix help design
wratho 8468821
remove bootstrap
wratho 1b3ed41
resolve all scss console warnings. resolve commonJS console warning
wratho 08c26ad
reinstall bootstrap and re-add card component to make porting stuff e…
wratho ad27e6e
adjust the styles of the evaluate tab in user settings
wratho 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
63 changes: 26 additions & 37 deletions
63
src/app/feature/bookmark/component/bookmark-settings/bookmark-settings.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 |
|---|---|---|
| @@ -1,38 +1,27 @@ | ||
| <div class="row"> | ||
| <div class="col-md-6" *ngFor="let bookmark of settings.bookmarks; let index = index"> | ||
| <mat-card class="card"> | ||
| <button class="remove" mat-icon-button (click)="onRemoveClick(index)"> | ||
| <mat-icon>close</mat-icon> | ||
| </button> | ||
| <div class="row align-items-center"> | ||
| <div class="col-8"> | ||
| <mat-form-field> | ||
| <mat-label>{{ 'bookmark.url' | translate }}</mat-label> | ||
| <input matInput [(ngModel)]="bookmark.url" /> | ||
| </mat-form-field> | ||
| </div> | ||
| <div class="col-4 text-center"> | ||
| <mat-slide-toggle [checked]="bookmark.external" | ||
| (change)="bookmark.external = $event.checked"> | ||
| {{ 'bookmark.external' | translate }} | ||
| </mat-slide-toggle> | ||
| </div> | ||
| </div> | ||
| <div class="row"> | ||
| <div class="col"> | ||
| <app-accelerator [label]="'app.shortcut' | translate" [(value)]="bookmark.shortcut"> | ||
| </app-accelerator> | ||
| </div> | ||
| </div> | ||
| </mat-card> | ||
| </div> | ||
| <div class="col-md-6"> | ||
| <button mat-raised-button (click)="onAddClick()" class="card-button"> | ||
| {{ 'bookmark.add' | translate }} | ||
| </button> | ||
| <button mat-raised-button (click)="onAddFileClick()" class="card-button"> | ||
| {{ 'bookmark.add-file' | translate }} | ||
| </button> | ||
| <input style="display: none;" #ghostInput type="file" (change)="onFileSelected($event)" /> | ||
| </div> | ||
| <mat-card *ngFor="let bookmark of settings.bookmarks; let index = index"> | ||
| <mat-card-content> | ||
| <div class="url-toggle"> | ||
| <mat-form-field> | ||
| <mat-label>{{ 'bookmark.url' | translate }}</mat-label> | ||
| <input matInput [(ngModel)]="bookmark.url" /> | ||
| </mat-form-field> | ||
| <mat-slide-toggle [checked]="bookmark.external" (change)="bookmark.external = $event.checked"> | ||
| {{ 'bookmark.external' | translate }} | ||
| </mat-slide-toggle> | ||
| </div> | ||
| <app-accelerator [label]="'app.shortcut' | translate" [(value)]="bookmark.shortcut"> | ||
| </app-accelerator> | ||
| </mat-card-content> | ||
| <mat-card-actions> | ||
| <button mat-button (click)="onRemoveClick(index)">Remove</button> | ||
| </mat-card-actions> | ||
| </mat-card> | ||
| <div class="bookmark-actions"> | ||
| <button mat-raised-button (click)="onAddClick()"> | ||
| {{ 'bookmark.add' | translate }} | ||
| </button> | ||
| <button mat-raised-button (click)="ghostInput.click()"> | ||
| {{ 'bookmark.add-file' | translate }} | ||
| </button> | ||
| <input hidden #ghostInput type="file" (change)="onFileSelected($event)" /> | ||
| </div> |
28 changes: 13 additions & 15 deletions
28
src/app/feature/bookmark/component/bookmark-settings/bookmark-settings.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 |
|---|---|---|
| @@ -1,19 +1,17 @@ | ||
| .card { | ||
| position: relative; | ||
|
|
||
| .remove { | ||
| position: absolute; | ||
| top: 0; | ||
| right: 0; | ||
| z-index: 1; | ||
| } | ||
| :host { | ||
| display: grid; | ||
| grid-template-columns: repeat(2, 1fr); | ||
| gap: 12px; | ||
| } | ||
|
|
||
| .card-button { | ||
| padding: 16px; | ||
| width: 100%; | ||
| .url-toggle { | ||
| display: flex; | ||
| gap: 32px; | ||
| align-items: center; | ||
| } | ||
|
|
||
| + .card-button { | ||
| margin-top: 8px; | ||
| } | ||
| .bookmark-actions { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 8px; | ||
| } |
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
43 changes: 18 additions & 25 deletions
43
src/app/feature/command/component/command-settings/command-settings.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 |
|---|---|---|
| @@ -1,26 +1,19 @@ | ||
| <div class="row"> | ||
| <div class="col-md-6 col-lg-4" *ngFor="let command of settings.commands; let index = index"> | ||
| <mat-card class="card"> | ||
| <button class="remove" mat-icon-button (click)="onRemoveClick(index)"> | ||
| <mat-icon>close</mat-icon> | ||
| </button> | ||
| <div class="row"> | ||
| <div class="col-12"> | ||
| <mat-form-field matTooltip="{{ 'command.text-description' | translate }}" matTooltipClass="mat-tooltip width-500"> | ||
| <mat-label>{{ 'command.text' | translate }}</mat-label> | ||
| <input matInput [(ngModel)]="command.text" /> | ||
| </mat-form-field> | ||
| </div> | ||
| <div class="col-12"> | ||
| <app-accelerator [label]="'app.shortcut' | translate" [(value)]="command.shortcut"> | ||
| </app-accelerator> | ||
| </div> | ||
| </div> | ||
| </mat-card> | ||
| </div> | ||
| <div class="col-md-6 col-lg-4"> | ||
| <button mat-raised-button (click)="onAddCommandClick()" class="card-button"> | ||
| {{ 'command.add' | translate }} | ||
| <mat-card *ngFor="let command of settings.commands; let index = index"> | ||
| <mat-card-content> | ||
| <mat-form-field matTooltip="{{ 'command.text-description' | translate }}" | ||
| matTooltipClass="width-450"> | ||
| <mat-label>{{ 'command.text' | translate }}</mat-label> | ||
| <input matInput [(ngModel)]="command.text" /> | ||
| </mat-form-field> | ||
| <app-accelerator [label]="'app.shortcut' | translate" [(value)]="command.shortcut"> | ||
| </app-accelerator> | ||
| </mat-card-content> | ||
| <mat-card-actions> | ||
| <button mat-button (click)="onRemoveClick(index)"> | ||
| Remove | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </mat-card-actions> | ||
| </mat-card> | ||
| <button mat-raised-button (click)="onAddCommandClick()"> | ||
| {{ 'command.add' | translate }} | ||
| </button> |
24 changes: 12 additions & 12 deletions
24
src/app/feature/command/component/command-settings/command-settings.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 |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| .card { | ||
| position: relative; | ||
|
|
||
| .remove { | ||
| position: absolute; | ||
| top: 0; | ||
| right: 0; | ||
| z-index: 1; | ||
| } | ||
| :host { | ||
| display: grid; | ||
| grid-template-columns: repeat(3, 1fr); | ||
| gap: 12px; | ||
| } | ||
|
|
||
| .card-button { | ||
| padding: 16px; | ||
| width: 100%; | ||
| ::ng-deep { | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i don't like this but i didn't think of a better solution at the time. i will do a pass on a lot of nit picky stuff when we get near the end of 1.0 |
||
| .mat-mdc-tooltip { | ||
| white-space: pre-line; | ||
|
|
||
| &.width-450 .mat-mdc-tooltip-surface { | ||
| max-width: 450px; | ||
| } | ||
| } | ||
| } | ||
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.
this prevents the commonJS warning in the console. it doesn't "solve" anything