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

search design details #1606

Merged
merged 3 commits into from
Oct 18, 2016
Merged

search design details #1606

merged 3 commits into from
Oct 18, 2016

Conversation

jancborchardt
Copy link
Member

Some search design details I did a while ago. Including:

  • fixing wording
  • use correct styling/elements
  • cut off leading slash

Please review @nextcloud/designers @nextcloud/javascript :)

@jancborchardt jancborchardt added enhancement design Design, UI, UX, etc. 3. to review Waiting for reviews labels Oct 1, 2016
@jancborchardt jancborchardt added this to the Nextcloud 11.0 milestone Oct 1, 2016
Copy link
Member

@eppfel eppfel left a comment

Choose a reason for hiding this comment

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

Actually for a user it is not transparent, why there are two different "no results" messages and it looks like a jump frame.

@@ -217,7 +217,7 @@
$status.addClass('emptycontent').removeClass('status');
$status.html('');
$status.append('<div class="icon-search"></div>');
$status.append('<h2>' + t('core', 'No search results in other folders') + '</h2>');
$status.append('<h2>' + t('core', 'No search results in other folders {filter}', {filter:this._filter}) + '</h2>');
Copy link
Member

@eppfel eppfel Oct 1, 2016

Choose a reason for hiding this comment

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

This is not substituted and will be shown as {filter} on my end.

Copy link
Member

Choose a reason for hiding this comment

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

bildschirmfoto 2016-10-01 um 18 46 45

Copy link
Contributor

@te-online te-online Oct 1, 2016

Choose a reason for hiding this comment

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

Isn't it supposed to be ('... folders %s', this._filter) – or something like this?
Edit: this is for php, I guess.

Copy link
Contributor

@te-online te-online Oct 1, 2016

Choose a reason for hiding this comment

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

Okay, I see, you might just need the last two parameters, maybe?
..., {filter:this._filter}, null, {'escape': false}) as in filelist.js

Copy link
Member Author

Choose a reason for hiding this comment

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

cc @nextcloud/javascript can you help in this regard?

Copy link
Member

Choose a reason for hiding this comment

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

@jancborchardt is this supposed to display the searched string?

Copy link
Member

@skjnldsv skjnldsv Oct 5, 2016

Choose a reason for hiding this comment

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

Because this._filter is undefined for me. I think we should pass the query in the function arguments if that's what you were planning! :)

Copy link
Member

Choose a reason for hiding this comment

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

this is undefined, will fix

Signed-off-by: Joas Schilling <coding@schilljs.com>
@skjnldsv
Copy link
Member

skjnldsv commented Oct 5, 2016

@nickvergessen Thanks for the fix!

52-12
I don't find it really clear. Should we put some more details? Like "No search results in other folders for «tests»

vdxsfd

@nickvergessen
Copy link
Member

It still looks like the search icon and the text are jumping down/up at 2 to 3 characters

@skjnldsv
Copy link
Member

skjnldsv commented Oct 5, 2016

Small question, why don't I have the same output when searching small queries?
2016-10-05_13-57-30

Edit: oooh, is this what you were talking about Joas? 😛

@eppfel
Copy link
Member

eppfel commented Oct 5, 2016

@nickvergessen @skjnldsv That's what I addressed in my review. One is handled in core and the other in files???

@skjnldsv
Copy link
Member

skjnldsv commented Oct 5, 2016

There's something strange here indeed! :)

@MorrisJobke
Copy link
Member

There's something strange here indeed! :)

It is by intention: up to 2 charaters it only filters the current view and starting with 3 characters it also triggers a search in all other folders (parents and childs).

@MorrisJobke
Copy link
Member

@jancborchardt Could I ask you to respond to all the open questions.

@MorrisJobke MorrisJobke added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Oct 5, 2016
@skjnldsv
Copy link
Member

skjnldsv commented Oct 6, 2016

@MorrisJobke Why though?

@jancborchardt
Copy link
Member Author

Yeah ok, that’s weird. To clarify, any search error should only have that one large line of text. Anything else is too complex for a simple search error. Will get on it.

@jancborchardt
Copy link
Member Author

jancborchardt commented Oct 6, 2016

Btw @ChristophWurst here too I would like to bold the search string like we did the folders for the mail error messages: nextcloud/mail#57 (review)

Can you help me with that? Cause there’s no tag and endtag like in Mail.

@@ -217,7 +217,7 @@
$status.addClass('emptycontent').removeClass('status');
$status.html('');
$status.append('<div class="icon-search"></div>');
$status.append('<h2>' + t('core', 'No search results in other folders') + '</h2>');
$status.append('<h2>' + t('core', 'No search results in other folders {filter}', {filter:lastQuery}) + '</h2>');
Copy link
Member

Choose a reason for hiding this comment

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

@jancborchardt since you're using append here, we can use directly into the string.
$status.append('<h2>' + t('core', 'No search results in other folders for <strong>{filter}</strong>', {filter:lastQuery}) + '</h2>');

Copy link
Member Author

Choose a reason for hiding this comment

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

Won’t that be a problem with translators again because they often mess up the tags? I thought that was a problem cc @LukasReschke

Copy link
Member

@LukasReschke LukasReschke Oct 6, 2016

Choose a reason for hiding this comment

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

<fett>{filter}</fett>

🙈

Copy link
Member

Choose a reason for hiding this comment

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

Oh yes it will indeed!
We should proceed th same way as ChristophWurst.

Copy link
Member

Choose a reason for hiding this comment

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

@jancborchardt
var error = t('core', 'No search results in other folders {tag}{filter}{endtag}', {filter:lastQuery}).replace('{tag}', '<strong>').replace('{endtag}', '</strong>'); $status.append('<h2>' + error + '</h2>');

Copy link
Member Author

Choose a reason for hiding this comment

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

@skjnldsv can you add that as a commit directly on this branch? You are a Nextcloud member so you should be able to do that ;)

@@ -2427,7 +2427,7 @@
$('#searchresults .emptycontent').addClass('emptycontent-search');
if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden') ) {
this.$el.find('.nofilterresults').removeClass('hidden').
find('p').text(t('files', "No entries in this folder match '{filter}'", {filter:this._filter}, null, {'escape': false}));
find('h2').text(t('files', "No results in this folder for {filter}", {filter:this._filter}, null, {'escape': false}));
Copy link
Member

Choose a reason for hiding this comment

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

Same here, you can use html instead of text if you want to add <strong>

Copy link
Member

@skjnldsv skjnldsv Oct 6, 2016

Choose a reason for hiding this comment

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

find('p').html(t('files', "No entries in this folder match '{tag}{filter}{endtag}'", {filter:this._filter}, null, {'escape': false}).replace('{tag}', '<strong>').replace('{endtag}', '</strong>'));

Copy link
Member Author

Choose a reason for hiding this comment

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

Same here ;)

Copy link
Member

Choose a reason for hiding this comment

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

You mean {tag} and {endtag}?

Copy link
Member Author

Choose a reason for hiding this comment

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

@skjnldsv I meant if the solution you suggested works, you are welcome to add a commit :)

Copy link
Member

Choose a reason for hiding this comment

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

Well it works, I used the same as here nextcloud/mail#57 (review)

But I can't tell you if this will cause issue with the translators or not. I don't really knows how they work :)

Copy link
Member Author

Choose a reason for hiding this comment

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

@skjnldsv then go ahead and add a commit in this branch, you should be able to since you are in the Nextcloud organization ;) You know Javascript better than me. :)

Copy link
Member

Choose a reason for hiding this comment

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

Okay, I will commit. But we need to be sure the issue you raised with the translators is fine! :)

Copy link
Member

Choose a reason for hiding this comment

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

@skjnldsv Looks good 👍

@skjnldsv
Copy link
Member

skjnldsv commented Oct 6, 2016

@jancborchardt Could we clarify the text error?
#1606 (comment)

@skjnldsv
Copy link
Member

Commit pushed @jancborchardt ! :)

@jancborchardt
Copy link
Member Author

@skjnldsv cool! Did that now also fix the wording which @eppfel suggested?

(btw @skjnldsv did you set up your email locally in git? Because it doesn’t show your avatar on the commit. :)

@@ -217,7 +217,8 @@
$status.addClass('emptycontent').removeClass('status');
$status.html('');
$status.append('<div class="icon-search"></div>');
$status.append('<h2>' + t('core', 'No search results in other folders {filter}', {filter:lastQuery}) + '</h2>');
var error = t('core', "No search results in other folders '{tag}{filter}{endtag}'", {filter:lastQuery});
Copy link
Member Author

Choose a reason for hiding this comment

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

@skjnldsv »No search results in other folders for« so the wording which @eppfel remarked is fixed also :)

Copy link
Member

@skjnldsv skjnldsv Oct 11, 2016

Choose a reason for hiding this comment

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

Pushed & rebased 👍

@skjnldsv
Copy link
Member

@eppfel Review update pls? 😄

@MorrisJobke MorrisJobke added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 11, 2016
@jancborchardt
Copy link
Member Author

@nickvergessen @MorrisJobke @eppfel another review please? ;)

@MorrisJobke
Copy link
Member

👍

@MorrisJobke
Copy link
Member

Counting @eppfel approval as 👍 ;) Merge it

@MorrisJobke MorrisJobke merged commit 2bb031e into master Oct 18, 2016
@MorrisJobke MorrisJobke deleted the search-detail branch October 18, 2016 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews design Design, UI, UX, etc. enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants