Skip to content

Blank page no vocabulary items are found #2273

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

Closed
jiru opened this issue Apr 12, 2020 · 13 comments · Fixed by #2510
Closed

Blank page no vocabulary items are found #2273

jiru opened this issue Apr 12, 2020 · 13 comments · Fixed by #2510
Assignees
Labels
enhancement Issue that describes a problem that requires a change in the current functionalities of Tatoeba. good first issue Easy issue for new contributors to get started.

Comments

@jiru
Copy link
Member

jiru commented Apr 12, 2020

Problem

When filtering by language, often the page is blank with no idication why it is blank.

https://tatoeba.org/eng/vocabulary/add_sentences/kor

screen shot 2016-07-06 at 08 21 39

Possible Solution

Put a message saying something like the following.

There are no requests for Korean.
There are no requests for this language.

There are no requests for Korean that do not already have at least 10 sentences.
There are no requests for this language that do not already have at least 10 sentences.

Originally posted by @ckjpn in #1148 (comment)

@jiru jiru added the enhancement Issue that describes a problem that requires a change in the current functionalities of Tatoeba. label Apr 12, 2020
@jiru jiru added the good first issue Easy issue for new contributors to get started. label May 24, 2020
@speedysera
Copy link
Contributor

Hi! Regarding the styling, would something like this be acceptable?

tatoeba-message-no-requests

@ckjpn
Copy link

ckjpn commented Jun 19, 2020

If you are referring to the thin light green text on a block of darker green, I find that a lot more difficult to read than the current black font on a white background as shown in the screenshot in the first post in this discussion.

I suspect this goes against accessibility guidelines that a lot of websites follow to help those with vision problems.

@speedysera
Copy link
Contributor

speedysera commented Jun 20, 2020

Thanks for the insight @ckjpn ! It's good to consider accessibility.

It seems the green header also exists in the case where there are words in need of sentences are displayed:

tatoeba-message-header

@trang are we going to change the display header anytime soon for accessibility?


Regarding the styling question, I was wondering about this section in particular, where the additional message is marked in green:

Screen Shot 2020-06-20 at 9 00 42

Do we want to display "There are no requests for this language that do not already have at least 10 sentences." along with the existing header as shown in the screenshots, or as a separate entry with different styling? I am open to suggestions :)

Also, is there a function that would allow us to query the current language being featured, so that we can display "There are no requests for that do not already have at least 10 sentences."

@AndiPersti
Copy link
Contributor

Also, is there a function that would allow us to query the current language being featured, so that we can display "There are no requests for that do not already have at least 10 sentences."

In the controller we pass already langFilter which contains the 3-letter-code for the language and is currently not used in the template:

$this->set('langFilter', $lang);

We have a helper function codeToNameAlone which you can use to get the full language name. The trait is included in the Languages helper so you can use the helper function in the template, e.g.

$language = $this->Languages->codeToNameAlone($langFilter)

(you should handle the case where $langFilter is not set, i.e. vocabulary items in all languages are displayed.)

@AndiPersti
Copy link
Contributor

Do we want to display "There are no requests for this language that do not already have at least 10 sentences." along with the existing header as shown in the screenshots, or as a separate entry with different styling? I am open to suggestions :)

We currently don't have a distinct design/style that determines how to display an empty result page (see also #2074, third bullet point).

I personally prefer having just a simple explanation without any header like we do for example with searches: https://tatoeba.org/eng/sentences/search?query=&from=abk&to=afh

@trang
Copy link
Member

trang commented Jun 20, 2020

@speedysera There's indeed no default style yet for "no results" pages but I started to introduce something for the lists when they're empty.

Screenshot_2020-06-20 Test list - Tatoeba

You can do something that looks similar here for the vocabulary and a create CSS class in the default.css that could be reused in general for empty pages.

.empty-info-text {
    text-align: center;
    font-size: 2em;
    color: #666666;
}

As for the language information, you could add it in the title rather than the "no requests" text.

Screenshot_2020-06-20 Sentences to switch to CC0 - Tatoeba(2)

This would follow the pattern on other pages.

@speedysera
Copy link
Contributor

Thank you, the above looks much clearer, let me implement that.

speedysera added a commit to speedysera/tatoeba2 that referenced this issue Aug 2, 2020
…nguage, there is no indication why the page is blank when there are no vocabulary items found.
@speedysera
Copy link
Contributor

@AndiPersti hi! I tried to reflect all the comments above, hope it's alright

@speedysera
Copy link
Contributor

speedysera commented Aug 12, 2020

hi! I would like to ask if the following is alright:

if langFilter is empty,
Screen Shot 2020-08-13 at 5 02 18

if not,
Screen Shot 2020-08-13 at 5 01 02

if the above is ok, I will push the commit and create a new pull request. Thank you!

@jiru
Copy link
Member Author

jiru commented Aug 12, 2020

@speedysera It looks good. Please show us the code! 🙂

speedysera added a commit to speedysera/tatoeba2 that referenced this issue Aug 15, 2020
…nguage, there is no indication why the page is blank when there are no vocabulary items found.
@speedysera
Copy link
Contributor

hi! please take a look at the code if it's alright. I can create the new PR afterwards

@jiru
Copy link
Member Author

jiru commented Aug 15, 2020

@speedysera Thanks! The code looks good.

Note that it’s better if you create the PR first and then we look at the code. Don’t worry, you don’t have to get it perfect beforehand. We are all here to learn. 👍

@speedysera
Copy link
Contributor

hi @jiru and @AndiPersti ! thanks for the awesome comments, I will work on them.

speedysera added a commit to speedysera/tatoeba2 that referenced this issue Aug 16, 2020
…nguage, there is no indication why the page is blank when there are no vocabulary items found.
@AndiPersti AndiPersti linked a pull request Aug 16, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue that describes a problem that requires a change in the current functionalities of Tatoeba. good first issue Easy issue for new contributors to get started.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants