Code review comment for lp:~adiroiban/launchpad/bug-135008

Revision history for this message
Adi Roiban (adiroiban) wrote :

= Bug 135008 =
== Proposed fix ==

Right now when you access the translations.lp.net/+languages page, the search field is not focused and you will need click the search field first.

The fix should focus the search field when the page is loaded.
Also after a search strings was entered and it matched some languages, the field is not focused and you can use the up/down key to scroll the page.

If the search string did not match any language, the search field will be focused and highlighted for entering a new search string.

== Implementation details ==

Update LanguageSetView to be a LaunchpadFormView and also do the required changes in languageset-index.pt.

== Tests ==

bin/test -ct language

== Demo and Q/A ==

Go to https://translations.launchpad.dev/+languages

On a browser with javascript enabled you should see that the search
field is focused and you can start typing right away.

Now type a search string, ex "es" and then Enter or push the button.

You should see a series of results and the search field no longer being focused.

That's all.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/services/worlddata/interfaces/language.py
  lib/lp/translations/browser/language.py
  lib/lp/translations/stories/standalone/xx-language.txt
  lib/lp/translations/templates/languageset-index.pt

== Pylint notices ==

lib/lp/services/worlddata/interfaces/language.py
    18: [F0401] Unable to import 'lazr.enum' (No module named enum)
    20: [F0401] Unable to import 'lazr.restful.declarations' (No module named restful)

« Back to merge proposal