Skip to content
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

Fix [datahub]: Display external viewer button correctly #656

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<gn-ui-dropdown-selector
*ngIf="dropdownChoices$ | async as choices"
[title]="'table.select.data' | translate"
class="mb-7 w-auto ml-auto"
class="truncate p-1 -mx-1"
extraBtnClass="!text-primary font-sans font-medium"
[choices]="choices"
(selectValue)="selectLink($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
(buttonClick)="openInExternalViewer()"
type="secondary"
[title]="'record.externalViewer.open' | translate"
extraClass="!p-[0.6em] !rounded-lg"
extraClass="ms-2 !rounded-lg"
>
<mat-icon class="material-symbols-outlined">open_in_new</mat-icon>
</gn-ui-button>
5 changes: 3 additions & 2 deletions libs/feature/record/src/lib/map-view/map-view.component.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<div class="w-full h-full flex flex-col p-1">
<div class="w-full mb-7 mt-1">
<div class="w-full flex justify-end mb-7 mt-1">
<gn-ui-dropdown-selector
class="truncate p-1 -mx-1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised that this does anything; for me the dropdown button already has a truncate built-in if the width is too low for the text to show

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, strangely this is necessary, because of the flex I added in the parent.

extraBtnClass="!text-primary font-sans font-medium"
[title]="'map.select.layer' | translate"
[choices]="dropdownChoices$ | async"
(selectValue)="selectLinkToDisplay($event)"
></gn-ui-dropdown-selector>
<gn-ui-external-viewer-button
class="shrink-0"
class="shrink-0 py-1 place-self-end"
[link]="selectedLink$ | async"
[mapConfig]="mapConfig"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<div
class="flex items-start flex-col sm:flex-row sm:items-center relative w-full"
>
<div class="flex flex-col sm:flex-row sm:items-center relative w-full">
<span
*ngIf="showTitle"
class="tracking-wide text-sm mb-2 sm:mb-0 sm:mr-2 whitespace-nowrap"
Expand Down Expand Up @@ -56,7 +54,7 @@
type="button"
*ngFor="let choice of choices"
[title]="choice.label"
class="flex px-5 py-1 w-full cursor-pointer transition-colors"
class="flex px-5 py-1 w-full text-start cursor-pointer transition-colors"
[ngClass]="
isSelected(choice)
? 'text-white bg-primary hover:text-white hover:bg-primary-darker focus:text-white focus:bg-primary-darker'
Expand Down
Loading