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

Datahub: Make geo data badge more readable #946

Merged
merged 3 commits into from
Jul 30, 2024
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
2 changes: 1 addition & 1 deletion apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'cypress-real-events'
import { tile } from 'ol/loadingstrategy'

Check warning on line 2 in apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts

View workflow job for this annotation

GitHub Actions / Format check, lint, unit tests

'tile' is defined but never used
import path from 'path'

beforeEach(() => {
Expand Down Expand Up @@ -118,7 +118,7 @@
.find('.font-title')
.next()
.as('infoBar')
cy.get('@infoBar').children('div').should('have.length', 3)
cy.get('@infoBar').children().should('have.length', 3)
})
it('should return to the dataset list', () => {
cy.get('datahub-header-record')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,21 @@
{{ metadata.title }}
</div>
<div
class="flex flex-row flex-wrap gap-2 mb-4 ml-4 sm:mr-[332px]"
class="flex flex-row flex-wrap gap-4 mb-4 ml-4 sm:mr-[332px]"
[style.color]="foregroundColor"
>
<div
<gn-ui-badge
*ngIf="(isGeodata$ | async) === true"
class="flex flex-row bg-primary-darker rounded"
[style.--gn-ui-badge-padding]="'0.4em 0.75em'"
[style.--gn-ui-badge-background-color]="'var(--color-primary-darker)'"
[style.--gn-ui-badge-opacity]="'1'"
>
<span class="material-symbols-outlined mt-0.5 ml-2 text-[20px]">
<mat-icon class="material-symbols-outlined mt-0.5 ml-2 text-[20px]">
my_location
</span>
<p class="ml-2 mr-2" translate>record.metadata.type</p>
</div>
<div *ngIf="metadata.recordUpdated" class="flex flex-row gap-1">
</mat-icon>
<span class="ml-2 mr-2" translate>record.metadata.type</span>
</gn-ui-badge>
<div *ngIf="metadata.recordUpdated">
<p translate [translateParams]="{ date: lastUpdate }">
record.metadata.lastUpdate
</p>
Expand Down
3 changes: 2 additions & 1 deletion tailwind.base.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
--padding: var(--gn-ui-badge-padding, 0.375em 0.75em);
--text-color: var(--gn-ui-badge-text-color, var(--color-gray-50));
--background-color: var(--gn-ui-badge-background-color, black);
@apply inline-block opacity-70 p-[--padding] rounded-[--rounded]
--opacity: var(--gn-ui-badge-opacity, 0.7);
@apply inline-block opacity-[--opacity] p-[--padding] rounded-[--rounded]
font-medium text-[length:0.875em] leading-none text-[color:--text-color] bg-[color:--background-color];
}
/* makes sure icons will not make the badges grow vertically; also make size proportional */
Expand Down
Loading