Closed (fixed)
Project:
Uniqueness
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
20 Jan 2013 at 03:05 UTC
Updated:
8 Feb 2013 at 17:40 UTC
Jump to comment: Most recent file
My 6.x fork has a feature where if duplicates have previously been displayed, and there are currently no duplicates (and a non-blank title), then a text such as "Success! No duplicates found." is shown.
I propose to add a configuration setting similar to the "Searching ..." text for the success text. This would be passed in the settings to jQuery. The location of the success text would be in the theme function.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | uniqueness-success_message-revised-1893556-3.patch | 2.67 KB | danchadwick |
| #1 | uniqueness-success_message-1893556-1.patch | 2.54 KB | danchadwick |
Comments
Comment #1
danchadwick commentedPlease apply after other outstanding issues. Please apply outstanding patches oldest-first to help avoid re-rolls.
Comment #2
bforchhammer commentedMaybe better: "The text to display if the uniqueness search does not find any related content."
Can we call it e.g. "noResultsString" instead of "uniqueString"? I think that would describe it more appropriately considering that the settings page talks about providing a uniqueness search.
Comment #3
danchadwick commentedSure.
Title: Unique message --> No related content message
'#description' -> The text to display if the uniqueness search no longer finds any related content.
The reason I chose this wording is because the message is not displayed if a search hasn't returned results previously. In other words, it isn't really a "success" if you edit a node that already has a unique title.
And I changed the two variables to refer to "no result" rather than "unique. I also uncapitalized "Uniqueness" in two places.
I will address the node add form incorrect wording and add the note about blocks not being shown for admins later as these lines are physically close to this one and I fear they won't apply.
Comment #4
bforchhammer commentedOne more question: currently the "empty text" replaces all the content within the results fieldset/block including the description ("Help us increase the signal/noise ratio... "). I was actually expecting the description to remain visible, and the "empty text" only appear instead of the results lists.
Do you have a strong opinion for doing it this way? Otherwise could we leave the widget description visible?
Comment #5
danchadwick commentedI did think about this some and it does work as I intended. Here's my logic:
- User starts typing (or starts editing an existing node with duplicate content).
- User receives admonishment to "increase the signal-to-noise ratio". Now in actual use, this is a very poor prompt and should probably be re-written, but that would be another issue. My site uses something like:
- User reads admonishment and decides to enter different content, with a different, unique name.
- The admonishment disappears and is replaced with the noResult / success message. Mine is something like:
So it would be much, much better I think to remove the admonishment when it does not apply.
If you agree, great. If not then I fear I'd like an option of some sort. Which I hope isn't necessary.
Comment #6
bforchhammer commentedHm, so I guess this depends a lot on what you set as the description... Your user story makes sense, but imagine if a user first enters a unique title and then expands "Related content" (out of curiosity); in this case they would just see "Success! No related content found." -- not very helpful if you don't know why that UI widget is there.
Maybe we can add a dynamic css class to the fieldset for "no results"; then you could simply hide the description when there isn't a result. Adding a bunch of css classes for advanced styling would probably be a good idea either way.
Comment #7
danchadwick commentedActually in your scenario, it would still display the original prompt. The success message is display only after it wasn't unique (in which case it was expanded) and then it was. So your user would see:
Collapsed
They type something unique. Fieldset is still collapsed, but the normal description is in there.
They type something non-unique. Fieldset expands, still showing normal description, with results too.
They make it unique.
Fieldset stays expanded, description and null results replaced by success message.
Works, no?
I already coded your suggestion (which is trivial), but then I realized that it didn't apply. Do you still disagree? I can make a patch, but I don't think its needed or better, unless I'm missing something.
Comment #8
bforchhammer commentedHave you tried
git merge? Usually works quite well for me :)Committed and pushed #3.
We should probably add more css classes as well anyway, but I'll leave that for a follow-up.
Comment #9
danchadwick commentedI'm pretty sure I can access anything that I'd want to style, no? I could imagine wrapping the whole thing in a div, but you can access whatever you want via either block or fieldset selectors, no? And they can put tags in their messages if they want (now that filter_xss_admin is used).
Oh, PS. I meant "apply" as in is applicable or relevant, not as in source code control. Poorly written comment. Sorry.