Skip to content

Commit

Permalink
Fix: Browse page switch style, and don't display current portal name …
Browse files Browse the repository at this point in the history
…button in browse results (#828)

* fix broken switch style when using a long text with it

* don't show current portal name button in browse page results

* adjest switch text max-width only for browse filter

* don't show portal name only if it's unique in browse page federated results
  • Loading branch information
Bilelkihal authored Nov 5, 2024
1 parent f1773c1 commit b7318e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/stylesheets/browse.scss
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@
z-index: 1;

}
.browse-filter .switch-filter > p, .switch-filter > div{
max-width: 207px;
}

.browse-search-bar input:focus {
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
Expand Down
1 change: 1 addition & 0 deletions app/controllers/concerns/submission_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def merge_by_acronym(submissions)
submissions.group_by { |x| x[:ontology]&.acronym }.each do |acronym, ontologies|
ontology = canonical_ontology(ontologies)
ontology[:sources] = ontologies.map { |x| x[:id] }
ontology[:sources].reject! { |id| id.include?(portal_name.downcase) } if ontology[:sources].size.eql?(1)
merged_submissions << ontology
end
merged_submissions
Expand Down

0 comments on commit b7318e0

Please sign in to comment.