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: jump_to box for multilingual ontologies #347

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
79 changes: 41 additions & 38 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ GEM
autoprefixer-rails (>= 9.1.0)
popper_js (>= 2.11.6, < 3)
sassc-rails (>= 2.0.0)
brakeman (6.2.1)
brakeman (6.2.2)
racc
builder (3.3.0)
capistrano (3.19.1)
capistrano (3.19.2)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
Expand Down Expand Up @@ -136,10 +136,11 @@ GEM
coderay (1.1.3)
concurrent-ruby (1.3.4)
crass (1.0.6)
csv (3.3.0)
cube-ruby (0.0.3)
daemons (1.4.1)
dalli (3.2.8)
date (3.3.4)
date (3.4.0)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
Expand All @@ -149,14 +150,14 @@ GEM
erubi (1.13.0)
erubis (2.7.0)
eventmachine (1.2.7)
excon (0.111.0)
execjs (2.9.1)
excon (1.2.0)
execjs (2.10.0)
faraday (2.12.0)
faraday-net_http (>= 2.0, < 3.4)
json
logger
faraday-excon (2.2.0)
excon (>= 0.109.0)
faraday-excon (2.3.0)
excon (>= 1.0.0)
faraday (>= 2.11.0, < 3)
faraday-multipart (1.0.4)
multipart-post (~> 2)
Expand Down Expand Up @@ -192,10 +193,11 @@ GEM
activesupport (>= 3.0)
nokogiri (>= 1.6)
io-console (0.7.2)
irb (1.14.0)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
iso-639 (0.3.6)
iso-639 (0.3.8)
csv
jquery-rails (4.6.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
Expand All @@ -204,13 +206,13 @@ GEM
railties (>= 3.2.16)
jsbundling-rails (1.3.1)
railties (>= 6.0.0)
json (2.7.2)
json (2.8.1)
language_server-protocol (3.17.0.3)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.1)
loofah (2.22.0)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
lz4-ruby (0.3.3)
Expand All @@ -222,21 +224,22 @@ GEM
marcel (1.0.4)
matrix (0.4.2)
method_source (1.1.0)
mime-types (3.5.2)
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0903)
mime-types-data (3.2024.1105)
mini_mime (1.1.5)
minitest (5.25.1)
msgpack (1.7.2)
msgpack (1.7.5)
multi_json (1.15.0)
multipart-post (2.4.1)
mysql2 (0.5.5)
net-ftp (0.3.7)
net-ftp (0.3.8)
net-protocol
time
net-http (0.4.1)
net-http (0.5.0)
uri
net-imap (0.4.16)
net-imap (0.4.18)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -249,23 +252,23 @@ GEM
net-ssh (>= 5.0.0, < 8.0.0)
net-smtp (0.5.0)
net-protocol
net-ssh (7.2.3)
net-ssh (7.3.0)
netrc (0.11.0)
newrelic_rpm (9.13.0)
nio4r (2.7.3)
newrelic_rpm (9.15.0)
nio4r (2.7.4)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
oj (3.16.6)
oj (3.16.7)
bigdecimal (>= 3.0)
ostruct (>= 0.2)
open_uri_redirections (0.2.1)
ostruct (0.6.0)
ostruct (0.6.1)
parallel (1.26.3)
parser (3.3.5.0)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
popper_js (2.11.8)
Expand All @@ -275,7 +278,7 @@ GEM
psych (3.3.4)
public_suffix (6.0.1)
racc (1.8.1)
rack (2.2.9)
rack (2.2.10)
rack-mini-profiler (3.3.1)
rack (>= 1.2.0)
rack-test (2.1.0)
Expand Down Expand Up @@ -322,23 +325,23 @@ GEM
json
redis (4.8.1)
regexp_parser (2.9.2)
reline (0.5.10)
reline (0.5.11)
io-console (~> 0.5)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.3.7)
rspec-core (3.13.1)
rexml (3.3.9)
rspec-core (3.13.2)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
rspec-mocks (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (7.0.1)
rspec-rails (7.1.0)
actionpack (>= 7.0)
activesupport (>= 7.0)
railties (>= 7.0)
Expand All @@ -347,7 +350,7 @@ GEM
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.1)
rubocop (1.66.1)
rubocop (1.68.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -357,7 +360,7 @@ GEM
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
rubocop-ast (1.35.0)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
ruby_parser (3.21.1)
Expand All @@ -374,15 +377,15 @@ GEM
sprockets-rails
tilt
select2-rails (4.0.13)
sexp_processor (4.17.2)
sexp_processor (4.17.3)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.5.2)
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
sshkit (1.23.1)
sshkit (1.23.2)
base64
net-scp (>= 1.1.2)
net-sftp (>= 2.1.2)
Expand All @@ -393,24 +396,24 @@ GEM
railties (>= 6.0.0)
strscan (3.0.1)
temple (0.10.3)
terser (1.2.3)
terser (1.2.4)
execjs (>= 0.3.0, < 3)
thin (1.8.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (1.3.2)
tilt (2.4.0)
time (0.4.0)
time (0.4.1)
date
timeout (0.4.1)
turbo-rails (2.0.9)
timeout (0.4.2)
turbo-rails (2.0.11)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.6.0)
uri (0.13.1)
uri (1.0.1)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand Down
7 changes: 4 additions & 3 deletions app/assets/javascripts/bp_visualize.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
jQuery(document).trigger("visualize_tab_change", [{tabType: tabId}]);
}

function isNotEmpty(arr) {
return Array.isArray(arr) && arr.length > 0;
function isMultiple(arr) {
return Array.isArray(arr) && arr.length > 1;
}

// Only show BioMixer when tab is clicked
Expand All @@ -105,7 +105,8 @@
objecttypes: 'class'
};

if (isNotEmpty(jQuery(document).data().bp.ont_viewer.submission_lang)) {
// if submission_lang.length == 1, don't set the language
if (isMultiple(jQuery(document).data().bp.ont_viewer.submission_lang)) {
extraParams["lang"] = jQuery(document).data().bp.ont_viewer.lang;
}

Expand Down
Loading