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

Conversation

Bilelkihal
Copy link
Collaborator

@Bilelkihal Bilelkihal commented Jun 4, 2024

Related issue:
#62

Screenshot:
Capture d’écran 2024-06-04 à 17 12 16
Capture d’écran 2024-06-07 à 10 11 20

Bilelkihal and others added 30 commits April 5, 2024 11:04
…ntax error (#561)

* fix statistics page syntax error

* update ontoportal instances home section title

* fix fast context option in annotator page

* remove special chars from annotator's input on submit to avoid errors
* add json button ui to search page

* extract json_link method from annotator controller to application controller

* build the search page json link using json_link method

* move the search json button down besides the advanced options button

* remove this usage of api_params instead of direct params in search controller

---------

Co-authored-by: Syphax Bouazzouni <[email protected]>
* Adding Content Finder Page

* use ontologies selector instead of the url input

* Change the controller to add use the accept headers

- use the Net::HTTP instead of Linked::Client::HTTP to use the accept header

* use ontologies selector in the content finder page

* use the rest_url helper instead of the global variable REST_URI

* remove content finder link from the topnav

* close the array items in navitems method that causes an error

* use Faraday instead of Net::HTTP

* Remove result in content_finder_controller and use this.element.textContent

* use this.contentTarget.textContent instead element in the content finder

* Add html view using the concept details component

* use tool layout for the content finder page

---------

Co-authored-by: Syphax Bouazzouni <[email protected]>
…riples, turtle) (#547)

* add feature to display resouce content in different formats

* Add download and copy buttons to the raw data section

* Add css to highlight the content of turtle and ntriples

* Add the copy functionality to the resource raw data

for formts: json, xml, ntriples and turtle

* Remove the clipboard component and change the HTML title to Raw Data

* Add clipboard component to the resource-content

* Use Net::HTTP instead of Linked::Client::HTTP to include accept header

* Add the content formats for instances and Properties

* Remove copy_concept_content method in clipboard component

* Use the highlight-js in the metadata controller and remove content_finder_controller

* Remove code duplication for content formats

- add content_formats method in application helper and use it for concepts, properties and instances

* Remove content finder controller from index.js

* Small fix: remove a condition in metadata_downloader

* Add content_formats method to ontologies_helper and remove it from application_helper

* Use Faraday instead of Net::HTTP

* Add helpers for content finder controller

* change content finder route to /ontologies/:acronym/:id/serialize/:output_format

* Add concept details component to schemes and collections and fix code

* rename the metadata downloader controller  and remove the result value

* update the concept formats tab UI to use icons and open in modal

* update the content finder page code to re-use concept format code

* update the content formats icons to use the primary color of the portal

* extract commun code in content finder and concept formats in a concern

* extract rdf highlighter component from concept format and content finder

* rename the concept formats file and action to content_serlizer

* in content finder don't call the backend serializer if format is html

* fix the content finder container width

* clean unused css code for the content finder

* extract link_to_format_modal function in the concept details component

* abstract the usage of a highlighter from the dependency  highlight.js

* update instance details page to use the concept details component

---------

Co-authored-by: Syphax bouazzouni <[email protected]>
* create vertical_tabs component

* use the vertical tabs component in the admin page

* enable sort in the users admin table

* fix the padding and marging  of the metadata administration page

* fix analytics admin page locals

* fix an error in table component after rebasing the branch

* remove an unused file

* remove the paths escaping in the actions of  user admin table

* add again the link to API for the users admin page

* implement for the vertical tabs  the option to save the selected tab
* create vertical_tabs component

* use the vertical tabs component in the admin page

* add search admin page

* translate the admin search tab to french

* create number_input helper for Input::NumberComponent

* make the regular button hide the loading state after request processed

* remove an unused file

* translate the search admin page to french and english
…d content (#505)

* fix styling warning of flex "end" deperection

* fix search input text overflowing out of the container

* add  search content by rdfs label in additoon of skos prefLabel

* implement search redirection to the good page

* use ontologies_content_autocomplete helper in homepage and topnav

* add the search ontology content route

* clean unused agent search code from this branch

* move the code in search helper to a concern

* re-integrate  search input loader code to show a loader while searching
* optimize fetched  attributes in the browse page in API mode

* update ontologies browse to use API or Index

* add cache for the fair_score and submission endpoint

* internationalize a sentence in the browse and ontologies selector  views

* fix browse hasFormality and isOfType filters

* prfioritize API filtring  over the index in the browse page

* fix a bug with edit submission returning nil error on submission
* add tools page

* extract search input in the search page to re-use in url checker tool

* internationlize the tools page

* add tools link to the footer

* fix the tools page block widths

* add top padding to tools cards
* add mappings to concepts search results

* fix mapping count in concept page

* add new more from this ontology icon

* move concept_mappings_loader function to mappings helper

* remove indesired comment from _concept_mappings.html.haml file

* put url escape functions in a separate helper
…nd schemes pages (#550)

* remove forgotten binding.pry's  from the code

* add the option to the tree link component to open in modals

* add type value to properties show view

* create paginated search list helpers

* update instances UI and add search bar

* add a search bar to the properties show page

* add a search bar for the collections show page

* implement a search bar  for the  schemes show page

* add search icon to the concepts search box

* fix a typo in the search content concerns

* move _instace_details file to _details

* remove top padding from the search bar in  properties and instances tree

* implement selected in the paginated_list_component

* use link_last_part in the tree link component to get the label from id

* prioritize the label from the id in the ontology search content

* remvoe top padding from search bar in the schemes and collection tree

* translate missing word in the properties details view

* clean the ontologies routes by defining a scope a removing duplicates

* remove agent code not relevant in this branch

* fix left padding of collections, schemes and properties views

* fix  tree autoclicking for collections, instances and schemes

* move the html rendering from the search concern to helper

* fix tests after changing the routes

* translate missing words in the new ontologies section search bars

* remove no more used instances js code
* fix search page search button style

* fix search page json button style

* update concepts mappings table style

* add back chip button overflow wraping in concepts mappings table
* fix the copy of creation date on new submission

* fix ontology viewer to hidde the data sections if any submission ready

* prevent infinite redirection in the ontology controller show action
* enhance the ontology search input to include ontology names

* fix new instances of page rendering

* add browse page search ranking if API mode

* include  views by default to be cached and filter them by request after

* remove no more used instances of controller and helpers code
* put terms and conditions check box in register page in french and english

* add terms and conditions link to the config file

* make the acceptation of the terms and conditions required for user registration

* update the style of the register form errors

* add terms and conditions links to the footer

* add terms_and_conditions to login_flows_test

* fix login flow integration test after adding terms and conditions

* clean the config sample file

---------

Co-authored-by: Syphax bouazzouni <[email protected]>
…ual (#581)

* fix the paginated list selected value ti not select on each new page

* fix instance search type filter to not include everything
* Add uri redirection for /ontologies/:acronym/:id to the appropriate page

* small fixes: remove binding.pry and return resource_id in find_type_by_search

* Add copy agroportal link functionality

- this functionality is using the ClipboardComponent because it works the same but differ only in the content and icon
- the clipboard component has been changed to accept title and icon

* redirect to content finder page when no type is valid

* Updated route to use redirect action instead of show_redirection

* Use default icon and title arguments in the Clipboard Component

* rename and internationalize clipboard component titles

* small fix: remove % from svg icon

* Add the copy title to the components section in en.yml and fr.yml

* Show the generated uri when user hover over the copy link icon

* Make the dynamic route content negotiable

- based on the accept header we will
  - if "text/html" we will redirect to the agroportal page
  - else we will call the api and get the content serialized in the format specified and return it

* update serialize content to return accept_header

* translate copy_original_uri and copy_portal_uri to french

* reuse search content concern in uri redirection concern

* remove duplicate link_last_part method

* update the ontology redirection action to use ontology URI if resource_id nil

* update the content serializer to translate ntriples to an html table if asked for html format

* in the ontology redirection by default redirect to content finder with in html format

* remove the ":" from the copy the portal URI tooltip text

* change the order of the icons in the link_with_action  component

---------

Co-authored-by: Syphax bouazzouni <[email protected]>
* install D3 js and display a sample of ontology mappings bubbles

* add zoom feature for mappings bubble view

* fix bubble view style in mappings page

* fix a scss selector in the annotator css that affects all a tags

* mappings page layout

* add ontologies select in mappings page

* add upload new mappings in mappings page

* add mappings table turbo frame

* display the table view for ontology mappings

* fix turbo frame issue in mappings page

* Make the modal work in mappings table

* improve mappings table view style

* make mappings bubbles grow in a log way instead of a linear way

* Highlighting mappings for the selected bubble

* enable bubble deselection in mappings page

* disable non highlighted bubbles in mappings page

* show mappings page bubbles mappings in modal

* make mappings page bubbles modal show correct values

* customize mappings page bubbles tooltip

* Link the table and the bubble view in mappings page

* show highlighted bubbles with a gradient color related to the number of mappings

* upload mappings in a separate tab

* add concepts mappings to search page results

* fix upload mappings tab style

* display ontologies in ontologies selector

* finalize ontologies selector design

* put ontologies selector in the modal component

* fix ontologies result display in ontologies selector

* Make ontologies selector search bar work

* show ontologies results count in ontologies selector

* make groups filter work in ontologies selector

* make filter by categories work in ontologies selector

* add ontologies selector loading animation

* make submission related filters work for ontologies selector

* make select all work in ontologies selector

* make retired ontologies and views filters work in ontologies selector

* show tab selected checks count in ontologies selector

* Add loading animation to ontologies selector

* make ontology selection work in ontologies selector

* make ontologies selector component

* remove duplicated cross icon in ontologies selector

* replace use cases of the old ontologies selector

* convert ontologies selector ui component into a helper

* replace 'selector' by 'ontologies_selector' in ontologies controller

* enhance mapping page ontologies filtring style

* add search page mappings count

* add mappings bubble view to the ontology details page

* make upload mappings work in mapping page

* change seach results more ontologies button icon

* fix concepts table mappings count

* add a loading animation to the mappings bubble view

* extract mappings page tab sections into partials

* add internationalization to mappings page

* clean mappings bubble view code

* give more significant name for mappings ontologies table route

* Clean mappings controller code

* remove mappings search page part from main mappings PR

* update new mapping form style

* fix mappings section style and add search to its table in summary page

* fix create new mapping for concept issue

* fix upload mappings example style issue

* update mappings ontologies table style

* update the style the search filter of mappings table in mappings tab section

* fix mappings bubble view modal link value

* replace var by let in mappings visu stimulus controller

* make hard coded mappings-bubble-view id by a dynamic

* remove undesired #getLastPartOfUrl function from mappings vizu stimulus controller

* extract #init_mappings_section_bubble_view() to a separate function in mappings visu  stimulus controller

* Add a default value for zoomRatio stimulus value in mappings visu controller

* Add a default value for type stimulus value in mappings visu controller

* refactor submit function in mappings visu stimulus controller

* refactor select bubble method in mappings visu stimulus controller

* put center_scroll method inside draw bubble method to not repeat code in mappings visu stimulus controller

* refactor normalization ration function in mappings visu stimulus controller

* use a better comprehensive helper for the empty modal in mappings page

* add a legend for mappings bubble view

* add back external mappings to mappings table view, and clean visu stimulus controller

* move rest_url function to application_helper to be used by views

* set table container box-sizing to not overflow if padding set

* remove the new created to mappings actions and use the count action

* remove the no more used loader action

* move some mappings helpers and remove unused ones

* use component helpers instead calling render & use reveal component

* remove no more used partials in mappings

* refactor and clean the mappings stimulus controller

* extract from mappings stimulus the drawBubble logic in a file

* fix mappings bubble view legend (bubble size)
* add back admin routes to fix delete submission

* remove admin duplicated routes
* restore the new sample text of the annotator and recommender

* add french translation for annotator and recommender sample text
* add language param to search results links

* use helpers.request_lang instead of passing lang variable in search aggregator

* make the selection of the closest preflabel to the query case unsensitive
…and browse page ontology type filter (#596)

* fix the auto selection of isOfType filter on browse page

* fix search properties redirection to use propertyid not instanceid

* fix admin ontologies visits sorting

* fix ontologies browse page to show ontologies with no submissions

* fix the sort by dates order in browse page

* add apikey to the fairness cache key

* show in the search box result "ontology view" for views
* remove duplicated ontology scheme rows

* move the concept details row duplication logic to filter_properties function

* clean concept details component code

* reject bottom set keys from leftover in concepts details component

* fix skos-xl not been displayed in the raw data section
* Fix undefined method error

Resolves #308

* escape username when creating an ontology subscribtion

* fix missing roots message for nil classes

---------

Co-authored-by: Jennifer Vendetti <[email protected]>
* fix user reset password internationalisation issue

* get user info in reset password

* fix card message component image
* install Webmock gem

* setup recommender page test

* mock recommender api results in recommender system test

* add test edit text area and submit in recommender test

* disable webmock after the test ends in recommender test

* make add comment/proposal buttons smaller

* remove non related code to recommender tests PR

* put the a correct recommendations fixture

* check the number of results in recommender test

* check the number of the highlighted annotations in recommender test

* Disable webmock before each test to insure the non mocking of the different requests

* use dynamic host and apikey in recommender webmocking
app/controllers/concerns/terms_reuses.rb Outdated Show resolved Hide resolved
app/helpers/components_helper.rb Outdated Show resolved Hide resolved
app/helpers/components_helper.rb Outdated Show resolved Hide resolved
@Bilelkihal Bilelkihal force-pushed the feature/distinguish-reused-terms-in-tree-view branch from fe39faa to a5cbcb4 Compare June 11, 2024 16:08
@syphax-bouazzouni syphax-bouazzouni merged commit 2dba7fd into development Jun 21, 2024
4 checks passed
Bilelkihal added a commit that referenced this pull request Jun 21, 2024
* fix: home annotator block redirection to annotator page with empty text (#629)

* Fix: Download button in summary export metadata (#628)

* fix xml download button in summary page, export metadata

* adjust the position of the export metadata download button and make the hover cursor pointer for it

* Fix: the contexual json icon  for to the concept adapt to the select tab (#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

* feature: make view of clickable in summary page header (#643)

* feature: use the ontologies selector by name and acronym in edit groups and categories (#641)

* Fix: Reject the current ontology from appearing in the ontologies selector in editing the submission's relations (#640)

* reject current ontology from the ontologies selector in relations section - edit submission

* pass reject ontology as a param in generate ontology seect input method

* Feature: Make text area resisable in upload ontology and edit submission forms (#644)

* make text areas resisable in upload ontology and edit submission forms

* make forms list input text areas resisable

* Fix: The issue when the agent has no acronym (#645)

* fix the issue when the agent has no acronym

* clean agent affiliations combination

* fix: the concepts chips links redirecting to the wrong destination  (#638)

* Feature: Scroll to the selected term in the tree view  component (#646)

* scroll to the selected term in the tree view

* prevent the whole page scrolling when centring the scroll to the selected tree view element

* fix: change local test "URL" to "URI" in check resolvability components (#651)

* Feature: Add content negotiation redirection tests (#622)

* Add uri redirection for /ontologies/:acronym/:id to the appropriate page

* small fixes: remove binding.pry and return resource_id in find_type_by_search

* Add copy agroportal link functionality

- this functionality is using the ClipboardComponent because it works the same but differ only in the content and icon
- the clipboard component has been changed to accept title and icon

* redirect to content finder page when no type is valid

* Updated route to use redirect action instead of show_redirection

* Use default icon and title arguments in the Clipboard Component

* rename and internationalize clipboard component titles

* small fix: remove % from svg icon

* Add the copy title to the components section in en.yml and fr.yml

* Show the generated uri when user hover over the copy link icon

* Make the dynamic route content negotiable

- based on the accept header we will
  - if "text/html" we will redirect to the agroportal page
  - else we will call the api and get the content serialized in the format specified and return it

* update serialize content to return accept_header

* translate copy_original_uri and copy_portal_uri to french

* reuse search content concern in uri redirection concern

* remove duplicate link_last_part method

* Add htaccess functionality

* Add apache and nginx instruction for htaccess redirection

* Clean te code in the view file

* Add OntologiesRedirectionController

- remove redirect and generate_htaccess from ontologies_controller
- clean code the generate_htaccess method
- add "ontology_portal_uri" in @Identifiers

* Regroupe routes

* Make ontologies_redirection controller and refactor generate_htaccess code

* Internationalization of redirection rewrite rules modal

* Add note for url that has #

* link contact support button to the feedback page

* Change regex to redirect only url of type: /path/resource_id

- for urls that has the # it will redirect to the ontology page

* Add ontology redirection based on the accept header format

* move the ontology redirection route to the bottom to have less priority

* Change rewrite rules note using alert component

* Add /ontologies/ACRONYM/download?format=FORMAT route

* ontology redirection  based on the accept header using /ontologies/acronym/download route

* Add redirect assertion in ontologies controller test

* Fix content serialization when calling /ontologies/:acronym/:id

* create private function for accept header and remove ontology redirection

* remove generate_rewrite_rules function

* remove redirect assertion in ontologies controller test

* change htaccess route to /ontologies/:acronym/htaccess

* fix copy internal links in LinkFieldComponent

* add raw to copy internal links in identifiers card

* return all response and add text/n3 format in content serializer

* escape id when redirecting to content_finder

* choose the right result from the results of search content

* add algorithm to choose the right accept header, not_acceptable if no format valid

* add an additional security to the uri redirection to have an exact match

* make the check resolvability icon clickable & redirect to the tool page

* make the check resolvability extend to accept equivalent formats

* move the redirection function from ontologies_controller to uri concern

* fix check_resolvability_tool to redirect to the full url not only the path

- the problem was because everytime it is redirecting to the uri.path and uri.path does not include the ?format parameter
- add the octet-stream accept header in the accepted format for xml

* add reference to the url of the original file when format not acceptable

* put again the resolvability timeout to 5 secondes

* setup content negotiation and redirection tests

* remove redirection when request ontology with format

- the redirection is removed when request ontology in any format, by making request to the api and forward the result

* add ids to the resource format icons and modal

* assert the content type for html and json

- the xml and csv is returning 500 internal server error from the api, but it's working locally

* refactor content_redirection tests

- still not completed

* add multiple response status for ontology xml and csv format

* add test for the content format of the resource

* add turtle format based on hasOntologySyntax field

* assert success and not_acceptable in turtle format

it depends on hasOntologySyntax

* add NTriples format for ontologies based on hasOntologySyntax field

* test content negotiation for ontology resources

* fix redirection url for resource html format

* fix ontologies controller test indentation

* assert redirection location in resource html format

* update the admin user  creation in tests possible only  by an admin now

---------

Co-authored-by: Syphax bouazzouni <[email protected]>

* Feature: add Annotator UI tests (#627)

* setup annotator page UI tests

* check if all the inputs and filters are present in annotator page test

* add annotator http requests to test fixtures

* test annotator results and count them

* test annotator empty illustration

* add comments in annotator page tests

* use dynamic api in recommender tests

* test that we have the exact correct annotations in the annotator test

* undo adding ids for elements to run annotator tests

* add a default ANNOTATOR_URL value for test config

---------

Co-authored-by: Syphax bouazzouni <[email protected]>

* Fix: multiple highlighted terms in concepts date view (#657)

* Fix multiple highlighted terms in the date view

* refactor concepts by date method code

* Fix: concept details table layout max-with when long strings (#649)

* fix concepts table layout when we put very long strings

* fix concepts json button position

* use a css class intead of an id for the concepts_json_button

* move concepts_json_button css class from concept details file to concepts file

* remvoe #concepts_json_link unsued style

---------

Co-authored-by: Syphax Bouazzouni <[email protected]>

* Feature: Clean no more used gems  and code (#658)

* remove cube ruby

* remove not used gems and add documentation to the Gemfile

* remove miniprofiler

* remove bpdi resolver and redirect_to_new_api

* remove ajax proxy and no more used helpers

* remove no more used helpers

* handle the case reset_agents in edit submissions error state are already Agents (#663)

* Feature: Add issues and requests link to the footer and feedback form (#665)

* add issues and requests link to the footer and feedback form

* add $GITHUB_ISSUES to sample config file

* Fix a typo in bioportal_config_env.rb.sample

* fix: upload ontology on errors non returned values and no default values (#625)

* move pry gem outside development block in gemfile (#671)

* Feature: Add back slices (#598)

* Add slices section to home page

* Update the design of the slice top notice bar

* fix home slice name styles

* fix slices error on home page, when there are no slices available

* make the annotator support slices

* make browse page compatible with slices

* update home slices section to include the number of ontologies per slice and the description

* make mappings page supports slices

* rearrange home page sections to be in this order: slices, ontoportal instances then collaborations

* remove unnecessary code in submission filter file

* Adjust the slice link to comply with the production URL

* update home page slices section style

* add a description to the home page slice section

* update home page slices section style

* update ontoportal instances and support home sections styles

* change the button of add new slice to suggest a new group/slice in the home page

* update slices descriptive texti in the home page

* add a description for ontoportal instances in the home page

* move home_ontoportal_tooltip to home helper

* add ontoportal links in config file

* remove http from slice link to make it work with https

* add slice notice to lang local files

* remove mappings statistics slices support in the UI cause it's already done in the back

* update ontoportal website links to be upper case

* fix slices https issue

---------

Co-authored-by: Syphax bouazzouni <[email protected]>

* fix docker compose to make local env dev work in port 3000

* Fix: submissions properties selector labels and include ontologies properties (#669)

* add ontologies properties to the submission properties selector

* show submission attributes label instead of the keys in the selector

* make slices open in the same tab not in a new tab

* put the ontoportal instances directly before the logos instead of a tooltip

* Fix: Redirect to the login page when accessing private ontology while being not authenticated (#673)

* Feature: Distinguish reused terms in tree view (#650)

* distinguish reused properties in the tree view

* use preferredNamespaceUri to distinguish reused terms in the tree view if uriRegexPattern is not present

* use preferredNamespaceUri to distinguish reused properties in the tree view

* distinguish reuses for instances tree

* clean terms reuses code

* extract is_reused to a separate function in components helper

* add concepts reuses to the date view

* pass submission directly instead of ontology_uri_pattern

* pass direcly the submission instead of passing by a function in terms reuses

* Clean terms reuses concern code

* add reuses to schemes tree

* add reuses to schemes tree when we perform a search

* add reuses for collections tree

* add reuses to properties tree when we perform a search

* add reuses for concepts list view

* Clean terms reuses code

* extract submission variable form the concept date render  helper

* remove binding.pry comments left in the code

---------

Co-authored-by: Syphax Bouazzouni <[email protected]>

---------

Co-authored-by: Bilel Kihal <[email protected]>
Co-authored-by: SirineMhedhbi <[email protected]>
Co-authored-by: Bilel KIHAL <[email protected]>
Co-authored-by: Imad Bourouche <[email protected]>
syphax-bouazzouni added a commit that referenced this pull request Aug 26, 2024
* fix: home annotator block redirection to annotator page with empty text (#629)

* Fix: Download button in summary export metadata (#628)

* fix xml download button in summary page, export metadata

* adjust the position of the export metadata download button and make the hover cursor pointer for it

* Fix: the contexual json icon  for to the concept adapt to the select tab (#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

* feature: make view of clickable in summary page header (#643)

* feature: use the ontologies selector by name and acronym in edit groups and categories (#641)

* Fix: Reject the current ontology from appearing in the ontologies selector in editing the submission's relations (#640)

* reject current ontology from the ontologies selector in relations section - edit submission

* pass reject ontology as a param in generate ontology seect input method

* Feature: Make text area resisable in upload ontology and edit submission forms (#644)

* make text areas resisable in upload ontology and edit submission forms

* make forms list input text areas resisable

* Fix: The issue when the agent has no acronym (#645)

* fix the issue when the agent has no acronym

* clean agent affiliations combination

* fix: the concepts chips links redirecting to the wrong destination  (#638)

* Feature: Scroll to the selected term in the tree view  component (#646)

* scroll to the selected term in the tree view

* prevent the whole page scrolling when centring the scroll to the selected tree view element

* fix: change local test "URL" to "URI" in check resolvability components (#651)

* Feature: Add content negotiation redirection tests (#622)

* Add uri redirection for /ontologies/:acronym/:id to the appropriate page

* small fixes: remove binding.pry and return resource_id in find_type_by_search

* Add copy agroportal link functionality

- this functionality is using the ClipboardComponent because it works the same but differ only in the content and icon
- the clipboard component has been changed to accept title and icon

* redirect to content finder page when no type is valid

* Updated route to use redirect action instead of show_redirection

* Use default icon and title arguments in the Clipboard Component

* rename and internationalize clipboard component titles

* small fix: remove % from svg icon

* Add the copy title to the components section in en.yml and fr.yml

* Show the generated uri when user hover over the copy link icon

* Make the dynamic route content negotiable

- based on the accept header we will
  - if "text/html" we will redirect to the agroportal page
  - else we will call the api and get the content serialized in the format specified and return it

* update serialize content to return accept_header

* translate copy_original_uri and copy_portal_uri to french

* reuse search content concern in uri redirection concern

* remove duplicate link_last_part method

* Add htaccess functionality

* Add apache and nginx instruction for htaccess redirection

* Clean te code in the view file

* Add OntologiesRedirectionController

- remove redirect and generate_htaccess from ontologies_controller
- clean code the generate_htaccess method
- add "ontology_portal_uri" in @Identifiers

* Regroupe routes

* Make ontologies_redirection controller and refactor generate_htaccess code

* Internationalization of redirection rewrite rules modal

* Add note for url that has #

* link contact support button to the feedback page

* Change regex to redirect only url of type: /path/resource_id

- for urls that has the # it will redirect to the ontology page

* Add ontology redirection based on the accept header format

* move the ontology redirection route to the bottom to have less priority

* Change rewrite rules note using alert component

* Add /ontologies/ACRONYM/download?format=FORMAT route

* ontology redirection  based on the accept header using /ontologies/acronym/download route

* Add redirect assertion in ontologies controller test

* Fix content serialization when calling /ontologies/:acronym/:id

* create private function for accept header and remove ontology redirection

* remove generate_rewrite_rules function

* remove redirect assertion in ontologies controller test

* change htaccess route to /ontologies/:acronym/htaccess

* fix copy internal links in LinkFieldComponent

* add raw to copy internal links in identifiers card

* return all response and add text/n3 format in content serializer

* escape id when redirecting to content_finder

* choose the right result from the results of search content

* add algorithm to choose the right accept header, not_acceptable if no format valid

* add an additional security to the uri redirection to have an exact match

* make the check resolvability icon clickable & redirect to the tool page

* make the check resolvability extend to accept equivalent formats

* move the redirection function from ontologies_controller to uri concern

* fix check_resolvability_tool to redirect to the full url not only the path

- the problem was because everytime it is redirecting to the uri.path and uri.path does not include the ?format parameter
- add the octet-stream accept header in the accepted format for xml

* add reference to the url of the original file when format not acceptable

* put again the resolvability timeout to 5 secondes

* setup content negotiation and redirection tests

* remove redirection when request ontology with format

- the redirection is removed when request ontology in any format, by making request to the api and forward the result

* add ids to the resource format icons and modal

* assert the content type for html and json

- the xml and csv is returning 500 internal server error from the api, but it's working locally

* refactor content_redirection tests

- still not completed

* add multiple response status for ontology xml and csv format

* add test for the content format of the resource

* add turtle format based on hasOntologySyntax field

* assert success and not_acceptable in turtle format

it depends on hasOntologySyntax

* add NTriples format for ontologies based on hasOntologySyntax field

* test content negotiation for ontology resources

* fix redirection url for resource html format

* fix ontologies controller test indentation

* assert redirection location in resource html format

* update the admin user  creation in tests possible only  by an admin now

---------

Co-authored-by: Syphax bouazzouni <[email protected]>

* Feature: add Annotator UI tests (#627)

* setup annotator page UI tests

* check if all the inputs and filters are present in annotator page test

* add annotator http requests to test fixtures

* test annotator results and count them

* test annotator empty illustration

* add comments in annotator page tests

* use dynamic api in recommender tests

* test that we have the exact correct annotations in the annotator test

* undo adding ids for elements to run annotator tests

* add a default ANNOTATOR_URL value for test config

---------

Co-authored-by: Syphax bouazzouni <[email protected]>

* Fix: multiple highlighted terms in concepts date view (#657)

* Fix multiple highlighted terms in the date view

* refactor concepts by date method code

* Fix: concept details table layout max-with when long strings (#649)

* fix concepts table layout when we put very long strings

* fix concepts json button position

* use a css class intead of an id for the concepts_json_button

* move concepts_json_button css class from concept details file to concepts file

* remvoe #concepts_json_link unsued style

---------

Co-authored-by: Syphax Bouazzouni <[email protected]>

* Feature: Clean no more used gems  and code (#658)

* remove cube ruby

* remove not used gems and add documentation to the Gemfile

* remove miniprofiler

* remove bpdi resolver and redirect_to_new_api

* remove ajax proxy and no more used helpers

* remove no more used helpers

* handle the case reset_agents in edit submissions error state are already Agents (#663)

* Feature: Add issues and requests link to the footer and feedback form (#665)

* add issues and requests link to the footer and feedback form

* add $GITHUB_ISSUES to sample config file

* Fix a typo in bioportal_config_env.rb.sample

* fix: upload ontology on errors non returned values and no default values (#625)

* move pry gem outside development block in gemfile (#671)

* Feature: Add back slices (#598)

* Add slices section to home page

* Update the design of the slice top notice bar

* fix home slice name styles

* fix slices error on home page, when there are no slices available

* make the annotator support slices

* make browse page compatible with slices

* update home slices section to include the number of ontologies per slice and the description

* make mappings page supports slices

* rearrange home page sections to be in this order: slices, ontoportal instances then collaborations

* remove unnecessary code in submission filter file

* Adjust the slice link to comply with the production URL

* update home page slices section style

* add a description to the home page slice section

* update home page slices section style

* update ontoportal instances and support home sections styles

* change the button of add new slice to suggest a new group/slice in the home page

* update slices descriptive texti in the home page

* add a description for ontoportal instances in the home page

* move home_ontoportal_tooltip to home helper

* add ontoportal links in config file

* remove http from slice link to make it work with https

* add slice notice to lang local files

* remove mappings statistics slices support in the UI cause it's already done in the back

* update ontoportal website links to be upper case

* fix slices https issue

---------

Co-authored-by: Syphax bouazzouni <[email protected]>

* fix docker compose to make local env dev work in port 3000

* Fix: submissions properties selector labels and include ontologies properties (#669)

* add ontologies properties to the submission properties selector

* show submission attributes label instead of the keys in the selector

* make slices open in the same tab not in a new tab

* put the ontoportal instances directly before the logos instead of a tooltip

* Fix: Redirect to the login page when accessing private ontology while being not authenticated (#673)

* Feature: Distinguish reused terms in tree view (#650)

* distinguish reused properties in the tree view

* use preferredNamespaceUri to distinguish reused terms in the tree view if uriRegexPattern is not present

* use preferredNamespaceUri to distinguish reused properties in the tree view

* distinguish reuses for instances tree

* clean terms reuses code

* extract is_reused to a separate function in components helper

* add concepts reuses to the date view

* pass submission directly instead of ontology_uri_pattern

* pass direcly the submission instead of passing by a function in terms reuses

* Clean terms reuses concern code

* add reuses to schemes tree

* add reuses to schemes tree when we perform a search

* add reuses for collections tree

* add reuses to properties tree when we perform a search

* add reuses for concepts list view

* Clean terms reuses code

* extract submission variable form the concept date render  helper

* remove binding.pry comments left in the code

---------

Co-authored-by: Syphax Bouazzouni <[email protected]>

* Fix: run production mode (#679)

* remove duplicate from gemfile

* add port 3000 for production to use it with ontoportal_docker

* add commands to run production correctly

* Fix: json file extention in export metadata summary page (#683)

* hide analytics features if not enabled (#691)

* add search placeholder to data table component (#688)

* fix browse page contact titleizing (#689)

* fix mappings concept link not opening empty pages (#690)

* Fix docker compose to make tests work (#695)

* Fix: check resolvability tool redirection (#694)

* Feature: add rewrite condition in URI redirection rules (#684)

* add rewrite condition in the rewrite rules

* refactor and clean code of htaccess and nginx redirection rules

* Fix: User ontologies custom set updating (#685)

* Fix ontologies custom set feature

* enhance custom set feature style

* remove duplicated action in home controller account, which is the same as show in users controller

* clean application helper ontologies selector code

* remove unecessary server calls in account page

* Remove JQuery code in accounts page

* remove repeated server call in custom ontologies features

* fix the login flow test after deleting the repeated action related to `/acount`

* Feauture: add acronym column in the agents table in the admin page (#704)

* Fix: subscribe button issues (#681)

* fix clicking on subscribe button while being not logged in

* remove non related code to fix subscribe button issues PR

* fix subscribe button displays wrong values when using french

* replace UnWatch by unwatch

* clean subscriptions method code in ontologies controller

* Fix the color of the loader component spinning loader

* remove duplicated code in subscription button fix

* disable cache for subscription button calls

* remove invalidate cache for the user calls

* Feature: add response time calculation in check resolvability tool (#717)

* add response time calculation in check resolvability tool

* add other format equivalents to handle most cases of request accept header

* move the AVG time to check_resolvability_message instead of appending it

* remove the usage of  inexistent variable  in that block scope

* remove comment as the variable name is already clear

---------

Co-authored-by: Syphax Bouazzouni <[email protected]>

* Feature: add ontology viewOf to the summary page relation network (#716)

* Feature: Remove subject values from the project and usage block in summary page (#719)

* Feature: Add cookie banner (#702)

* add cookies action to show and save cookie state in a session

* add link button component helper

* add cookie modal view

* enhance the style of the cookies banner

---------

Co-authored-by: Bilel KIHAL <[email protected]>

* Fix: update summary page categories display to show acronym with tooltip (#713)

* update summary page categories display to show acronym with tooltip

* fix submission flow system tests after changing their display

* make show_category return the full domain if not a category

* update the show category name to use clickable state if not a category and is a link

* fix remove agent usages (#697)

* Feature: Enhance agents search input component (#703)

* make agents search field component results unlimited to only 4

* make agents cherchable by acronym, affiliations, email and home page

* Update the agent search input to display the result in this format Orga name (ACRONYM) – ROR:003vg9w96 and for persons Person Name – ORCID:0000-1524-5487-5487

* chagne display mode value type from string to boolean in search input component

* remove agents search logic from UI side and limit it to only name, acronym and identifiers

* use the endpoint '/search/agents' for the agents search input component

* Fix: saving and cancel button locals text capitalization (#724)

* Feature: add qf param in agents search (#727)

* Fix: Hide affiliations when agent is organization in agent form (#696)

* Hide affiliations when the agent is an organization in the agents form

* Change the name of the function affliations? to is_organization? to make it more clear

* fix submission flows test after the fix of the PR #713

* fix agent tests after changing the behavior of displaying affiliations

---------

Co-authored-by: Syphax <[email protected]>

* Feature: Make agent indentifiers field set by default based on agent type (#721)

* remove the restriction for certain submission fields to create only organization type or person type agents

* make orcid or ror default input based on agent type in agent form

* fix disappeared signup form icons

* fix nested agents creation

* fix agent form not filling saved identifier values

* create an agent identifier input helper

* disable cookie banner in development and test  mode

* fix agent tests after enforcing ROR for organizations

---------

Co-authored-by: Syphax <[email protected]>

* Fix: propertyid param auto added to summary page URL (#723)

* Fix propertyId param auto added to summary page URL

* remove added PropertyId param to the URL when opening summary page

* Fix auto added propertyId to the summary page URL

* Fix auto added instanceid to the summary page URL

* Fix auto added propertyId to the summary page URL

* add back the constraint of making frames loading lazy while env.development

* make by default properties section displays the first property

* make by default instances section displays the first instance

* change the name of the function instances_tree_first_id by search_first_instance_id

* add a clarification comment in search_first_instance_id method

* move get_property function to properties controller

---------

Co-authored-by: Syphax <[email protected]>

* fix losing context when changing language in concepts page

* fix concept not added to browser URL param issue

* refrech the whole page when we change concepts language

* fix not saving the current url context when changing the language

* Revert "Merge remote-tracking branch 'origin/fix/change-language-lost-context' into fix/change-language-lost-context"

This reverts commit c7b6d08, reversing
changes made to cb3b7ba.

* update turbo frame controller to handle ontology viewer special case

---------

Co-authored-by: SirineMhedhbi <[email protected]>
Co-authored-by: Syphax bouazzouni <[email protected]>
Co-authored-by: Imad Bourouche <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants