forked from ontoportal/ontoportal_web_ui
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/fix/clean-update-lookbook' into …
…stage
- Loading branch information
Showing
27 changed files
with
109 additions
and
178 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
class Display::EmptyStateComponent < ViewComponent::Base | ||
|
||
def initialize(text: t('no_result_was_found')) | ||
@text = text | ||
end | ||
|
||
|
||
def call | ||
content_tag(:div, class:'browse-empty-illustration') do | ||
inline_svg_tag('empty-box.svg') + | ||
content_tag(:p, @text) | ||
end.html_safe | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
class ListItemsShowMoreComponent < ViewComponent::Base | ||
renders_many :containers | ||
|
||
def initialize(max_items: 10) | ||
super | ||
@max_items = max_items - 1 | ||
end | ||
|
||
end |
14 changes: 14 additions & 0 deletions
14
app/components/list_items_show_more_component/list_items_show_more_component.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
%div{data: {controller: 'reveal-component'}} | ||
- containers[..@max_items].each do |item| | ||
= item | ||
|
||
- if (@max_items + 1) < containers.size | ||
- Array(containers[@max_items+1..]).each do |item| | ||
%span{'data-reveal-component-target': "item", class: 'd-none'} | ||
= item | ||
%div{'data-reveal-component-target': "showButton", 'data-action': "click->reveal-component#show" } | ||
%span.btn-link | ||
See more | ||
%div.d-none{'data-reveal-component-target': "hideButton", 'data-action': "click->reveal-component#hide" } | ||
%span.btn-link | ||
See less |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
test/components/previews/buttons/icon_with_tooltip_component_preview.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
class Buttons::IconWithTooltipComponentPreview < ViewComponent::Preview | ||
|
||
# @param title text | ||
|
||
def edit(icon: "edit.svg", title: "Edit") | ||
render IconWithTooltipComponent.new(icon: icon, link: "#", title: title) | ||
end | ||
|
||
# @param title text | ||
|
||
def delete(icon: "icons/delete.svg", title: "Delete") | ||
render IconWithTooltipComponent.new(icon: icon, link: "#", title: title) | ||
end | ||
|
||
|
||
# @param title text | ||
|
||
def preview(icon: "eye.svg", title: "Preview") | ||
render IconWithTooltipComponent.new(icon: icon, link: "#", title: title) | ||
end | ||
|
||
|
||
end |
7 changes: 0 additions & 7 deletions
7
test/components/previews/buttons/ontology_subscribe_button_component_preview.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 0 additions & 33 deletions
33
test/components/previews/concept_details_component_preview.rb
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
test/components/previews/display/empty_state_component_preview.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class Display::EmptyStateComponentPreview < ViewComponent::Preview | ||
|
||
def default() | ||
render Display::EmptyStateComponent.new(text: 'No result was found') | ||
end | ||
end |
10 changes: 0 additions & 10 deletions
10
test/components/previews/display/header_component_preview.rb
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
test/components/previews/display/language_field_component_preview.rb
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
test/components/previews/display/license_field_component_preview.rb
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions
10
test/components/previews/display/search_result_component_preview.rb
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.