Description

There are several words that are commonly used in Drupal but which are not supposed to be used in the user interface. For example, developers will often say "node type" when the more user friendly term is "content type." Sometimes the use of "node type" will slip into the documentation or UI of Drupal which makes it even more confusing because the user has to learn two words for the same concept.

The task is to create a Firefox add-on (either an Extension or a script using the Greasemonkey engine) which will scan a page and alert the user to the presence of certain strings. This should be configurable to only work on sites where the user wants it to run.

The person who implements this should decide:
* What is the best way to implement it (Extension or Greasemonkey)
* What is the best way to alert users to these strings
* What strings (aside from "node") should be included in the list
* Can the list of alert words be configurable
* How to limit the script to only run on certain websites

* http://www.greasespot.net/
* http://developer.mozilla.org/en/docs/Extensions
* http://groups.drupal.org/usability

Estimated time:
2-5 days

Comments

webchick’s picture

Status: Active » Postponed (maintainer needs more info)

This is a neat idea. Greggles, are you available to mentor it? I don't know how many peope we have in the community with knowledge of this stuff, and I don't want to see the student held up because of us if they're making progress or have questions.

greggles’s picture

I can mentor it, but I can't via IRC. Email and skype work for me - search for my last name (knaddison) to find my skype or email :P But all other communication modes fail for me right now. I promise I'll subscribe to the issue this time since I know about it in advance - it's already done in fact :)

webchick’s picture

Title: Create and Document a browser add-on to find strings in your web page » GHOP #84: Create and Document a browser add-on to find strings in your web page

Ok, now an official task: http://code.google.com/p/google-highly-open-participation-drupal/issues/.... Thanks, Greg! Excited to see how this'll turn out.

webchick’s picture

Component: Task idea » GHOP Task
webchick’s picture

Status: Postponed (maintainer needs more info) » Active

Third time's a charm? :P

corsix’s picture

Trying this as a greasemonkey script: http://www.corsix.org/drupal60b3/drupal_bad_strings.user.js (follow link to install script).

Currently set to run only on drupal.org, but this can easily be changed the normal greasemonkey way (tools -> greasemonkey -> manage user scripts -> Drupal bad string finder -> included pages -> add). Alerts the user with a black 'toolbar' at the bottom of the screen (like this - http://img258.imageshack.us/img258/8724/image1nb3.png), at which point the user can, if they wish, open the find toolbar and search the document for said strings.

Currently only checks for the phrase "node", but this can be changed by appending at line 20 of tools -> greasemonkey -> manage user scripts -> Drupal bad string finder -> edit.

Looking mainly for feedback on method of alerting the user, although any other comments/suggestions you may have are always appreciated.

greggles’s picture

This is looking awesome already. This is going to be very useful and I like your initial work on the alert bar at the bottom.

Here is some initial feedback:
1) For sites that have black backgrounds the alert bar won't be as alarming to users (it should really pop-out, imo). If the documentation or a code comment could clearly explain how to tweak the bar color and text color that would be helpful.

2) I think it would be great if the alert mechanism would highlight the strings in the page so that the user doesn't have to use the find toolbar. I can also see the argument that we shouldn't be duplicating functionality. One benefit of making it highlight the strings in the page is that it requires less work on the part of the tester and that is the whole point of this toolbar - of course we *could* type ctrl+f+node on every page we visit, but that takes just a little bit too much time. It would also be more important if there were multiple words in the list (I'm still having a hard time thinking of a second word...).

3) It seems like it is finding occurrences of the word that don't exist in the user visible text or perhaps it is finding them multiple times. If I search on this page for node I find 7 entries, but the alert bar shows me 19 of them (my comment will change these numbers, of course). Can you confirm that problem?

Great progress so far.

webchick’s picture

Status: Active » Needs work

I'm going to mark this code needs work just so we know something's been done on it when we're going through.

corsix’s picture

Status: Needs work » Needs review

1) a) What do you mean by "pop-out"?
b) Placed variables right after the bad word list to control colours

2) Added some automatic highlighting (example: http://img229.imageshack.us/img229/4277/image1xl6.png)

3) It was picking up on lots of occurrences in the "Project:" dropdown menu, as alot of those have the word "node" in them somewhere. Although less than ideal, I've just made it skip the < option > elements in dropdowns.

New version upload to http://www.corsix.org/drupal60b3/drupal_bad_strings_1.user.js

greggles’s picture

1)a) I meant "stand out" or be visible and that's done because b) looks great!

2) Looks perfect. I think it is a great help.

3) Hmmm, interesting. I know my initial reaction was to figure out what the problem was and remove them but I'm not so sure now. What do you think?

corsix’s picture

3) I think that they should be included for completeness, but make it obvious on the bar that the text is within a dropdown, as not to confuse people.

Anything else that needs to be done?

greggles’s picture

That sounds great to somehow separate them so it's obvious that they are in a dropdown.

Re anything else: I don't want to stifle your creativity, but I think that with that additional feature that you would certainly have met the initially specified requirements and then some.

Are there any other ways you can see to improve it either the code or the documentation? Where do you feel the best home for this would be after it's "done"?

corsix’s picture

Updated: http://www.corsix.org/drupal60b3/drupal_bad_strings_2.user.js

Hovering over one of the strings in the bar will pop up the path to that string (example: http://img520.imageshack.us/img520/5319/image1uj0.png), which if it beings with "option", implies that it is in an option (dropdown) tag. Clicking said string will take you to where that string occurred in the document, except for when the text is not visible in the document, like dropdown items.

Possible homes:
* Drupal.org project hosting, assuming that things other than modules and themes can have projects there. Gives issue queue, CVS, etc. Also easier to find when looking for drupal things.
* Page on corsix.org

I would prefer the first home, if that is possible. If not, happy to put up a page on corsix.org explaining how to install and use.

corsix’s picture

greggles’s picture

Status: Needs review » Fixed

Looks good to me!

How should we publicize this to people? I wrote in the usability group and to the docs list.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.