Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[staging] merge v1.3.0 #1253

Merged
merged 24 commits into from
Sep 10, 2015
Merged

[staging] merge v1.3.0 #1253

merged 24 commits into from
Sep 10, 2015

Conversation

shawnbot
Copy link
Contributor

@shawnbot shawnbot commented Sep 9, 2015

See the release notes (or the diff below) for what's changed.

Shawn Allen and others added 22 commits September 8, 2015 17:42
In one very specific case, tooltips were being removed from the page
when new search results were rendered. This fixes that issue by stashing
a reference to the tooltip's "original parent" and returning it to that
element when the tooltip is hidden, so that if the element in which it
was shown is removed, the tooltip isn't removed with it.
This moves setting the `previousParams` variable to *after* a request is
successfully made, which avoids a specific issue with pagination in the
case that the user:

1. visits a specific page in the results,
2. modifies the search criteria, and
3. modifies the search criteria again before the second request returns.

Previously, the comparison of the changed parameters between steps 2 and
3 would *not* trigger a page reset.
This started as an IE11 bug fix and ended as a performance optimization.
IE11 was throwing untraceable errors somewhere inside tagalong() with
the long list of template directives specified in
`picc.school.directives`. These are all used on the school page (where
they appear not to be a problem), but on search we only use a small
subset of them to render each result item, so we use a subset of the
directive keys. This improves performance and appears to resolve the
IE11 crashes when rendering new data after a change to search criteria.
This change introduces a bit of code that removes all of the elements
that get updated when the search results come back. Specifically, I
think that IE was crashing in cases when the number of items changed
(possibly only when it decreased), so to avoid the rudimentary "data
join" logic in tagalong, we just remove all of the children of the
results list before calling tagalong().

The important thing to note here is that **we only do this in IE *and*
if results have been loaded already**. In that case, tagalong has
already stashed a reference to the "template" node that gets used to
render each result item, so removing all of the children is safe. (This
is what happens when we get a zero-length result set anyway.)
IE11 and misc. search fixes
shawnbot added a commit that referenced this pull request Sep 10, 2015
[staging] merge v1.3.0
@shawnbot shawnbot merged commit c53cc9b into staging Sep 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants