Bug 221420 - Allow bookmarking file/string/translation
Summary: Allow bookmarking file/string/translation
Status: RESOLVED FIXED
Alias: None
Product: Babel
Classification: Technology
Component: Server (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Denis Roy CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 234187 (view as bug list)
Depends on:
Blocks: 226707 233000 238798
  Show dependency tree
 
Reported: 2008-03-04 19:02 EST by Gabe O'Brien CLA
Modified: 2008-07-24 11:10 EDT (History)
3 users (show)

See Also:


Attachments
Patch v1 (7.99 KB, patch)
2008-07-15 16:19 EDT, Denis Roy CLA
no flags Details | Diff
Screenshot with three choices (48.55 KB, image/png)
2008-07-17 09:45 EDT, Denis Roy CLA
no flags Details
Screenshot (32.79 KB, image/png)
2008-07-17 12:16 EDT, Denis Roy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabe O'Brien CLA 2008-03-04 19:02:32 EST
The main usage of this that I can think of is for bug reporting.  Right now we have to attach screen shots which is great for showing the problem but horrible for testing.  With a link to a specific file/string/translation it could be easily added to a bug for quick testing.
Comment 1 Denis Roy CLA 2008-03-05 16:42:18 EST
Fantastic idea.
Comment 2 Denis Roy CLA 2008-05-27 11:59:59 EDT
*** Bug 234187 has been marked as a duplicate of this bug. ***
Comment 3 Denis Roy CLA 2008-07-15 14:57:59 EDT
I'm closing in on a patch for this.  Stay tuned.
Comment 4 Denis Roy CLA 2008-07-15 16:19:06 EDT
Created attachment 107520 [details]
Patch v1

Here's a rough patch.  I have committed it to the staging area.  To test:

- log into the staging area (http://babel.eclipse.org/staging)
- Go to the translation screen and pick a language
- Go to the recent translations page and click translation links.


Some notes:

- Most of the time, a project, file or string is outside of the view area (linking to the 300'th file means you'd need to scroll... so I updated most of the 'updateSelected()' functions to something like this: YAHOO.filesManager.updateSelected(proj,domNode.scrollHeight);  This allows the browser to scroll down to the selectedIndex in case it's outside of the (smallish) view area.

Gabe: scrollHeight is not W3C; however, MSIE > 5.5 and Gecko support it.  Is there any foreseeable danger to using scrollHeight?

- You can bookmark to a project/version/file, or down to a project/version/file/string



TODO before this can go live:

- If you haven't logged in yet, you're redirected to the login and you lose your URL.  This is a minor.

- If you are logged in but don't have a language in the session, hitting a bookmarkable URL balks as the current workflow in translate.php is to select a language, then a project, then a file, then a string.  Gabe can probably provide insight here.

- If you *do* have a language in your session and you click on a specific file, everything is selected, but I can't simulate the 'clicked' event to actually open the translation form.  Gabe can probably also provide insight here.


In its current state, solving the first two issues would already provide much needed functionality.
Comment 5 Kit Lo CLA 2008-07-15 20:54:05 EDT
This is a great function! Thanks Denis!
Comment 6 Denis Roy CLA 2008-07-16 11:23:12 EDT
> - If you haven't logged in yet, you're redirected to the login and you lose
> your URL.  This is a minor.

This is fixed on staging.

> - If you are logged in but don't have a language in the session, hitting a
> bookmarkable URL balks

This is fixed. If you don't have a language, a notice is displayed inside the projects pane. Selecting a  language then resumes loading the UI from the bookmarked values. Gabe's design here was brilliant.

> - If you *do* have a language in your session and you click on a specific file,
> everything is selected, but I can't simulate the 'clicked' event to actually
> open the translation form.

I haven't fixed this yet, but as I mentioned, the added functionality provided by what has been done so far makes this only a very minor annoyance by comparison.

I've tested everything on MSIE 6, FF2 and FF3.

Can everyone test hitting bookmarkable URLs from the staging area, both as a logged in and logged out user, to make sure everything works as described?

Comment 7 Denis Roy CLA 2008-07-17 09:45:26 EDT
Created attachment 107735 [details]
Screenshot with three choices

I want to add a 'link' anchor to both the file list, and the string list, so that folks can easily link/bookmark a specific file/string.

1 and 2 demonstrate the usage of a 14x14 icon
3 simply uses the word 'link'

I think the prettiest is 2, but is it obvious that it means 'link to this'?  3 is the best for usability, whereas 1 is probably a compromise between pretty and usable.

Thoughts?
Comment 8 Denis Roy CLA 2008-07-17 10:22:11 EDT
(In reply to comment #7)
> Thoughts?

Cancel that.  Adding a link to each file will add substantial html and increase load time.

I have a better idea -- I'll add the file name to the "Translatable strings" header upon clicking it, with a link to the file.  This will be faster, add less clutter and provide better usability. 

Comment 9 Denis Roy CLA 2008-07-17 12:16:22 EDT
Created attachment 107750 [details]
Screenshot

Here is the implementation of bookmarkable links to a file and a string.

I also fixed the issue where the translation form was not being show while loading the values from the URL.
Comment 10 Denis Roy CLA 2008-07-17 12:17:00 EDT
Everything here is done and on staging, will be live on next deployment.
Comment 11 Denis Roy CLA 2008-07-24 11:10:30 EDT
Released > R_0_200807241100