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

Fix: pre release 2.7.4 QA bugs #556

Merged
merged 30 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e35f27c
fix transparent home page icons
Bilelkihal Mar 27, 2024
aa1a869
fix transparent icons in the browse page
Bilelkihal Mar 27, 2024
195d50b
fix summary page icons styles
Bilelkihal Mar 27, 2024
1664dd4
Fix recommender style issues
Bilelkihal Mar 27, 2024
51e7bf2
Fix annotator style issues
Bilelkihal Mar 27, 2024
947bd1e
Fix home fairness json link
Bilelkihal Mar 27, 2024
312dc6b
fix edit ontology style issues
Bilelkihal Mar 27, 2024
0264023
fix fair score link in summary page
Bilelkihal Mar 27, 2024
0306bb6
fix summary page empty categories and subject
Bilelkihal Mar 27, 2024
50b3416
fix footer email icon link
Bilelkihal Mar 27, 2024
98b14c0
fix summary page zoom icon
Bilelkihal Mar 27, 2024
1acecc5
fix broken info tooltip component
Bilelkihal Mar 28, 2024
cef5561
display tooltip on truncated links in summary page
Bilelkihal Mar 28, 2024
610921a
add tooltip to truncated groups in summary page
Bilelkihal Mar 28, 2024
04fabb1
fix chip button icon color
Bilelkihal Mar 28, 2024
0a6177a
fix mailing list subscription button in account page
Bilelkihal Mar 28, 2024
23e46cd
fix browse page debug admin color issue
Bilelkihal Mar 28, 2024
05b52ee
fix the count link in admin page for categories and groups tables
Bilelkihal Mar 28, 2024
458b9be
fix agent search autocomplete
Bilelkihal Mar 28, 2024
702767e
fix home page recommender annotator section issue when we're in french
Bilelkihal Mar 28, 2024
b9447a2
fix duplicated application key in the translation files
Bilelkihal Mar 28, 2024
28e3277
fix notes tab style
Bilelkihal Mar 28, 2024
8a3963e
fix landscape page ontologies selector
Bilelkihal Mar 29, 2024
a229863
use helpers.escape instead of CGI.escape in home_controller
Bilelkihal Apr 2, 2024
aff18e0
Merge branch 'development' into fix/pre-release-2.4.7-QA-bugs
Bilelkihal Apr 2, 2024
5070b7b
don't display select collection when there is no collection
Bilelkihal Apr 2, 2024
955fc24
Fix O'faire summary details modal style
Bilelkihal Apr 2, 2024
2f85cb2
enforce the chips button to be inlined otherwise will break to new line
syphax-bouazzouni Apr 3, 2024
519cc48
fix reverted translation after merging to development
syphax-bouazzouni Apr 3, 2024
1c7a2b3
rename fix_array_format helper show_ontology_domains
syphax-bouazzouni Apr 3, 2024
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 app/assets/images/icons/info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/assets/images/icons/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/assets/images/summary/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/assets/stylesheets/annotator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@
}
.annotator-table-container .class{
width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.annotation-parent + div{
margin-top: 5px;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/bioportal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ body{
}

.admin-background{
background-color: var(--light-color) !important;
background-color: var(--bg-info-light-color) !important;
border-color: var(--admin-color) !important;
color: var(--admin-color) !important;
border-radius: 5px;
Expand Down
10 changes: 8 additions & 2 deletions app/assets/stylesheets/components/chip_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
line-height: 44px;
display: inline;
}
.chip-button-component-container {
display: inline-block;
}
.chip-button-component-container svg path{
fill: var(--primary-color);
}

.chip_button_small {
font-size: 12px !important;
Expand All @@ -20,11 +26,11 @@
line-height: 44px;
padding: 10px;
border-radius: 5px;
color: var(--primary-color) !important;
color: var(--primary-color);
font-weight: 500;
font-size: 15px;
display: inline;
}
.chip_button_container_clickable a{
color: var(--primary-color) !important;
color: var(--primary-color);
}
2 changes: 1 addition & 1 deletion app/assets/stylesheets/components/nested_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
cursor: pointer;
margin-top: 10px;
}
.nested-form-input-container svg path{
.nested-form-input-container .add-another-object svg path{
fill: #DADADA;
}
.nested-form-input-container .add-another-object div{
Expand Down
7 changes: 7 additions & 0 deletions app/assets/stylesheets/concepts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,11 @@ div.synonym-change-request button {
fill: var(--primary-color) !important;
}
}
}

.select-collection-placeholder{
display: flex;
justify-content: center;
color: var(--gray-color);
margin-top: 10px;
}
8 changes: 7 additions & 1 deletion app/assets/stylesheets/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,13 @@ i.fa.fa-caret-square-o-down {
.home-logos img{
margin-left: 60px;
}

.home-upload-benifits svg{
width: 33px;
margin-top: 3px;
}
.home-upload-benifits svg path{
fill: var(--gray-color);
}

.home-support-title{
display: flex;
Expand Down
3 changes: 2 additions & 1 deletion app/assets/stylesheets/ontology_details_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@

.ontology-details-path{
display: flex;
align-items: center;
color: #888888;
margin-bottom: 20px;
}
.ontology-details-path img{
.ontology-details-path svg{
margin: 0 12px;
}
.ontology-details-path a{
Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/recommender.scss
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@
.recommender-result-ontology{
font-size: 16px;
display: block;
color: var(--primary-color);
}
.highlighted_recommendation{
width: 135px;
}
.recommender-result-highlighted{
display: flex;
Expand Down
10 changes: 10 additions & 0 deletions app/assets/stylesheets/summary.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
.summary-page-center .card_title{
margin-top: 40px;
}
.add-views-plus-icon path{
fill: var(--primary-color)
}
.summary-link-truncate{
max-width: 330px;
display: inline-flex;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

.summary-page-first-row {
width: 670px;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/themes/agroportal/main.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$color-primary: #3CB371;
$color-primary: var(--primary-color);
$color-secondary: #EFFFEF;
$color-links: #3CB371;
$color-links: var(--primary-color);
$color-warning: #ffc107;
@import "../lirmm/main";
@import "search";
3 changes: 3 additions & 0 deletions app/assets/stylesheets/themes/lirmm/landscape.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Place all the styles related to the landscape controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.landscape_ontologies_selector{
width: 100%;
}

h1 {
font-size: 300%;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/themes/ontoportal/main.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$color-primary: #3CB371;
$color-primary: var(--primary-color);
$color-secondary: #E4F1FB;
$color-links: #3CB371;
$color-links: var(--primary-color);
$color-warning: #ffc107;
@import "../lirmm/main";
@import "search";
4 changes: 2 additions & 2 deletions app/assets/stylesheets/themes/stageportal/main.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$color-primary: #3CB371;
$color-primary: var(--primary-color);
$color-secondary: #E4F1FB;
$color-links: #3CB371;
$color-links: var(--primary-color);
$color-warning: #ffc107;
@import "../lirmm/main";
@import "search";
3 changes: 2 additions & 1 deletion app/components/chip_button_component.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
class ChipButtonComponent < ViewComponent::Base
def initialize(url: nil, text: nil, type: "static", disabled: false, **html_options)
def initialize(url: nil, text: nil, type: "static", disabled: false, tooltip: nil ,**html_options)
@url = url
@text = text
@type = type
@disabled = disabled
@tooltip = tooltip
@html_options = html_options.merge({href: @url})
end
end
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
- if @type == "static"
%span.chip_button_container{@html_options}
= @text || content
- elsif !content
%a.chip_button_container_clickable{@html_options}
= @text
- else
%span.chip_button_container_clickable{@html_options}
= content
.chip-button-component-container{'data-controller': 'tooltip', title: @tooltip}
- if @type == "static"
%span.chip_button_container{@html_options}
= @text || content
- elsif !content
%a.chip_button_container_clickable{@html_options}
= @text
- else
%span.chip_button_container_clickable{@html_options}
= content
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%div.clipboard.d-flex.align-items-center{data:{controller: 'clipboard'}}
%div.clipboard.d-flex.align-items-center{data:{controller: 'clipboard'}, style: 'cursor:pointer;'}
%div{data: {'clipboard-target': 'content'}, class: @show_content ? '' : 'd-none'}
= @message || content
%div.ml-2
Expand Down
2 changes: 1 addition & 1 deletion app/components/display/image_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def call

def depiction_with_modal(depiction_url)
img_tag = image_tag(depiction_url, class: 'image-content')
loop_icon_tag = content_tag(:span , image_tag('icons/loop.svg'), class: 'loop_icon')
loop_icon_tag = content_tag(:span , inline_svg_tag('icons/loop.svg'), class: 'loop_icon')
modal_url = "/ajax/images/show?url=#{depiction_url}"
modal_options = { data: { show_modal_title_value: @title, show_modal_size_value: 'modal-xl' } }

Expand Down
4 changes: 3 additions & 1 deletion app/components/display/info_tooltip_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ def initialize(text: nil , icon: "info.svg")
@icon = icon
end
def call
inline_svg_tag "icons/#{@icon}", data:{controller:'tooltip', 'tooltip-interactive-value': 'true'}, title: @text
content_tag(:div, data:{controller:'tooltip', 'tooltip-interactive-value': 'true'}, title: @text, style: 'display: inline-block;') do
inline_svg_tag "icons/#{@icon}", width: '20', height: '20'
end
end

end
2 changes: 1 addition & 1 deletion app/components/field_container_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class FieldContainerComponent < ViewComponent::Base

renders_one :label
def initialize(label: nil, value: nil, truncate: false)
syphax-bouazzouni marked this conversation as resolved.
Show resolved Hide resolved
def initialize(label: nil, value: nil)
super
@label = label
@value = value
Expand Down
2 changes: 1 addition & 1 deletion app/components/link_field_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def link_tag
target = "_blank"
end

tag = link_to(text, url, target: target, class: 'text-truncate', style: "max-width: 330px; display: inline-flex;")
tag = link_to(text, url, target: target, class: 'summary-link-truncate', 'data-controller': 'tooltip', title: text)
link_to_with_actions(tag, url: url, copy: @enable_copy, check_resolvability: @check_resolvability)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- if @search_icon_type
%a{href: '/search', 'data-search-input-target': 'button'}
= inline_svg_tag 'arrow-right.svg', class: "home-search-button #{nav_icon_class}"
- else
%a.d-none{'data-search-input-target': 'button'}
= render Input::InputFieldComponent.new(name: @name, placeholder: @placeholder,
data: {'action': 'input->search-input#search blur->search-input#blur keydown.down->search-input#arrow_down keydown.up->search-input#arrow_up keydown.enter->search-input#enter_key',
'search-input-target': 'input'})
Expand Down
1 change: 1 addition & 0 deletions app/controllers/annotator_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def annotator_results(uri)
@advanced_options_open = false
@annotator_ontologies = LinkedData::Client::Models::Ontology.all
if params[:text] && !params[:text].empty?
@init_whole_word_only = true
api_params = {
text: escape(params[:text]),
ontologies: params[:ontologies],
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ def feedback_complete; end

def annotator_recommender_form
if params[:submit_button] == "annotator"
redirect_to "/annotator?text=#{params[:text]}"
redirect_to "/annotator?text=#{helpers.escape(params[:text])}"
elsif params[:submit_button] == "recommender"
redirect_to "/recommender?input=#{params[:input]}"
redirect_to "/recommender?input=#{helpers.escape(params[:input])}"
end
end

Expand Down
8 changes: 4 additions & 4 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ def group_chip_component(id: nil, name: , object: , checked: , value: nil, title

def add_comment_button(parent_id, parent_type)
if session[:user].nil?
link_to t('application.add_comment'), login_index_path(redirect: request.url), class: "link_button"
link_to t('application.add_comment'), login_index_path(redirect: request.url), class: "secondary-button regular-button"
else
link_to_modal t('application.add_comment'), notes_new_comment_path(parent_id: parent_id, parent_type: parent_type, ontology_id: @ontology.acronym),
class: "add_comment btn btn-primary", data: { show_modal_title_value: t('application.add_new_comment')}
class: "secondary-button regular-button", data: { show_modal_title_value: t('application.add_new_comment')}
end
end

Expand All @@ -280,10 +280,10 @@ def add_reply_button(parent_id)

def add_proposal_button(parent_id, parent_type)
if session[:user].nil?
link_to t('application.add_proposal'), login_index_path(redirect: request.url), class: "link_button"
link_to t('application.add_proposal'), login_index_path(redirect: request.url), class: "secondary-button regular-button"
else
link_to_modal t('application.add_proposal'), notes_new_proposal_path(parent_id: parent_id, parent_type: parent_type, ontology_id: @ontology.acronym),
class: "add_proposal btn btn-primary", data: { show_modal_title_value: t('application.add_new_proposal')}
class: "secondary-button regular-button", data: { show_modal_title_value: t('application.add_new_proposal')}
end
end
def link?(str)
Expand Down
3 changes: 1 addition & 2 deletions app/helpers/components_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ def form_save_button
def form_cancel_button
render Buttons::RegularButtonComponent.new(id: 'cancel-button', value: t('components.cancel_button'), variant: "secondary", size: "slim") do |btn|
btn.icon_left do
inline_svg_tag "x.svg", width: "20", height: "20"

inline_svg_tag "x.svg", width: "9", height: "9"
end
end
end
Expand Down
5 changes: 3 additions & 2 deletions app/helpers/fair_score_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ def print_score(score)
number_with_precision(score, precision: 2, strip_insignificant_zeros: true)
end

def fairness_link(style = '')
def fairness_link(style: '', ontology: nil)
custom_style = "font-size: 50px; line-height: 0.5; margin-left: 6px; #{style}".strip
render IconWithTooltipComponent.new(icon: "json.svg",link: get_fairness_service_url, target: '_blank', title: t('fair_score.go_to_api'), size:'small', style: custom_style)
ontology = ontology || 'all'
render IconWithTooltipComponent.new(icon: "json.svg",link: "#{get_fairness_service_url}&ontologies=#{ontology}&combined=true", target: '_blank', title: t('fair_score.go_to_api'), size:'small', style: custom_style)
end
end

14 changes: 11 additions & 3 deletions app/helpers/ontologies_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,18 @@ def visibility_link(ontology)

def show_category_name(domain)
return domain unless link?(domain)

acronym = domain.split('/').last.upcase.strip
category = LinkedData::Client::Models::Category.find(acronym)
category ? category.name : acronym.titleize
category.name ? category.name : acronym.titleize
end


def show_ontology_domains(domains)
if domains.length == 1 && domains[0].include?(',')
domains[0].split(',').map(&:strip)
else
domains
end
end

def show_group_name(domain)
Expand Down Expand Up @@ -519,7 +527,7 @@ def new_element_link(title, link)
end

link_to(link, title: title, class: "mx-1") do
inline_svg_tag("icons/plus.svg", width: '15px', height: '15px')
inline_svg_tag("icons/plus.svg", width: '15px', height: '15px', class: 'add-views-plus-icon')
end
end

Expand Down
Loading
Loading