-
Notifications
You must be signed in to change notification settings - Fork 2
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
Blank results visualization #311
Open
stage-rl
wants to merge
3
commits into
main
Choose a base branch
from
GO-244/blank_results_visualization
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,9 @@ | ||
<div class="flex flex-col justify-start items-start self-stretch flex-grow-0 flex-shrink-0"> | ||
<div class="flex flex-col justify-center items-center self-stretch flex-grow-0 flex-shrink-0 relative gap-6 px-6 py-12 bg-white"> | ||
<%= render Common::IconComponent.new(@icon, classes: "size-32 text-gray-500") %> | ||
<div class="flex flex-col justify-center items-center flex-grow-0 flex-shrink-0 relative gap-1"> | ||
<p class="flex-grow-0 flex-shrink-0 text-base font-semibold text-center text-gray-500"><%= @text1 %></p> | ||
<p class="flex-grow-0 flex-shrink-0 text-base text-center text-gray-500"><%= @text2 %></p> | ||
</div> | ||
</div> | ||
</div> |
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,24 @@ | ||
module Common | ||
class BlankResultsComponent < ViewComponent::Base | ||
def initialize (reason = :not_found) | ||
@reason = reason | ||
end | ||
|
||
def before_render # rubocop:disable Metrics/MethodLength | ||
case @reason | ||
when :empty | ||
@text1 = t "blank_results.empty.text1" | ||
@text2 = t "blank_results.empty.text2" | ||
@icon = "magnifying-glass" | ||
when :not_found | ||
@text1 = t "blank_results.not_found.text1" | ||
@text2 = t "blank_results.not_found.text2" | ||
@icon = "magnifying-glass" | ||
when :all_done | ||
@text1 = t "blank_results.all_done.text1" | ||
@text2 = t "blank_results.all_done.text2" | ||
@icon = "hand-thumb-up" | ||
end | ||
end | ||
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
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 |
---|---|---|
|
@@ -9,5 +9,6 @@ | |
</ul> | ||
<%= next_page_area %> | ||
<% end %> | ||
<%= blank_results_area %> | ||
</div> | ||
</div> |
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
1 change: 1 addition & 0 deletions
1
app/components/settings/rules/automation_rules_list_component.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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
class Settings::Rules::AutomationRulesListComponent < ViewComponent::Base | ||
renders_many :automation_rules | ||
renders_one :blank_results_area | ||
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
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 |
---|---|---|
@@ -1 +1,7 @@ | ||
<%= render Admin::Tags::TagsListComponent.new(simple_tags: @simple_tags) %> | ||
<%= render Admin::Tags::TagsListComponent.new(simple_tags: @simple_tags) do |component| %> | ||
<% if @simple_tags.empty? %> | ||
<% component.with_blank_results_area do %> | ||
<%= render Common::BlankResultsComponent.new(:empty) %> | ||
<% end %> | ||
<% 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 |
---|---|---|
@@ -1 +1,5 @@ | ||
<%= render Filters::FiltersListComponent.new(@filters) %> | ||
<% if @filters.any? %> | ||
<%= render Filters::FiltersListComponent.new(@filters) %> | ||
<% else %> | ||
<%= render Common::BlankResultsComponent.new(:empty) %> | ||
<% 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
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 |
---|---|---|
@@ -1,7 +1,13 @@ | ||
<%= render Settings::Rules::AutomationRulesListComponent.new do |component| %> | ||
<% @automation_rules.each do |automation_rule| %> | ||
<% component.with_automation_rule do %> | ||
<%= render Settings::Rules::AutomationRulesTableRowComponent.new(automation_rule) %> | ||
<% if @automation_rules.any? %> | ||
<% @automation_rules.each do |automation_rule| %> | ||
<% component.with_automation_rule do %> | ||
<%= render Settings::Rules::AutomationRulesTableRowComponent.new(automation_rule) %> | ||
<% end %> | ||
<% end %> | ||
<% else %> | ||
<% component.with_blank_results_area do %> | ||
<%= render Common::BlankResultsComponent.new(:empty) %> | ||
<% end %> | ||
<% 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Toto neviem ci je uplne spravna logika, ak "idem z menu", tak mozem mat aj filter "Vybavene" a ked je prazdny tak nie je prave naopak NIC vybavene. Zaroven to posuvanie referera sa mi nepaci.
Spravme teda len tu verziu, ze ziadne spravy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No moja logika bola taka, ze ked idem z menu, tak je to nieco ako "TODO list", t.j. prazdny zoznam je dobry zoznam, a preto palec hore. A naopak, ked si robim custom query, tak asi nieco chcem najst, a ked nenajdem, tak je to v podstate chyba. Tomu som sa snazil aj ikony prisposobovat po inspiracii Figmou