Merge lp:~sinzui/launchpad/progressive-enhancement-ftw-2 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | j.c.sackett on 2012-04-30 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15180 |
| Proposed branch: | lp:~sinzui/launchpad/progressive-enhancement-ftw-2 |
| Merge into: | lp:launchpad |
| Prerequisite: | lp:~sinzui/launchpad/progressive-enhancement-ftw |
| Diff against target: |
820 lines (+499/-92) 16 files modified
lib/lp/code/javascript/requestbuild_overlay.js (+15/-0) lib/lp/code/javascript/tests/test_requestbuild_overlay.html (+16/-0) lib/lp/code/javascript/tests/test_requestbuild_overlay.js (+55/-24) lib/lp/code/javascript/tests/test_util.html (+85/-0) lib/lp/code/javascript/tests/test_util.js (+90/-0) lib/lp/code/javascript/util.js (+23/-9) lib/lp/code/templates/branch-import-details.pt (+10/-11) lib/lp/code/templates/branch-listing.pt (+1/-3) lib/lp/code/templates/branchmergeproposal-generic-listing.pt (+5/-13) lib/lp/code/templates/daily-builds-listing.pt (+1/-3) lib/lp/code/templates/sourcepackagerecipe-index.pt (+7/-18) lib/lp/translations/javascript/importqueue.js (+4/-0) lib/lp/translations/javascript/tests/test_importqueue.html (+110/-0) lib/lp/translations/javascript/tests/test_importqueue.js (+67/-0) lib/lp/translations/templates/pofile-export.pt (+2/-1) lib/lp/translations/templates/translation-import-queue-macros.pt (+8/-10) |
| To merge this branch: | bzr merge lp:~sinzui/launchpad/progressive-enhancement-ftw-2 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| j.c.sackett (community) | 2012-04-28 | Approve on 2012-04-30 | |
|
Review via email:
|
|||
Commit Message
Avoid noscript because it contradicts progressive enhancement assumptions.
Description of the Change
Pre-implementation: wgrant
Several features fail for less common browsers because noscript is used
for the default markup. When progressive enhancement fails, there is no
default markup to fallback to. YUI assumes progressive enhancement works.
Over the last 3 years, we have seen IE, Opera, Konquorer and Firefox 3
break because progressive enhancement failed without fallback.
The branch completes the removal of noscript by updating Code and
Translations.
-------
RULES
* Remove all uses of noscript that interact with YUI.
QA
# This page times out in production
* Visit https:/
* Verify the js browser filters the branches when the select field
is changed.
* Verify the non-js browser shows the Filter button and submit it changes
the listed branches.
* Visit https:/
* Verify that the branch listing updates when the status and sort fields
change in the js browser.
* Verify the non-js browser shows the Filter button and submit it changes
the listed branches.
* https:/
* Verify that the branch listing updates when the status field
changes in the js browser.
* Verify the non-js browser shows the Filter button and submit it changes
the listed branches.
* Visit https:/
* Verify the Retry button does not appear under Import details in
the js browser; there is a retry link with a sprite.
* Verify the Retry button appears under Import details the in
non-js browser.
* Visit https:/
* Verify the Build Now button does not appear under Build Schedule in
the js browser.
* Verify the Build Now button appears under Build Schedule in the
non-js browser.
* Visit https:/
* Verify the checkbox under format does not have the italic
"PO format only:" text in the js browser.
* Verify the italic text "PO format only:" appears below the checkbox
in the non-js browser.
* Visit https:/
* Verify the statuses are choice links in the js-browser.
* Verify the statuses are select widgets in the non-js browser and
that there is a submit button below the listing.
LINT
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
TEST
./bin/test -vvc --layer=YUITest lp.code
./bin/test -vvc --layer=YUITest lp.translations
IMPLEMENTATION
Added A new method to requestbuild_
build schedule when the page is setup. This was the only inline script
in the page...all the rest of the page was represented in the module
with tests. Adding a new testcase for my small change was frustrating, I
discovered that the existing tests were not cleaning up. I updated the
existing tests to tearDown to prevent duplicate ids from occurring. I
also simplified the setups to use a template.
lib/
lib/
lib/
lib/
Replaced inline filter-
uses common code to support the common behaviour. I added a new YUI test
for all the methods that I changed to added.
lib/
lib/
lib/
lib/
lib/
lib/
lib/
I updated the page's inline script to hide the PO format only message. I
choose not to test this because the text does not offer functionality.
lib/
Updated Y.lp.translatio
hide the html form selects and inputs that were hidden by noscript. I added
a YUI test. The html harness is huge :(
lib/
lib/
lib/
lib/

This looks good. Thanks for purging noscript and the improved test coverage.