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

Blank results visualization #311

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

stage-rl
Copy link
Collaborator

No description provided.

@stage-rl
Copy link
Collaborator Author

Taketo 3 typy mame:

Screenshot_20240121_195841
Screenshot_20240121_200003
Screenshot_20240121_200035

Najma k tomu prvemu prazdnemu zoznamu, lebo tam (este) nic nie je, som hladal a nenasiel lepsiu ikonu.

@stage-rl stage-rl requested a review from jsuchal January 21, 2024 19:02
Comment on lines 6 to 16
@text1 = "Žiadne záznamy"
@text2 = "Zatiaľ nie sú vytvorené žiadne záznamy"
@icon = "hand-thumb-up"
when :not_found
@text1 = "Žiadne výsledky"
@text2 = "Skúste zmeniť filter alebo vyhľadávané slová"
@icon = "magnifying-glass"
when :all_done
@text1 = "Všetko je hotové"
@text2 = "Nemáte žiadnu novú správu"
@icon = "hand-thumb-up"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toto presunme do translations file

@@ -1,13 +1,14 @@
<div class="flex flex-col justify-stretch items-stretch gap-4 sm:p-4">
<div class="flex flex-col justify-stretch items-stretch sm:rounded-md bg-white sm:border sm:border-gray-200" data-controller="form all-checkboxes">
<%= render MessageThreadsBulkActionsComponent.new(ids: [], filter: @filter, filter_subscription: @filter_subscription, signable: Current.user.signer?) %>
<%= form_with url: bulk_actions_message_threads_path, data: { "form-target": "form", "all-checkboxes-target": "form" } do %>
<%= form_with url: bulk_actions_message_threads_path, data: { 'form-target': "form", 'all-checkboxes-target': "form" } do %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tie dvojite " nedavame vsade?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Davame, ale neprepisujeme stary kod. A vypli sme si enforcement tohto pravidla v nasom krasnom lintri, lebo to iritovalo head architekta ;-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ja tu vidím diff kde sa zmenili

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prauda, moja chyba. Tam je zjavne este dalsie pravidlo, ine ako pouzivanie jednoritych vs dvojitych. Vypinam aj toto

https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/QuotedSymbols

<% else %>
<% component.with_blank_results_area do %>
<% if params[:referrer] == "menu" %>
<%= render Common::BlankResultsComponent.new(:all_done) %>
Copy link
Member

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.

Copy link
Collaborator Author

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

def initialize(reason = :not_found)
case reason
when :empty
@text1 = "Žiadne záznamy"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toto je strasne genericke, blank stav by ti mal aj trochu poradit, ze naco to sluzi (napr. filtre) a ponuknut akciu (napr. vytvorit filter)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je to teda v prekladoch. Ak vies ako, kludne pomen

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.

2 participants