Skip to content

Commit

Permalink
Resolved merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
ronitjadhav committed Jan 25, 2024
2 parents ffc87e2 + 177cac3 commit 0c8d1af
Show file tree
Hide file tree
Showing 62 changed files with 968 additions and 176 deletions.
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Bug report
about: Create a report to help us improve GeoNetwork-UI
title: ''
labels: 'bug'
assignees: ''
---

### Describe the bug

When opening the application [...]

<!--
Please provide an in-depth description of the problem witnessed and in which context it happens, as well as the expected result.
-->

- GeoNetwork-UI version used: [`X.X.X` or `main`]

- Application: [...]

<!--
Ideally, these steps should be reproducible with the local docker composition in `support-services`. If not, please provide a link to an online platform from which the problem can be investigated.
-->

### Expected behaviour

The application should [...]

<!--
Please describe here the expected behavior of the application
-->

### Steps To Reproduce

- Run [...]
- Open [...]
- Click on [...]

<!--
Ideally, these steps should be reproducible with the local docker composition in `support-services`. If not, please provide a link to an online platform from which the problem can be investigated.
-->

### Screenshots

[...]

<!--
Please add screenshots showing the unexpected visual result, or even better an animated screen capture.
-->
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Feature request
about: Suggest an idea or request a feature for this project
title: ''
labels: 'feature request'
assignees:
---

### Description

I would like to request adding [...]

<!--
Please describe here what you think constitute a valuable improvement to the project.
-->

### Motivation

This request stems from the fact that [...]

<!--
Please describe here the underlying motivation from this request/suggestion: a recurring complaint from users, a technical limitation, bad performance, etc.
Also please keep in mind that writing a request does _not_ mean it will get implemented automatically! The best way to see an improvement happen is to secure funding for it, or to contribute it directly.
-->

### Inspiration and context

This request takes inspiration from [...]

<!--
Share here any link/image that might help other people understand the intended outcome, as well as more information about the context this request might have emerged from.
-->
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Proposal
about: Describe a feature or tech task that you intend to push forward
title: ''
labels: 'enhancement'
assignees: ''
---

### Description of the proposal

This proposal aims at adding [...]

The final outcome will be [...]

<!--
Proposals can either be of technical or functional nature. Please describe the intended outcome clearly as to better communicate your intention.
-->

### Motivation

This proposal stems from the fact that [...]

<!--
Optionally, please describe here the underlying motivation from this proposal: a recurring complaint from users, a technical limitation, bad performance, etc.
-->

### Scope

This proposal affects [...]

<!--
A proposal scope can either be an application, a specific page or component, a module, a dependency...
-->

### Possible alternatives

Another way of achieving this could be to [...]

<!--
It is always good to provide alternatives in case the main proposal does not gather a high enough approval
-->

### Inspiration and context

This proposal takes inspiration from [...]

<!--
Share here any link/image that might help other people understand the intended outcome, as well as more information about the context this proposal might have emerged from.
-->

---

<!--
Please give credit to the sponsor of this work if possible. If this work is not funded yet, please let it be known clearly!!
-->

**This work is sponsored by [Organization ABC](xx)**.
45 changes: 45 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
### Description

This PR introduces [...]

<!--
Describe here the changes brought by this PR. Do not forget to link any relevant issue or discussion to help people review your work!
-->

### Architectural changes

The following library now depends on [...]

<!--
Describe here any changes to the project architecture: adding/removing modules or libraries, changing dependencies between libraries and apps, changes to external NPM dependencies...
-->

### Screenshots

[...]

<!--
If the changes incur visual changes, please include screenshots or an animated screen capture.
-->

### Quality Assurance Checklist

- [ ] Commit history is devoid of any _merge commits_ and readable to facilitate reviews
- [ ] If **new logic** ⚙️ is introduced: unit tests were added
- [ ] If **new user stories** 🤏 are introduced: E2E tests were added
- [ ] If **new UI components** 🕹️ are introduced: corresponding stories in Storybook were created
- [ ] If **breaking changes** 🪚 are introduced: add the `breaking change` label
- [ ] If **bugs** 🐞 are fixed: add the `backport <release branch>` label
- [ ] The [documentation website](docs) 📚 has received the love it deserves

<!--
Please only check items relevant to your contribution. Thank you very much for your time and efforts!
-->

---

<!--
Please give credit to the sponsor of this work if possible.
-->

**This work is sponsored by [Organization ABC](xx)**.
73 changes: 28 additions & 45 deletions apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ describe('dataset pages', () => {
.children('header')
.find('gn-ui-navigation-button')
})
it('should display the data type, last update and status', () => {
cy.visit('/dataset/01491630-78ce-49f3-b479-4b30dabc4c69')
cy.get('datahub-header-record')
.children('header')
.find('.font-title')
.next()
.as('infoBar')
cy.get('@infoBar').children('div').should('have.length', 3)
})
it('should return to the dataset list', () => {
cy.get('datahub-header-record')
.children('header')
Expand All @@ -81,40 +90,33 @@ describe('dataset pages', () => {
cy.url().should('include', '/search')
})
})
describe('navigation bar', () => {
it('should display the navigation bar with 4 sections', () => {
cy.get('datahub-navigation-bar')
.find('button')
.filter(':visible')
.should('have.length', 4)
})
it('should scroll down/up to the clicked section', () => {
cy.get('datahub-navigation-bar')
.find('button')
.filter(':visible')
.as('navBtns')
cy.get('@navBtns').eq(3).click()
cy.get('datahub-record-otherlinks').should('be.visible')
})
})
})

describe('ABOUT SECTION : display & functions', () => {
describe('display', () => {
it('should display the description', () => {
cy.get('datahub-record-metadata')
.find('[id="about"]')
.find('gn-ui-metadata-info')
.find('gn-ui-content-ghost')
.find('gn-ui-max-lines')
.children('div')
.children('div')
.children('p')
.find('gn-ui-markdown-parser')
.should(($element) => {
const text = $element.text().trim()
expect(text).not.to.equal('')
})
})
it.only('should display the thumbnail image and magnify', () => {
cy.get('datahub-record-metadata')
.find('[id="about"]')
.find('gn-ui-image-overlay-preview')
.as('overlay')
.should('have.length', 1)
cy.get('@overlay').find('gn-ui-button').click()
cy.get('[class="basicLightbox__placeholder"]')
.as('lightbox')
.find('img')
.should('have.length', 1)
cy.get('body').click()
cy.get('@lightbox').should('have.length', 0)
})
it('should display the contact details', () => {
cy.get('datahub-record-metadata')
.find('[id="about"]')
Expand All @@ -141,16 +143,8 @@ describe('dataset pages', () => {
})
})
it('should display the keywords', () => {
cy.get('datahub-record-metadata')
.find('[id="about"]')
.find('gn-ui-metadata-info')
.find('gn-ui-content-ghost')
.find('gn-ui-max-lines')
.children('div')
.children('div')
.children('div')
.children('gn-ui-badge')
.should('have.length.gt', 0)
cy.get('gn-ui-expandable-panel').eq(2).click()
cy.get('gn-ui-badge').should('have.length.gt', 0)
})
it('should display the lineage and usage tabs', () => {
cy.get('datahub-record-metadata')
Expand Down Expand Up @@ -185,20 +179,9 @@ describe('dataset pages', () => {
cy.url().should('include', '/search?publisher=')
})
it('should go to dataset search page when clicking on keyword and filter by keyword', () => {
cy.get('datahub-record-metadata')
.find('[id="about"]')
.find('gn-ui-metadata-info')
.find('gn-ui-content-ghost')
.find('gn-ui-max-lines')
.children('div')
.contains('Read more')
.click()
cy.get('gn-ui-expandable-panel').eq(2).click()

cy.get('datahub-record-metadata')
.find('gn-ui-badge')
.children('div')
.first()
.as('keyword')
cy.get('gn-ui-badge').should('have.length.gt', 0).eq(1).as('keyword')

cy.get('@keyword').then((key) => {
keyword = key.text().toUpperCase()
Expand Down
1 change: 1 addition & 0 deletions apps/datahub/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"tailwind.base.css",
"apps/datahub/src/styles.css",
"node_modules/tippy.js/dist/tippy.css",
"node_modules/basiclightbox/dist/basicLightbox.min.css",
"node_modules/ol/ol.css",
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,62 @@
<header class="w-full h-[231px]" [style.background]="backgroundCss">
<header class="w-full h-[255px]" [style.background]="backgroundCss">
<div
class="h-full container-lg mx-auto flex flex-col justify-center relative"
class="h-full container-lg mx-auto flex flex-col justify-between relative"
>
<gn-ui-favorite-star
*ngIf="metadata?.uniqueIdentifier"
[record]="metadata"
class="absolute text-background top-[0.85em] right-[0.85em]"
[style.color]="foregroundColor"
[style.--star-toggle-enabled-color]="'var(--color-primary)'"
[style.--star-toggle-disabled-color]="foregroundColor"
></gn-ui-favorite-star>
<div class="flex flex-row justify-between content-center mt-3">
<div class="ml-4">
<gn-ui-navigation-button
(click)="back()"
[label]="'datahub.search.back' | translate"
[icon]="'arrow_back'"
>
</gn-ui-navigation-button>
</div>
<div class="flex flex-row mr-6 content-center gap-3">
<gn-ui-favorite-star
*ngIf="metadata?.uniqueIdentifier"
[record]="metadata"
[displayCount]="false"
class="flex text-background content-center"
[style.color]="foregroundColor"
[style.--star-toggle-enabled-color]="foregroundColor"
[style.--star-toggle-disabled-color]="foregroundColor"
></gn-ui-favorite-star>
<gn-ui-language-switcher
*ngIf="showLanguageSwitcher"
class="language-switcher text-[13px] text-white bg-opacity-0 border border-white rounded mt-0.5"
></gn-ui-language-switcher>
</div>
</div>
<div
*ngIf="metadata"
class="font-title text-center px-2 text-[28px] mb-[41px] line-clamp-4 sm:mx-48"
class="font-title text-[28px] max-w-screen-sm line-clamp-4 ml-4"
[style.color]="foregroundColor"
>
{{ metadata.title }}
</div>

<div class="absolute" style="left: 16px; top: 16px">
<gn-ui-navigation-button
(click)="back()"
[label]="'datahub.search.back' | translate"
[icon]="'navigate_before'"
<div class="flex flex-row text-white gap-2 mb-4 ml-4">
<div
*ngIf="(isGeodata$ | async) === true"
class="flex flex-row bg-primary-darker rounded"
>
</gn-ui-navigation-button>
<span class="material-symbols-outlined mt-0.5 ml-2 text-[20px]">
my_location
</span>
<p class="text-white ml-2 mr-2" translate>record.metadata.type</p>
</div>
<div *ngIf="metadata.recordUpdated" class="flex flex-row gap-1">
<p class="text-white" translate>record.metadata.lastUpdate</p>
<p class="text-white">
{{ lastUpdate }}
</p>
</div>
<div *ngIf="metadata.status" class="flex flex-row gap-2">
<p></p>
<p
class="text-white"
[innerHTML]="'domain.record.status.' + metadata.status | translate"
></p>
</div>
</div>
</div>
</header>

<div
class="container-lg mt-[-40px] z-20 sticky lg:mx-auto inset-x-0 top-[10px]"
>
<datahub-navigation-bar></datahub-navigation-bar>
</div>
Loading

0 comments on commit 0c8d1af

Please sign in to comment.