-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implementation (Content Analytics Search): #30427 Apply updated Design (
#30492) ### Proposed Changes * Apply new design updates, using the `p-splitter` * Json format validation before be able to make the request ### Additional Info ** any additional useful context or info ** ### Screenshots <img width="1323" alt="image" src="https://github.com/user-attachments/assets/daaed8ce-7285-4aa5-88ad-894a2a520df3"> <img width="1301" alt="image" src="https://github.com/user-attachments/assets/c62ce545-4ddb-417e-9643-e4e1434db905"> <img width="1359" alt="image" src="https://github.com/user-attachments/assets/edb41833-aebf-471f-aba9-cea22c9c7d0e">
- Loading branch information
Showing
9 changed files
with
177 additions
and
57 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
core-web/libs/dotcms-scss/angular/dotcms-theme/components/_splitter.scss
This file contains 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,22 @@ | ||
@use "variables" as *; | ||
|
||
.p-splitter { | ||
border: 1px solid $color-palette-gray-400; | ||
background: $white; | ||
border-radius: $border-radius-sm; | ||
|
||
.p-splitter-gutter, | ||
.p-splitter-gutter-resizing { | ||
background: $color-palette-gray-100; | ||
|
||
.p-splitter-gutter-handle { | ||
background: $color-palette-gray-300; | ||
|
||
&:focus-visible { | ||
outline: none; | ||
outline-offset: 0; | ||
box-shadow: $shadow-xs; | ||
} | ||
} | ||
} | ||
} |
This file contains 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
71 changes: 44 additions & 27 deletions
71
...analytics-search/portlet/src/lib/dot-analytics-search/dot-analytics-search.component.html
This file contains 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,27 +1,44 @@ | ||
<section class="content-analytics__query"> | ||
<div class="content-analytics__header"> | ||
<h4>{{ 'analytics.search.query' | dm }}</h4> | ||
<div class="content-analytics__actions"> | ||
<button | ||
pButton | ||
(click)="handleRequest()" | ||
[label]="'analytics.search.run.query' | dm" | ||
icon="pi pi-arrow-right" | ||
iconPos="right" | ||
data-testId="run-query"></button> | ||
</div> | ||
</div> | ||
<ngx-monaco-editor | ||
[(ngModel)]="queryEditor" | ||
[options]="ANALYTICS_MONACO_EDITOR_OPTIONS" | ||
data-testId="query-editor"></ngx-monaco-editor> | ||
</section> | ||
<section class="content-analytics__results"> | ||
<div class="content-analytics__header"> | ||
<h4>{{ 'analytics.search.results' | dm }}</h4> | ||
</div> | ||
<ngx-monaco-editor | ||
[ngModel]="results$()" | ||
[options]="ANALYTICS__RESULTS_MONACO_EDITOR_OPTIONS" | ||
data-testId="results-editor"></ngx-monaco-editor> | ||
</section> | ||
<p-splitter [panelSizes]="[35, 65]" styleClass="mb-5"> | ||
<ng-template pTemplate> | ||
<section> | ||
<div class="content-analytics__query-header"> | ||
<h4>{{ 'analytics.search.query' | dm }}</h4> | ||
<button | ||
class="p-button-rounded p-button-link p-button-sm" | ||
pButton | ||
icon="pi pi-question-circle"></button> | ||
</div> | ||
<ngx-monaco-editor | ||
[(ngModel)]="queryEditor" | ||
[options]="ANALYTICS_MONACO_EDITOR_OPTIONS" | ||
(ngModelChange)="handleQueryChange($event)" | ||
data-testId="query-editor"></ngx-monaco-editor> | ||
<div class="content-analytics__actions"> | ||
<span | ||
tooltipPosition="top" | ||
[pTooltip]="$isValidJson() ? '' : ('analytics.search.valid.json' | dm)"> | ||
<button | ||
pButton | ||
(click)="handleRequest()" | ||
[disabled]="!$isValidJson()" | ||
[label]="'analytics.search.execute.query' | dm" | ||
data-testId="run-query"></button> | ||
</span> | ||
</div> | ||
</section> | ||
</ng-template> | ||
<ng-template pTemplate> | ||
@if ($results() === null) { | ||
<dot-empty-container | ||
[configuration]="$emptyState()" | ||
[hideContactUsLink]="true"></dot-empty-container> | ||
} @else { | ||
<section class="content-analytics__results"> | ||
<ngx-monaco-editor | ||
[ngModel]="$results()" | ||
[options]="ANALYTICS__RESULTS_MONACO_EDITOR_OPTIONS" | ||
data-testId="results-editor"></ngx-monaco-editor> | ||
</section> | ||
} | ||
</ng-template> | ||
</p-splitter> |
This file contains 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 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 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 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 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 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