Skip to content

UFAL/Updated components to display dc.description instead of dc.description.abstract#1291

Merged
milanmajchrak merged 2 commits into
dtq-devfrom
ufal/dc-description-ui-issue
May 21, 2026
Merged

UFAL/Updated components to display dc.description instead of dc.description.abstract#1291
milanmajchrak merged 2 commits into
dtq-devfrom
ufal/dc-description-ui-issue

Conversation

@milanmajchrak
Copy link
Copy Markdown
Collaborator

@milanmajchrak milanmajchrak commented May 21, 2026

Problem description

The issue: #1290

Analysis

(Write here, if there is needed describe some specific problem. Erase it, when it is not needed.)

Problems

(Write here, if some unexpected problems occur during solving issues. Erase it, when it is not needed.)

Sync verification

If en.json5 or cs.json5 translation files were updated:

  • Run yarn run sync-i18n -t src/assets/i18n/cs.json5 -i to synchronize messages, and changes are included in this PR.

Manual Testing (if applicable)

Copilot review

  • Requested review from Copilot

Copilot AI review requested due to automatic review settings May 21, 2026 10:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates item search result rendering (list + grid views) to display dc.description instead of dc.description.abstract, aligning search-result snippets with the metadata actually populated via the UFAL submission form (per #1290).

Changes:

  • Updated item search result templates (list/grid) to render dc.description in the “abstract/description” area.
  • Updated existing unit-test fixtures to use dc.description instead of dc.description.abstract.
  • Added new unit tests for the “legacy abstract-only” (dc.description.abstract only) scenario.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html Switched list view abstract rendering from dc.description.abstract to dc.description.
src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.spec.ts Updated fixtures and added a legacy dc.description.abstract-only test case.
src/app/shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component.html Switched grid view abstract rendering from dc.description.abstract to dc.description.
src/app/shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component.spec.ts Updated fixtures and added a legacy dc.description.abstract-only test + additional setup.
Comments suppressed due to low confidence (1)

src/app/shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component.spec.ts:262

  • This test enforces that an item with only dc.description.abstract renders no abstract. If legacy records should still show something, consider changing the component to fall back to dc.description.abstract (when dc.description is absent) and update this test to assert the legacy text is shown.
  it('should not show abstract field when only dc.description.abstract is available', () => {
    comp.object = mockItemWithAbstractOnly;
    fixture.detectChanges();

    const abstractField = fixture.debugElement.query(By.css('.item-abstract'));
    expect(abstractField).toBeNull();
  });

@milanmajchrak milanmajchrak merged commit 3a95a85 into dtq-dev May 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants