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: Add search bars for the instances, properties, collections and schemes pages #550

Merged
merged 25 commits into from
Apr 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e7fb542
remove forgotten binding.pry's from the code
syphax-bouazzouni Mar 21, 2024
1968f34
add the option to the tree link component to open in modals
syphax-bouazzouni Mar 21, 2024
fe73036
add type value to properties show view
syphax-bouazzouni Mar 21, 2024
647f139
create paginated search list helpers
syphax-bouazzouni Mar 21, 2024
f311636
update instances UI and add search bar
syphax-bouazzouni Mar 21, 2024
13c5360
add a search bar to the properties show page
syphax-bouazzouni Mar 21, 2024
3fc1dcb
add a search bar for the collections show page
syphax-bouazzouni Mar 21, 2024
8f26f5d
implement a search bar for the schemes show page
syphax-bouazzouni Mar 21, 2024
85e75cf
add search icon to the concepts search box
syphax-bouazzouni Mar 21, 2024
855ceb2
fix a typo in the search content concerns
syphax-bouazzouni Apr 10, 2024
d405ec1
move _instace_details file to _details
syphax-bouazzouni Apr 10, 2024
2ef44a4
remove top padding from the search bar in properties and instances tree
syphax-bouazzouni Apr 10, 2024
cf6a476
implement selected in the paginated_list_component
syphax-bouazzouni Apr 10, 2024
5ad755b
use link_last_part in the tree link component to get the label from id
syphax-bouazzouni Apr 10, 2024
54c9505
prioritize the label from the id in the ontology search content
syphax-bouazzouni Apr 10, 2024
2fc5cf2
remvoe top padding from search bar in the schemes and collection tree
syphax-bouazzouni Apr 11, 2024
d5c4ddf
translate missing word in the properties details view
syphax-bouazzouni Apr 11, 2024
0ce7296
clean the ontologies routes by defining a scope a removing duplicates
syphax-bouazzouni Apr 11, 2024
87e2f98
remove agent code not relevant in this branch
syphax-bouazzouni Apr 11, 2024
47bee75
fix left padding of collections, schemes and properties views
syphax-bouazzouni Apr 11, 2024
4d47e9d
fix tree autoclicking for collections, instances and schemes
syphax-bouazzouni Apr 11, 2024
6f4f108
move the html rendering from the search concern to helper
syphax-bouazzouni Apr 11, 2024
3acec37
fix tests after changing the routes
syphax-bouazzouni Apr 11, 2024
b064895
translate missing words in the new ontologies section search bars
syphax-bouazzouni Apr 11, 2024
592e4bb
remove no more used instances js code
syphax-bouazzouni Apr 11, 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
remove agent code not relevant in this branch
syphax-bouazzouni committed Apr 11, 2024
commit 87e2f981876b78621359cbd5a5156dda0fb50968
3 changes: 0 additions & 3 deletions app/controllers/concerns/search_content.rb
Original file line number Diff line number Diff line change
@@ -89,9 +89,6 @@ def search_ontologies_content(query:, page: 1, page_size: 10, filter_by_ontologi
[search_content_result_to_json(original_query, query, results, ontologies, selected_onto), results.page,results.nextPage, results.totalCount]
end

def search_agents
# TODO
end

def render_search_paginated_list(container_id:, types:, next_page_url:, child_url:, child_turbo_frame:, child_param:, show_count: nil, lang: request_lang)
acronym = @ontology.acronym
7 changes: 0 additions & 7 deletions app/helpers/auto_complete_helper.rb
Original file line number Diff line number Diff line change
@@ -23,11 +23,4 @@ def ontology_content_autocomplete(search: '', ontologies: [], types: [])
ontologies_content_autocomplete(ontologies: ontologies, types: types, search: "#{search}")
end

def agents_autocomplete(id, type, parent_id: '', name_prefix: '', edit_on_modal: false, deletable: true)
render AgentSearchInputComponent.new(id: id, agent_type: type,
parent_id: parent_id,
edit_on_modal: edit_on_modal,
name_prefix: name_prefix,
deletable: deletable)
end
end
2 changes: 2 additions & 0 deletions app/helpers/ontologies_helper.rb
Original file line number Diff line number Diff line change
@@ -4,12 +4,14 @@ module OntologiesHelper
REST_URI = $REST_URL
API_KEY = $API_KEY
LANGUAGE_FILTERABLE_SECTIONS = %w[classes schemes collections instances properties].freeze

def concept_search_input(placeholder)
content_tag(:div, class: 'search-inputs p-1') do
concat link_to('/search', ){ inline_svg_tag 'icons/search.svg', class: "home-search-button concepts-search-button"}
concat text_input(placeholder: placeholder, label: '', name: "search", value: '', data: { action: "input->browse-filters#dispatchInputEvent" })
end
end

def tree_container_component(id:, placeholder:, frame_url:, tree_url:)
content_tag(:div, class: 'search-page-input-container', data: { controller: "turbo-frame history browse-filters", "turbo-frame-url-value": frame_url, action: "changed->turbo-frame#updateFrame" }) do
concat(concept_search_input(placeholder))