Ticket #2530145 (closed task)

Reporter


Ben Joffe
Opened: 04/21/11
Last modified: 12/12/12
Status: closed
Type: task
Resolution: fixed

Owner


Derek Gathright
Target Release: 3.7.0
Priority: P3 (normal)
Summary: [Pull Request] - Fix pages.scrollTo to actually update index + simplifying.
Description:

A bug exists in paginator where calling scrollTo(n) will visually scroll it, but won't updater index, so the scrollview is in a broken state (eg. a subsequent prev() call will not be correct). Fixing
that required rearranging a bit of the code to avoid circular call loops, while I was at it I also made the private functions make use of next() and prev() in order to simplify them.

Type: task Observed in Version: development master
Component: ScrollView Severity: S3 (normal)
Assigned To: Derek Gathright Target Release: 3.7.0
Location: Priority: P3 (normal)
Tags: pull request, github Relates To:
Browsers: All
URL: https://github.com/benjoffe/yui3/commit/ffc2d826cae7c9682e1ed6499dcc53f16b544b2c
Test Information:

Change History

Ben Joffe

YUI Contributor

Posted: 04/21/11

Pull Request from benjoffe
Commit: /benjoffe/yui3/commit/ffc2d826cae7c9682e1ed6499dcc53f16b544b2c
Files modified:

Ben Joffe

YUI Contributor

Posted: 04/21/11

Note, this makes one observable change to the user. Previously the workaround to this bug was to use pages.set('index', n) which would animate to the new index. This will no longer animate to the new index but snap there, this seems logical since scrollTo(n) does not animate unless a duration is provided.

Satyen Desai

YUI Developer

Posted: 04/27/11
  • status changed from new to accepted

Satyen Desai

YUI Developer

Posted: 04/27/11
  • milestone changed to 3.4.0

Satyen Desai

YUI Developer

Posted: 06/23/11
  • estimated changed from 0 to 0.5
  • sprint changed to sprint 3

Tilo Mitra

YUI Developer

Posted: 06/27/11

Tilo Mitra

YUI Developer

Posted: 06/28/11
  • sprint changed from sprint 3
  • status changed from assigned to accepted

Tilo Mitra

YUI Developer

Posted: 08/10/11
  • milestone changed from 3.4.0 to 3.4.1

Tilo Mitra

YUI Developer

Posted: 08/24/11

Satyen Desai

YUI Developer

Posted: 08/24/11
  • status changed from assigned to accepted

Backlog for 3.4.1

Satyen Desai

YUI Developer

Posted: 09/27/11
  • milestone changed from 3.4.1 to 3.5.0

Satyen Desai

YUI Developer

Posted: 11/7/11

Derek Gathright

YUI Developer

Posted: 11/9/11
  • sprint changed to sprint 1
  • status changed from assigned to accepted

Derek Gathright

YUI Developer

Posted: 11/9/11
  • sprint changed from sprint 1

Derek Gathright

YUI Developer

Posted: 12/14/11
  • remaining changed from 0 to 0.5
  • sprint changed to sprint 2

Derek Gathright

YUI Developer

Posted: 01/31/12
  • sprint changed from sprint 2 to sprint 3

Adriano Castro

Posted: 03/26/12

Additionally, when setting the index it should be possible to define whether you want it to animate the scrollTo or not. At the moment an index change will call scrollTo with hardcoded animation settings:

_uiIndex: function(index) {
this.scrollTo(index, 350, 'ease-out');
},

As a user you should be able to call:

sv.pages.set("index", N, customAnimationOrNoAnimation)

This then brings up the discussion of whether or not we should have a single method instead of two public methods that basically do the same thing. I can’t imagine a scenario where you’ll ever want to call scrollTo and not update the index or update the index and not call a scrollTo but I’ll let you decide that.

Derek Gathright

YUI Developer

Posted: 03/27/12
  • milestone changed from 3.5.0 to 3.6.0

Derek Gathright

YUI Developer

Posted: 03/27/12
  • sprint changed from sprint 3 to backlog

Derek Gathright

YUI Developer

Posted: 07/21/12
  • milestone changed from 3.6.0 to 3.7.0

Jenny Donnelly

YUI Developer

Posted: 08/1/12
  • milestone changed from 3.7.0 to 3.6.x

Moving 3.7.0 bugs to 3.6.x for triage.

Derek Gathright

YUI Developer

Posted: 08/7/12
  • milestone changed from 3.6.x to 3.7.0
  • sprint changed from backlog to Sprint 01

Derek Gathright

YUI Developer

Posted: 08/7/12
  • milestone changed from 3.7.0 to 3.6.x

Derek Gathright

YUI Developer

Posted: 08/30/12
  • remaining changed from 0.5 to 0
  • status changed from accepted to checkedin

This was resolved with the large refactoring that occurred in ScrollView for the recently released 3.7.0pr1 version. I'm not sure this resolve's Adriano's suggestion. New ticket for that @ #2532698

Jenny Donnelly

YUI Developer

Posted: 09/18/12
  • milestone changed from 3.6.x to 3.7.0

Moving from 3.6.x to 3.7.0.

Jenny Donnelly

YUI Developer

Posted: 12/12/12
  • resolution changed to fixed

Jenny Donnelly

YUI Developer

Posted: 12/12/12
  • status changed from checkedin to closed