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

Avoid displaying empty type field in search result list #973

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

osma
Copy link
Member

@osma osma commented Apr 9, 2020

This PR avoids showing an empty type field in search result list. This could happen for concepts which had only skos:Concept as their type.

Before:
image

After:
image

This isn't quite what @tfrancart requested in #942:

I would expect to see "Concept" as the value for "Concept type".

Instead, this makes the search result list match the concept page, where a type field is not shown at all if "Concept" is the only type of a concept.

The Twig template code for this part of the search result list was simplified a lot. It had a lot of unnecessary complexity as it was adapted from the concept page in commit 89a02e2

Fixes #942

@osma osma added the bug label Apr 9, 2020
@osma osma added this to the 2.5 milestone Apr 9, 2020
@osma osma requested a review from joelit April 9, 2020 11:30
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 9, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov
Copy link

codecov bot commented Apr 9, 2020

Codecov Report

Merging #973 into master will increase coverage by 0.30%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #973      +/-   ##
============================================
+ Coverage     58.79%   59.09%   +0.30%     
- Complexity     1505     1562      +57     
============================================
  Files            32       32              
  Lines          4208     4440     +232     
============================================
+ Hits           2474     2624     +150     
- Misses         1734     1816      +82     
Impacted Files Coverage Δ Complexity Δ
controller/WebController.php 17.95% <0.00%> (+0.19%) 95.00% <0.00%> (ø%)
model/VocabularyConfig.php 94.33% <0.00%> (+2.03%) 132.00% <0.00%> (+57.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69eff7c...a48342b. Read the comment docs.

Copy link
Contributor

@joelit joelit left a comment

Choose a reason for hiding this comment

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

Looks even better than expected.

@joelit joelit merged commit af793fc into master Apr 9, 2020
@osma osma deleted the issue942-search-result-empty-type branch April 9, 2020 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Concept types" is empty for Concepts in search result page (but displayed for Collections)
2 participants