PDA

View Full Version : [CLOSED] 4.0.2a Grid infinite scrolling broken



stevil
8 Jun 2011, 5:14 AM
In 4.0.1, my grid worked correctly (subject to the performance problems we all know about) with respect to scrolling (infinite scroll against a buffered grid).

In 4.0.2, the scroller appears, but clicking in the scroll area does not move the scroll thumb, and dragging the scroll thumb does not scroll the grid content.

stevil

Mjollnir26
8 Jun 2011, 5:59 AM
My bug might be related?

http://www.sencha.com/forum/showthread.php?136245-4.0.2-RC-3-Regression-in-Sorting-buffered-Grid-%28First-row-is-chopped-off%29

stevil
8 Jun 2011, 6:11 AM
My bug might be related?

http://www.sencha.com/forum/showthread.php?136245-4.0.2-RC-3-Regression-in-Sorting-buffered-Grid-%28First-row-is-chopped-off%29

It could be...

edspencer
8 Jun 2011, 9:24 PM
We resolved this issue earlier today in source control, will be fixed in the next build

stevil
10 Jun 2011, 4:24 AM
We resolved this issue earlier today in source control, will be fixed in the next build

If "the next build" refers to the ext-4.0.2 final that went out yesterday, then it hasn't solved the problem for me. Going back to 4.0.1...

stevil

edspencer
10 Jun 2011, 10:07 AM
If "the next build" refers to the ext-4.0.2 final that went out yesterday, then it hasn't solved the problem for me. Going back to 4.0.1...

stevil

As in http://dev.sencha.com/deploy/ext-4.0.2/examples/grid/buffer-grid.html? Works correctly for me in everything I try

stevil
10 Jun 2011, 10:25 AM
As in http://dev.sencha.com/deploy/ext-4.0.2/examples/grid/buffer-grid.html? Works correctly for me in everything I try
Ed,

It's in my application, where I have a grid loaded into a container in the center region of a BorderLayout. In 4.0.1, The grid would load, and moving the scroller would scroll the grid. In 4.0.2, I can move the scroller, but the grid contents don't scroll.

stevil

stevil
16 Jun 2011, 8:17 AM
Is anyone else seeing this in 4.0.2?

stevil

wsi
16 Jun 2011, 9:05 AM
Is anyone else seeing this in 4.0.2?

Yes, same scenario with grid in center region. Having a bit of difficulty isolating and replicating. Appears to occur when there's enough data to make a scrollbar appear (scroll + grid work as expected), then all data is purged, then enough data is plugged back in to make the scrollbar appear (scroller moves, grid doesn't).

azuroff
16 Jun 2011, 9:09 AM
Is anyone else seeing this in 4.0.2?

stevil

Yes! http://www.sencha.com/forum/showthread.php?137317-4.0.2a-Strange-scrollbar-behavior

And mine is also a grid in the center region of a border layout.

azuroff
16 Jun 2011, 9:26 AM
For the ones with this bug - does resizing the grid make any difference in the ability to scroll? At least in my particular case (vertical scrollbar thumb sometimes AWOL), resizing the grid using one of the east/west panels seems to "fix" the problem - the thumb appears and works normally.

stevil
16 Jun 2011, 9:56 AM
For the ones with this bug - does resizing the grid make any difference in the ability to scroll? At least in my particular case (vertical scrollbar thumb sometimes AWOL), resizing the grid using one of the east/west panels seems to "fix" the problem - the thumb appears and works normally.

1) I am also using a center region in a Border layout.
2) My scroller appears consistently when needed
3) Resizing seems to recalculate scroller size and position
4) Resizing does not "unlock" (my term) the functionality of the scroller
5) Dragging the scroller, clicking in the paging space, or using the scroll arrows has no effect.
6) Reverting to 4.0.1 causes the problem to go away.

@azuroff, I really think you're on to something with the layout - Ed noted that the example works fine, and that grid example does not use a layout.

stevil

azuroff
16 Jun 2011, 10:35 AM
@azuroff, I really think you're on to something with the layout - Ed noted that the example works fine, and that grid example does not use a layout.


The other thing the example doesn't do any more is pull data from a server. Based on the sporadic nature of the problem and what I've found so far by digging around, it really feels like some kind of timing issue - something you probably couldn't replicate with a memory-based store.

stevil
16 Jun 2011, 11:46 AM
Still not working in 4.0.2a. Falling back to 4.0.1...

stevil

wsi
16 Jun 2011, 2:38 PM
The following fixed my issue in 4.0.2a


Ext.override(Ext.panel.Table, {
showVerticalScroller: function() {
var me = this;

me.setHeaderReserveOffset(true);
if (me.verticalScroller && me.verticalScroller.ownerCt !== me) {
//ensure scroll listener is attached
if (me.verticalScroller.scrollEl) {
me.verticalScroller.mun(me.verticalScroller.scrollEl, 'scroll', me.verticalScroller.onElScroll, me.verticalScroller);
me.verticalScroller.mon(me.verticalScroller.scrollEl, 'scroll', me.verticalScroller.onElScroll, me.verticalScroller);
}
me.addDocked(me.verticalScroller);
me.addCls(me.verticalScrollerPresentCls);
me.fireEvent('scrollershow', me.verticalScroller, 'vertical');
}
}
});


Still unable to create a clean test case for this one. Just wanted to share what's working so far, in case it points anyone in the right direction. Somehow the scroll listener is unregistered, and never re-registered. This is strange as Ext.grid.Scroll's afterRender() and initComponent() are only tripped at app launch, and never again afterwards during all the scroller's show/hides. Yet, mun() is only supposed to unregister upon destruction. So either the scroller's being destroyed and re-appearing without being rendered again, or something else is unregistering the listener without destroying the scroller.

In the meantime, please let me know if this works in your cases. By the way, are people experiencing this in a grid in a border layout panel in a window in a desktop? Wondering if I need to expand the test cases to encapsulate within windows and/or the desktop.

stevil
17 Jun 2011, 5:39 AM
@wsi,

That did not change my scroll behavior. As for my config, I'm in a center region, border layout grid panel in a viewport (not a window).

If you come up with anything else, I'll be happy to try it!

stevil

stevil
18 Jun 2011, 1:48 PM
Does anyone from Sencha have additional thoughts on this given the additional information provided after Ed's initial response?

stevil

Albinoswordfish
18 Jun 2011, 7:48 PM
I'm also having the same problem with infinite scrolling, however it doesn't seem to matter if I change my layout to 'fit' or 'border', when I move my scroll bar the grid view doesn't change at all.
My grid panel is within another Window.

stevil
19 Jun 2011, 5:53 AM
I'm also having the same problem with infinite scrolling, however it doesn't seem to matter if I change my layout to 'fit' or 'border', when I move my scroll bar the grid view doesn't change at all.
My grid panel is within another Window.

And falling back to 4.0.1 fixes it, right?

Animal
20 Jun 2011, 5:18 AM
Well, I'll try to replicate this.

Animal
20 Jun 2011, 5:25 AM
OK, I've taken the 4.0.4 code base, and put the infinite-scroll example inside a layout:'fit' Window and I can't make it go wrong.

Any other suggestions?

Animal
20 Jun 2011, 5:42 AM
OK, the 4.0.3 one does not seem to work in a layout:'fit' Window.

Now to spot the difference!

Animal
20 Jun 2011, 5:48 AM
Are you specifying a configured width and height for the grid even though it's going inside a size-managing layout?

Animal
20 Jun 2011, 5:53 AM
I'm also having the same problem with infinite scrolling, however it doesn't seem to matter if I change my layout to 'fit' or 'border', when I move my scroll bar the grid view doesn't change at all.
My grid panel is within another Window.

What layout manager are you asking the Window to use to size the child grid?

stevil
20 Jun 2011, 5:54 AM
@Animal,

Thanks for looking into this - can you make it happen with the grid in a center region of a border layout? That seems to be one aspect in common among the people who are affected.

I'll be trying today to isolate a test case out of my application - it's a little difficult only because of project time pressure.

stevil
P.S (perhaps 4.0.4 fixed it based on other work? I'd take that!)

Animal
20 Jun 2011, 6:04 AM
It works when the grid is the center region of a border layout. That's in the 4.0.3 code base.

stevil
20 Jun 2011, 7:20 AM
Is 4.0.3 available to anyone outside Sencha at the moment?

stevil

Albinoswordfish
20 Jun 2011, 7:25 AM
What layout manager are you asking the Window to use to size the child grid?

Right now the GridPanel is inside a TabPanel which is using a border layout. The GridPanel is in the 'center' region.

Animal
20 Jun 2011, 7:45 AM
"in" the center region? That doesn't sound right. But if in fact you have put the grid in a Panel which is the center region, what layout is that Panel using to size the child grid?

And TabPanels do not use border layout. They use card layout, that's their nature.

Albinoswordfish
20 Jun 2011, 8:13 AM
"in" the center region? That doesn't sound right. But if in fact you have put the grid in a Panel which is the center region, what layout is that Panel using to size the child grid?

And TabPanels do not use border layout. They use card layout, that's their nature.

Sorry I think I didn't word this correctly. I'll try to explain it through code

I'm creating a grid panel with region : 'center' in the config



var tabpanel = Ext.create('Ext.tab.Panel');

var panel = Ext.create('Ext.grid.Panel', {region : 'center'});

var tab = tabpanel.add({
title : 'test',
layout : 'border',
items : [panel]
});


I meant to say the panel within the tab is using a border layout

stevil
20 Jun 2011, 10:40 AM
It works when the grid is the center region of a border layout. That's in the 4.0.3 code base.

Animal,

I just got a clarification as to what 4.0.3 really is (4.0.2a) - and the scroller is still broken in a center region of a border layout in my app. I'm still running 4.0.1 because of that issue and that issue alone.

stevil

stevil
20 Jun 2011, 11:59 AM
CRAP. All this time chasing my tail. It's a THEME issue. (at least for me).

If I use ext-all.css from the factory the rest of my app looks horrible, because I've built a lot of my styles are baked into the theme, BUT - the scroller works.

If I use my own theme, copied from default and customized for colors, the scroller DIV appears out of whack with respect to the page.

I'll ping Rob and see if he knows anything about this.

Thanks for your help, Animal!

stevil

stevil
20 Jun 2011, 12:14 PM
Have filed the following with respect to what I've found: http://www.sencha.com/forum/showthread.php?137756-4.0.2a-(3)-Custom-Theme-breaks-Scroller&p=616415.

stevil

stevil
20 Jun 2011, 12:29 PM
I'd like to make the observation that, even with invalidateScrollerOnRefresh set to false, invalidate() seems to get called on the scroller once for each column in the grid, and possibly once or twice more for good measure.

This may not be the cause of performance problems, but I'm thinking it should get run once after all the columns are laid out, no?

stevil

edspencer
20 Jun 2011, 12:31 PM
I'd like to make the observation that, even with invalidateScrollerOnRefresh set to false, invalidate() seems to get called on the scroller once for each column in the grid, and possibly once or twice more for good measure.

This may not be the cause of performance problems, but I'm thinking it should get run once after all the columns are laid out, no?

stevil

We've got a number of improvements focusing on grid, including some simplifications to how the infinite scrolling system works

stevil
20 Jun 2011, 12:46 PM
Very good to hear - I look forward to that!

stevil