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

Feature: Distinguish reused terms in tree view #650

Merged
Merged
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
e9839ed
Fix: Annotator fast context special chars issues & statistics page sy…
Bilelkihal Apr 4, 2024
06a73eb
Feature: Add json button to search page (#562)
Bilelkihal Apr 5, 2024
0e57aaa
Feature: Adding Content Finder Page (#511)
imadbourouche Apr 7, 2024
8d38f6d
Feature: Add ontology concepts exporters to diffrent formats (xml, nt…
imadbourouche Apr 7, 2024
1e5332e
Feature: update admin page UI to use vertical tabs (#566)
syphax-bouazzouni Apr 9, 2024
b18f6a1
Feature: Add indexation admin page (#567)
syphax-bouazzouni Apr 9, 2024
067bb7e
Feature: Update search input in homepage and topnav to use the indexe…
syphax-bouazzouni Apr 10, 2024
11f9fe1
Feature: Improve Browse page performance (#572)
syphax-bouazzouni Apr 10, 2024
4b85d9b
Feature: Add OntoPortal tools age (#559)
syphax-bouazzouni Apr 11, 2024
44bb10b
Feature: Add concepts mappings button in search page results (#569)
Bilelkihal Apr 11, 2024
7dfbefc
Feature: Add search bars for the instances, properties, collections a…
syphax-bouazzouni Apr 11, 2024
2f7f453
Feature: Update concept mappings table style (#574)
Bilelkihal Apr 12, 2024
7f26a68
Fix: submission date and summary not ready (#576)
syphax-bouazzouni Apr 15, 2024
b7837a7
Feature: Improve browse page search ranking and performance (#575)
syphax-bouazzouni Apr 15, 2024
3937498
Feature: Add terms and conditions to signup and footer links (#579)
Bilelkihal Apr 18, 2024
e68ab1c
Fix: new instance search feature to filter strictly only NamedIndivid…
syphax-bouazzouni Apr 19, 2024
cbbbdd5
Feature: Dynamic routes for ontologies content dereferencement (#568)
imadbourouche Apr 21, 2024
6707357
Feature: Update mappings page (#538)
Bilelkihal Apr 22, 2024
d643bba
fix search page results broken links (#583)
Bilelkihal Apr 22, 2024
285b28e
Fix: admin delete submission route (#585)
Bilelkihal Apr 22, 2024
e6e8146
Fix: Restore the new sample text of the annotator and recommender (#593)
Bilelkihal Apr 25, 2024
83da8be
Fix: search results selected language (#595)
Bilelkihal Apr 25, 2024
c3ea67c
Fix: new instance details page, properties selected property display …
syphax-bouazzouni Apr 25, 2024
cc058df
Feature: add a script to import or export CSV of the i18n locals (#597)
syphax-bouazzouni Apr 26, 2024
2360d29
Fix: Remove duplicated ontology scheme rows (#584)
Bilelkihal Apr 26, 2024
b4eb6e0
fix: summary page for ontologies with no submissions
syphax-bouazzouni Apr 26, 2024
08d5b86
Fix: Note thread show action (#606)
syphax-bouazzouni Apr 29, 2024
8f209f9
Fix: user reset password internationalisation issue (#605)
syphax-bouazzouni Apr 29, 2024
5de66c7
fix: trim the copied text in the clipboard stimulus controller (#611)
imadbourouche May 2, 2024
1fdc64f
Feature: Add recommender system tests (#599)
Bilelkihal May 8, 2024
96cb0a0
Feature: add htaccess URIs redirection modal help (#580)
imadbourouche May 13, 2024
c82e4e6
Fix: Release 2.8.0 grouped issues - Summary, Concept, Notes, Mappings…
Bilelkihal May 20, 2024
6d27190
fix data tables warning issue (#624)
Bilelkihal May 21, 2024
d42baf1
Merge branch 'master' into development
syphax-bouazzouni May 22, 2024
fe7ab71
fix: home annotator block redirection to annotator page with empty te…
Bilelkihal May 24, 2024
53eda37
Fix: Download button in summary export metadata (#628)
Bilelkihal May 27, 2024
4086c2d
Fix: the contexual json icon for to the concept adapt to the select …
SirineMhedhbi May 28, 2024
4da19bd
feature: make view of clickable in summary page header (#643)
Bilelkihal May 30, 2024
8da2788
feature: use the ontologies selector by name and acronym in edit grou…
Bilelkihal May 30, 2024
18c11eb
Fix: Reject the current ontology from appearing in the ontologies sel…
Bilelkihal May 31, 2024
81ee996
Feature: Make text area resisable in upload ontology and edit submiss…
Bilelkihal May 31, 2024
19c73fe
Fix: The issue when the agent has no acronym (#645)
Bilelkihal May 31, 2024
a99d45f
fix: the concepts chips links redirecting to the wrong destination (…
Bilelkihal Jun 3, 2024
d93aec0
Feature: Scroll to the selected term in the tree view component (#646)
Bilelkihal Jun 3, 2024
98ce84b
get ontology uri pattern and pass it to the tree link component
Bilelkihal Jun 4, 2024
9efb36c
add the reusing icon infront of the reused concepts in the tree view
Bilelkihal Jun 4, 2024
baad51c
use css class instead of an id for the tree view reuse icon
Bilelkihal Jun 4, 2024
f632e46
remove duplicated submission regex pattern call in concepts controlle…
Bilelkihal Jun 4, 2024
017ab50
refactor tree view reused terms code
Bilelkihal Jun 5, 2024
fbf0123
extract tree view css classes to a separate file
Bilelkihal Jun 5, 2024
ad84dfc
use ruby regex checking instead of include for the tree reused terms
Bilelkihal Jun 5, 2024
412cd69
fix: change local test "URL" to "URI" in check resolvability componen…
imadbourouche Jun 5, 2024
6c20638
Feature: Add content negotiation redirection tests (#622)
imadbourouche Jun 6, 2024
af5fc5b
Feature: add Annotator UI tests (#627)
Bilelkihal Jun 6, 2024
9c3d761
Fix: multiple highlighted terms in concepts date view (#657)
Bilelkihal Jun 6, 2024
86eb221
Fix: concept details table layout max-with when long strings (#649)
Bilelkihal Jun 6, 2024
525e422
Feature: Clean no more used gems and code (#658)
syphax-bouazzouni Jun 7, 2024
68a0b60
distinguish reused properties in the tree view
Bilelkihal Jun 7, 2024
47af2da
handle the case reset_agents in edit submissions error state are alre…
syphax-bouazzouni Jun 7, 2024
c118f2e
Feature: Add issues and requests link to the footer and feedback form…
Bilelkihal Jun 9, 2024
9ffbeea
Fix: the width of the ontlogy viewer left block of classes, instances…
Bilelkihal Jun 10, 2024
a855c34
use preferredNamespaceUri to distinguish reused terms in the tree vie…
Bilelkihal Jun 10, 2024
61bb450
use preferredNamespaceUri to distinguish reused properties in the tre…
Bilelkihal Jun 10, 2024
3d975f0
distinguish reuses for instances tree
Bilelkihal Jun 11, 2024
d7f090b
Merge branch 'development' into feature/distinguish-reused-terms-in-t…
syphax-bouazzouni Jun 11, 2024
fd82700
clean terms reuses code
Bilelkihal Jun 11, 2024
b707449
extract is_reused to a separate function in components helper
Bilelkihal Jun 11, 2024
c595d87
add concepts reuses to the date view
Bilelkihal Jun 11, 2024
41b6379
pass submission directly instead of ontology_uri_pattern
Bilelkihal Jun 11, 2024
e1aab7a
pass direcly the submission instead of passing by a function in terms…
Bilelkihal Jun 11, 2024
a5cbcb4
Clean terms reuses concern code
Bilelkihal Jun 11, 2024
d1252c8
add reuses to schemes tree
Bilelkihal Jun 11, 2024
4eef76e
add reuses to schemes tree when we perform a search
Bilelkihal Jun 11, 2024
678c94e
add reuses for collections tree
Bilelkihal Jun 11, 2024
d8b24f7
add reuses to properties tree when we perform a search
Bilelkihal Jun 11, 2024
286f3c8
add reuses for concepts list view
Bilelkihal Jun 11, 2024
788a370
Merge branch 'development' into feature/distinguish-reused-terms-in-t…
Bilelkihal Jun 20, 2024
9205693
Clean terms reuses code
Bilelkihal Jun 20, 2024
6909137
extract submission variable form the concept date render helper
syphax-bouazzouni Jun 21, 2024
39ec336
remove binding.pry comments left in the code
syphax-bouazzouni Jun 21, 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
Prev Previous commit
Next Next commit
Fix: the contexual json icon for to the concept adapt to the select t…
…ab (#539)

* refactor concepts json code and put it in a stimulus controller

* adjust the position of the concepts json link

* remove non related code to concepts json PR

* remove non related code to contextual json pull request

* pass base class URL directly to concepts json stimulus controller

* clean concepts json stimulus code

* remove undesired code from concepts json button PR

* fix typo in agent_search_input_component.html.haml

* rename concepts json button stimulus controller

* clean concepts json button controller code

* clean concepts json button related code

---------

Co-authored-by: Syphax bouazzouni <[email protected]>
Co-authored-by: Bilel KIHAL <[email protected]>
Co-authored-by: @SirineMhedhbi
3 people authored May 28, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 4086c2dd26efd3e0b122febfeebfd31d9600a4ed
5 changes: 5 additions & 0 deletions app/assets/stylesheets/concepts.scss
Original file line number Diff line number Diff line change
@@ -160,4 +160,9 @@ div.synonym-change-request button {

.concepts-mapping-count .d-flex{
display: inline !important;
}

#concepts_json_link{
margin-top: -4px;
margin-right: 5px;
}
Original file line number Diff line number Diff line change
@@ -8,4 +8,4 @@
%p.search-element.home-searched-ontology
NAME (IDENTIFIERS)
%p.home-result-type
TYPE
TYPE
7 changes: 4 additions & 3 deletions app/components/tab_item_component.rb
Original file line number Diff line number Diff line change
@@ -4,13 +4,14 @@ class TabItemComponent < ViewComponent::Base

include ActionView::Helpers::UrlHelper

def initialize(id: nil, title: nil, path: nil, page_name: '', selected: false)
def initialize(id: nil, title: nil, path: nil, page_name: '', selected: false, json_link: nil)
super
@id = id
@title = title
@path = path
@page_name = page_name
@selected = selected
@json_link = json_link
end

def selected_item?
@@ -44,9 +45,9 @@ def page_name

def call
if title && !title.empty?
link_to(title, @path, id: "#{item_id}_tab", class: "#{active_class} tab-link")
link_to(title, @path, id: "#{item_id}_tab", class: "#{active_class} tab-link", 'data-json-link': @json_link)
else
link_to(@path, id: "#{item_id}_tab", class: "#{active_class} tab-link") do
link_to(@path, id: "#{item_id}_tab", class: "#{active_class} tab-link", 'data-json-link': @json_link) do
content
end
end
1 change: 1 addition & 0 deletions app/controllers/annotator_controller.rb
Original file line number Diff line number Diff line change
@@ -201,6 +201,7 @@ def empty_advanced_options
params[:fast_context].nil? &&
params[:lemmatize].nil?
end


def remove_special_chars(input)
regex = /^[a-zA-Z0-9\s]*$/
19 changes: 19 additions & 0 deletions app/javascript/controllers/concepts_json_button_controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import {Controller} from "@hotwired/stimulus"

export default class extends Controller {
static targets = ['button']

update(){
setTimeout(() => {
const tabsList = this.element.querySelectorAll('.nav-item');
const jsonLink = Array.from(tabsList).find(tab => tab.classList.contains('active'))?.querySelector('a').getAttribute('data-json-link');
const conceptsJsonLink = this.buttonTarget.querySelector('a');
if (jsonLink) {
conceptsJsonLink.href = jsonLink;
conceptsJsonLink.style.display = 'flex'
} else {
conceptsJsonLink.style.display = 'none'
}
}, 1);
}
}
5 changes: 4 additions & 1 deletion app/javascript/controllers/index.js
Original file line number Diff line number Diff line change
@@ -102,4 +102,7 @@ application.register("ontologies-selector", OntologiesSelector)


import MappingsController from "./mappings_visualization_controller"
application.register('mappings', MappingsController)
application.register('mappings', MappingsController)

import ConceptsJsonButtonController from "./concepts_json_button_controller.js"
application.register('concepts-json', ConceptsJsonButtonController)
112 changes: 56 additions & 56 deletions app/views/concepts/_show.html.haml
Original file line number Diff line number Diff line change
@@ -3,72 +3,72 @@
= render Display::AlertComponent.new do
= t('concepts.use_jump_to')
- else
= render TabsContainerComponent.new(type:'outline') do |c|
%div{'data-controller': 'concepts-json', 'data-action': 'click->concepts-json#update'}
= render TabsContainerComponent.new(type:'outline') do |c|
- c.pinned_right do
- if $PURL_ENABLED
%div.mx-1
= link_to("#classPermalinkModal", class: "class-permalink nav-link", title: t('concepts.permanent_link_class'), aria: {label: t('concepts.permanent_link_class')}, data: {toggle: "modal", current_purl: "#{@current_purl}"}) do
%i{class: "fas fa-link", aria: {hidden: "true"}}
%div{'data-concepts-json-target': 'button'}
= render RoundedButtonComponent.new(link: "#{@ontology.id}/classes/#{escape(@concept.id)}?display=all&apikey=#{get_apikey}", target:'_blank')
- apikey = "apikey=#{get_apikey}"
- baseClassUrl = "#{@ontology.id}/classes/#{escape(@concept.id)}"
- c.item(title: t('concepts.details'), path: '#details', selected: true, json_link: "#{baseClassUrl}?#{apikey}&display=all")

- c.pinned_right do
- if $PURL_ENABLED
%div.mx-1
= link_to("#classPermalinkModal", class: "class-permalink nav-link", title: t('concepts.permanent_link_class'), aria: {label: t('concepts.permanent_link_class')}, data: {toggle: "modal", current_purl: "#{@current_purl}"}) do
%i{class: "fas fa-link", aria: {hidden: "true"}}
%div
= render RoundedButtonComponent.new(link: "#{@ontology.id}/classes/#{escape(@concept.id)}?display=all&apikey=#{get_apikey}", target:'_blank')
- unless skos?
- c.item(id: 'instances', path: '#instances', json_link: "#{baseClassUrl}/instances?#{apikey}") do
= t('concepts.instances')
(
%span#concept_instances_sorted_list_count
)

- c.item(title: t('concepts.details'), path: '#details', selected: true)
- c.item(title: t('concepts.visualization'), path: '#visualization')

- unless skos?
- c.item(id: 'instances', path: '#instances') do
= t('concepts.instances')
(
%span#concept_instances_sorted_list_count
)
- c.item(id: 'notes', path: '#notes', json_link: "#{baseClassUrl}/notes?#{apikey}") do
= t('concepts.notes')
%span#note_count_wrapper
(
%span#note_count= @notes.length
)
- c.item(id: 'mappings', path: '#mappings', json_link: "#{baseClassUrl}/mappings?#{apikey}") do
.d-flex
#{t('concepts.mappings')}
(
= concept_mappings_loader(ontology_acronym: @ontology.acronym, concept_id: @concept.id)
)

- c.item(title: t('concepts.visualization'), path: '#visualization')
- if @enable_ontolobridge
- c.item(title: t('concepts.new_term_requests'), path: '#request_term')

- c.item(id: 'notes', path: '#notes') do
= t('concepts.notes')
%span#note_count_wrapper
(
%span#note_count= @notes.length
)
- c.item(id: 'mappings', path: '#mappings') do
.d-flex
#{t('concepts.mappings')}
(
= concept_mappings_loader(ontology_acronym: @ontology.acronym, concept_id: @concept.id)
)

- if @enable_ontolobridge
- c.item(title: t('concepts.new_term_requests'), path: '#request_term')

- c.item_content do
= render :partial =>'/concepts/details'

- unless skos?
- c.item_content do
= render :partial =>'instances/instances' , locals: {id: "class-instances-data-table"}
- c.item_content do
= render :partial =>'/concepts/biomixer'
= render :partial =>'/concepts/details'

- c.item_content do
= render :partial =>'/notes/list'
- unless skos?
- c.item_content do
= render :partial =>'instances/instances' , locals: {id: "class-instances-data-table"}
- c.item_content do
= render :partial =>'/concepts/biomixer'

- c.item_content do
= render TurboFrameComponent.new(id:'concept_mappings',
src:"/ajax/mappings/get_concept_table?ontologyid=#{@ontology.acronym}&conceptid=#{CGI.escape(@concept.id)}")
- c.item_content do
= render :partial =>'/notes/list'

- if @enable_ontolobridge
- c.item_content do
= render :partial =>'/concepts/request_term'
= render TurboFrameComponent.new(id:'concept_mappings',
src:"/ajax/mappings/get_concept_table?ontologyid=#{@ontology.acronym}&conceptid=#{CGI.escape(@concept.id)}")

:javascript
jQuery(document).ready(function(){
- if @enable_ontolobridge
- c.item_content do
= render :partial =>'/concepts/request_term'

jQuery("#classPermalinkModal").on("shown.bs.modal", function (e) {
var currentPurl = jQuery("a.class-permalink").data("current-purl");
jQuery("#purl_input").val(currentPurl);
})
:javascript
jQuery(document).ready(function(){
jQuery("#classPermalinkModal").on("shown.bs.modal", function (e) {
var currentPurl = jQuery("a.class-permalink").data("current-purl");
jQuery("#purl_input").val(currentPurl);
})

jQuery("#purl_input").on("click", function () {
jQuery(this).select();
});
});
jQuery("#purl_input").on("click", function () {
jQuery(this).select();
});
});
1 change: 1 addition & 0 deletions config/bioportal_config_env.rb.sample
Original file line number Diff line number Diff line change
@@ -307,3 +307,4 @@ if $HOSTNAME
require_relative "bioportal_config_development_#{$HOSTNAME}"
end
end