Merge lp:~sinzui/launchpad/halt-when-done into lp:launchpad

Proposed by Curtis Hovey
Status: Merged
Approved by: Curtis Hovey
Approved revision: no longer in the source branch.
Merged at revision: 15238
Proposed branch: lp:~sinzui/launchpad/halt-when-done
Merge into: lp:launchpad
Diff against target: 0 lines
To merge this branch: bzr merge lp:~sinzui/launchpad/halt-when-done
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+105542@code.launchpad.net

Commit message

Fix script blocks that mutate their parent and fix overlay css for MSIE.

Description of the change

Pre-implementation: wgrant

I started this branch to fix ChoiceSource, but I found I first had to
fix the load errors caused by broken scripts. I did not fix my bug,
but I have made Lp usable to MSIE users.

--------------------------------------------------------------------

RULES

    * View the source of IE to see where rendering stopped to locate
      the part of the template to provides the bad script block
    * Move the script block or add a DOMReady event listener to ensure
      the block is not mutating the parent element while the DOM is
      being created.

    ADDENDUM
    * Oh, the overlays do work. They are not broken by JS, but they are
      missing the right CSS. Use display: none instead of visibility: hidden
      for forms because IE only handles it correctly in IE9.
    * Enable each overlay with an Y.UA.ie guard and verify the fields
      are not shown on load, that you can display and submit the overlay.

QA

    Page loads without HTML Parsing Error in MSIE.
    * Visit https://blueprints.qastaging.launchpad.net/gdp/+spec/gdplaunchpad
    * Verify the page loads and that the blueprint description can
      be edited.
    * Visit https://code.qastaging.launchpad.net/~sinzui/+recipe/pocket-lint-daily
    * Verify the page loads and that the recipe description can
      be edited.
    * Visit https://bugs.qastaging.launchpad.net/gdp/+bug/420173
    * Verify the page loads and that the blueprint description can
      be edited.
    * Verify the bug tag editor works.
    * Verify the comment editor works.

    Overlays work in MSIE
    * Visit https://code.qastaging.launchpad.net/~sinzui/+recipe/pocket-lint-daily
    * Verify the target series can be edited.
    * Visit https://qastaging.launchpad.net/gdp/+configure-bugtracker
    * Verify that an external bug tracker can be registered.
    * Visit https://bugs.qastaging.launchpad.net/gdp/+bug/936705
    * Verify the duplicate bug overlay works.
    * Verify the subscribe overlay works.
    * Verify you can link to a related branch.
    * Visit the branch
    * Verify you can subscribe to the branch
    * Propose a merge.
    * Visit the bug again.
    * Verify you can see the inline diff.
    * Visit https://qastaging.launchpad.net/gdp/incubation
    * Verify you can create a milestone.

LINT

    lib/lp/app/javascript/multicheckbox.js
    lib/lp/app/javascript/formoverlay/assets/formoverlay-core.css
    lib/lp/app/javascript/overlay/assets/pretty-overlay-core.css
    lib/lp/app/templates/inline-multicheckbox-widget.pt
    lib/lp/app/templates/text-area-editor.pt
    lib/lp/app/widgets/templates/bugtracker-picker.pt
    lib/lp/bugs/javascript/bugtask_index.js
    lib/lp/bugs/javascript/bugtracker_overlay.js
    lib/lp/bugs/templates/bugcomment-macros.pt
    lib/lp/bugs/templates/bugtask-index.pt
    lib/lp/bugs/templates/bugtasks-and-nominations-portal.pt
    lib/lp/code/javascript/branch.subscription.js
    lib/lp/code/javascript/branchmergeproposal.diff.js
    lib/lp/code/templates/branch-related-bugs-specs.pt
    lib/lp/code/templates/sourcepackagerecipe-index.pt
    lib/lp/registry/javascript/milestoneoverlay.js
    lib/lp/registry/templates/productrelease-add-from-series.pt

^ Lint does not like some of the older js. I can fix the spacing and
  semi-colon issues before I land. There are indentation inconsistencies
  in the templates that I can fix too.

TEST

    ./bin/test -vvc --layer=YUITest lp
    ./bin/test -vvc -t bugtask-management lp.bugs.tests.test_doc

IMPLEMENTATION

Realised the broken overlay was caused by naive use the visibility and
box shadow CSS properties. Most designers will use The css display property
which is properly supported (and invented) by msie. I added two shadows
to using ms' filter property. The older syntax for IE4-7 is not supported
by our build tools...they choke on the non-standard syntax...c'est la vie.
    lib/lp/app/javascript/formoverlay/assets/formoverlay-core.css
    lib/lp/app/javascript/overlay/assets/pretty-overlay-core.css

Enabled the pretty overlay, form overlay, and overlay widgets for IE.
    lib/lp/app/javascript/multicheckbox.js
    lib/lp/app/templates/inline-multicheckbox-widget.pt
    lib/lp/app/widgets/templates/bugtracker-picker.pt
    lib/lp/bugs/javascript/bugtask_index.js
    lib/lp/bugs/javascript/bugtracker_overlay.js
    lib/lp/code/javascript/branch.subscription.js
    lib/lp/code/javascript/branchmergeproposal.diff.js
    lib/lp/code/templates/branch-related-bugs-specs.pt
    lib/lp/code/templates/sourcepackagerecipe-index.pt
    lib/lp/registry/javascript/milestoneoverlay.js
    lib/lp/registry/templates/productrelease-add-from-series.pt

Move script that mutate the parent element out of the parent. Set some
to on on DOMReady to ensure the nodes that must be changed are available.
This was a long painful task to prove I could load the bug page. Fixing the
text-area-editor also fixed the known bug for recipes and blueprints.
    lib/lp/app/templates/text-area-editor.pt
    lib/lp/bugs/templates/bugcomment-macros.pt
    lib/lp/bugs/templates/bugtask-index.pt
    lib/lp/bugs/templates/bugtasks-and-nominations-portal.pt

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) wrote :

50 -webkit-box-shadow: 0px 0px 20px 10px #aaa;
51 + -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=15, Direction=135, Color='#aaaaaa'), progid:DXImageTransform.Microsoft.Shadow(Strength=15, Direction=315, Color='#aaaaaa')";
52 box-shadow: 0px 0px 20px 10px #aaa;

Yay, I never quite got around to working out the syntax for that.

184 - Y.lp.bugs.bugtask_index.setup_bugtask_index();
185 - Y.on('load', function(e) {
186 + Y.on('domready', function(e) {
187 Y.lp.code.branchmergeproposal.diff.connect_diff_links();
188 }, window);
189 Y.on('domready', function() {

Could those two domready handlers be merged?

249 + if (LP.links['me'] !== undefined) {
250 + Y.one('#edit-tags-trigger').on('click', function(e) {
251 + e.halt();
252 + });
253 + }

Is this still necessary? You removed an XXX comment which suggests it might not be.

review: Approve (code)

Preview Diff

Empty