Skip to content

Commit

Permalink
Merge pull request #911 from gisaia/fix/search
Browse files Browse the repository at this point in the history
fix: improve dialog layout
  • Loading branch information
QuCMGisaia authored Feb 17, 2025
2 parents f19e56f + 191b9bb commit 51b3f11
Show file tree
Hide file tree
Showing 24 changed files with 98 additions and 63 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"arlas-permissions-api": "27.0.0",
"arlas-persistence-api": "27.0.0",
"arlas-tagger-api": "27.0.0",
"arlas-web-components": "~27.0.1",
"arlas-web-components": "~27.0.2",
"arlas-web-contributors": "~27.0.0",
"arlas-map": "~27.0.1",
"arlas-map": "~27.0.2",
"cli-color": "^1.2.0",
"core-js": "~3.26.1",
"fetch-intercept": "^2.3.1",
Expand Down
4 changes: 2 additions & 2 deletions projects/arlas-toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"arlas-permissions-api": "27.0.0",
"arlas-persistence-api": "27.0.0",
"arlas-tagger-api": "27.0.0",
"arlas-web-components": "~27.0.1",
"arlas-web-components": "~27.0.2",
"arlas-web-contributors": "~27.0.0",
"arlas-map": "~27.0.1",
"arlas-map": "~27.0.2",
"cli-color": "^1.2.0",
"fetch-intercept": "^2.3.1",
"hopscotch": "0.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,7 @@ $default-spacing: 10px;
::ng-deep .mdc-dialog__title::before {
display: none !important;
}

::ng-deep.arlas-aias-dialog .mdc-dialog__surface {
padding: 12px 24px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class BookmarkMenuComponent implements OnInit, OnDestroy {

public openDialogAdd() {
if (!this.addBookmarkDisabled) {
this.dialog.open(BookmarkAddDialogComponent, { data: { name: null } });
this.dialog.open(BookmarkAddDialogComponent, { data: { name: null }, id: 'add-bookmark-dialog' });
}
}

Expand All @@ -104,7 +104,4 @@ export class BookmarkMenuComponent implements OnInit, OnDestroy {
this._onDestroy$.next(true);
this._onDestroy$.complete();
}



}
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,21 @@
* under the License.
*/

// TODO: To override globally
::ng-deep.mdc-dialog__surface {
padding: 24px;
::ng-deep #add-bookmark-dialog .mat-mdc-dialog-surface {
padding: 12px 24px;
}

.bookmark__add {
padding: 0;

&--title {
margin: 0 0 20px;
padding: 0;

.mdc-dialog__title::before {
--mdc-dialog-subhead-weight: 700;
--mdc-dialog-subhead-tracking: 0;
--mdc-dialog-subhead-size: 20px;

.mat-mdc-dialog-title::before {
height: 0;
display: block;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@
* under the License.
*/

::ng-deep.bookmark-manager .mdc-dialog__surface {
padding: 12px 24px;
}

.bookmark-table-items {
max-height: 60vh;
overflow-y: auto;
padding-top: 24px;
min-width: unset;

.mat-column-checked {
flex: 0 0 50px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class BookmarkComponent {
}

public combine() {
const dialogRef = this.dialog.open(BookmarkAddDialogComponent, { data: { name: null } });
const dialogRef = this.dialog.open(BookmarkAddDialogComponent, { data: { name: null }, id: 'add-bookmark-dialog' });
dialogRef.afterClosed().subscribe(bookmarkName => {
if (bookmarkName) {
this.bookmarkService.createCombineBookmark(bookmarkName, new Set(this.itemsCheck));
Expand All @@ -156,7 +156,7 @@ export class BookmarkComponent {
}

public updateBookMarkName(id, name){
const dialogRef = this.dialog.open(BookmarkAddDialogComponent, { data: { name: name } });
const dialogRef = this.dialog.open(BookmarkAddDialogComponent, { data: { name: name }, id: 'add-bookmark-dialog' });
dialogRef.afterClosed().subscribe(bookmarkName => {
if (bookmarkName) {
this.bookmarkService.updateBookmarkName(bookmarkName, id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ $default-font-size: 16px;
$success-color: #18853c;
$error-color: #ce3d38;

::ng-deep.arlas-error-dialog .mdc-dialog__surface {
padding: 12px 24px;
}

.title {
font-size: $default-font-size;
font-weight: bold;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ $default-font-size: 16px;
$success-color: #18853c;
$error-color: #ce3d38;

::ng-deep.arlas-permission-dialog .mdc-dialog__surface {
padding: 0 15px;
}

.title {
font-size: $default-font-size;
font-weight: bold;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ $border-color: #a1a1a1;
padding: 0 $sm-margin !important;
height: $permission-button-height;
border-color: $border-color !important;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ export class PermissionsCreatorComponent implements OnInit, OnDestroy {
// - open a dialog for description
this.createPermissionDialog.open(PermissionsCreatorDialogComponent, {
data: permissionData,
disableClose: true
disableClose: true,
panelClass: 'arlas-permission-dialog'
});
} else {
this.show = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/

::ng-deep.reconnect-dialog-panel.mdc-dialog__surface {
padding: 12px 24px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@
* under the License.
*/

$search-height: 30px;
$search-width: 400px;

@mixin search-text {
font-size: 14px;
padding: 6px 4px;
}

.flex-span {
display: flex
display: flex;
align-items: center;

::ng-deep.mat-mdc-icon-button.mat-mdc-button-base {
padding: 0;
--mdc-icon-button-state-layer-size: 24px;
}
}

.scale-down {
Expand All @@ -40,30 +43,20 @@ $search-width: 400px;
}

.search-dialog {
// Search width + padding width
width: calc($search-width + 8px);
--arlas-search-width: 400px;
--arlas-search-height: 30px;

display: flex;
flex-direction: column;
padding: 0 4px;
padding: 4px;

.arlas-search-container {
::ng-deep .mat-icon-button {
width: 24px;
height: 24px;
line-height: 22px;
}

.mat-icon-button ::ng-deep .mat-button-focus-overlay {
display: none;
}

min-width: 150px;
display: flex;
align-items: center;
border: 2px solid #0969da;
border-radius: 4px;
height: $search-height;
width: $search-width;
height: var(--arlas-search-height);
width: var(--arlas-search-width);

.search {
margin: 2px 4px 0;
Expand Down Expand Up @@ -96,6 +89,7 @@ $search-width: 400px;
.autocomplete {
margin: 4px 2px;
padding: 0;
width: var(--arlas-search-width);

li:last {
padding-bottom: 0;
Expand Down Expand Up @@ -127,12 +121,7 @@ $search-width: 400px;
}
}

::ng-deep #arlas-search-dialog .mat-mdc-dialog-content {
padding: 0;
margin: -8px -16px;
}

::ng-deep.mat-mdc-dialog-container {
::ng-deep #arlas-search-dialog .mat-mdc-dialog-container {
border: 1px solid #a1a1a1;
border-radius: 8px !important;
box-shadow: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ export class SearchComponent implements OnInit, OnDestroy, OnChanges {
}

public ngOnDestroy(): void {
this.retrieveSearchValueSubs.forEach(r => r.unsubscribe());
if (this.retrieveSearchValueSubs) {
this.retrieveSearchValueSubs.forEach(r => r.unsubscribe());
}
}

public search(value: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
.tag-progress{
margin: 5px 0;
}

::ng-deep.arlas-tag-dialog .mdc-dialog__surface {
padding: 0 15px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@
.inactive-tag .mat-mdc-cell{
color : #cccccc;
}

::ng-deep.arlas-tag-dialog .mdc-dialog__surface {
padding: 0 15px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ export class TagComponent {
) { }

public openDialog() {
this.dialogRef = this.dialog.open(TagDialogComponent, { data: null });
this.dialogRef = this.dialog.open(TagDialogComponent, { data: null, panelClass: 'arlas-tag-dialog' });
this.dialogRef.componentInstance.tagEvent.subscribe(value => this.tagEvent.next(value));
}

public openManagement() {
this.dialogManagementRef = this.dialog.open(TagManagementDialogComponent, { data: null });
this.dialogManagementRef = this.dialog.open(TagManagementDialogComponent, { data: null, panelClass: 'arlas-tag-dialog' });
}

public removeProgress(itemId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/

::ng-deep.arlas-about-dialog .mdc-dialog__surface {
padding: 12px 24px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class AboutComponent {
public constructor(public dialog: MatDialog) { }

public openDialog() {
this.dialogRef = this.dialog.open(AboutDialogComponent);
this.dialogRef = this.dialog.open(AboutDialogComponent, { panelClass: 'arlas-about-dialog' });
this.dialogRef.componentInstance.pathToMd = this.pathToMd;
this.dialogRef.componentInstance.extraTextData = this.extraTextData;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,9 @@ $avatar-color: #999;
color: white;
}
}
}

::ng-deep.change-dialog .mdc-dialog__surface,
::ng-deep.arlas-user-info-dialog .mdc-dialog__surface {
padding: 12px 24px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class TopMenuComponent implements OnInit {
}

public getUserInfos() {
this.dialog.open(UserInfosComponent);
this.dialog.open(UserInfosComponent, { panelClass: 'arlas-user-info-dialog' });
}

public getInitials(name) {
Expand Down
Loading

0 comments on commit 51b3f11

Please sign in to comment.