Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: 6.7.0 Classic Does Not Resize with Viewport

    You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User
    Join Date
    Jun 2018
    Posts
    21

    Default 6.7.0 Classic Does Not Resize with Viewport

    It seems I was a bit overzealous in trying to "upgrade" from 6.6.0 so soon after the release of 6.7.0.

    Classic apps do not seem to be able to resize when the viewport resizes anymore. They retain their original dimensions from when they were first rendered.

    Here's a very simple fiddle to demonstrate. I recommend opening it in its own tab/window, so that the viewport can be resized.



    Do other early-adopters have this same issue? Am I just missing a new config or something? I hope the issue is with me, but if it is not, then this is quite disappointing. Well, at least that scroller console warning is finally gone from Modern.

  2. #2
    Sencha Premium User
    Join Date
    Jan 2009
    Posts
    466

    Default

    I'm seeing the same thing. This is a very serious bug and needs to be fixed immediately. Ext JS 6.7 is useless with this bug.

    I haven't followed it all the way, but it looks like there were some very strange changes made to the src\plugin\Viewport.js plugin. It used to extend from Ext.plugin Response in 6.6, but now it just extends from Ext.plugin.Abstract and depends on requires to allow some responsive mixins!? This is bad in that it doesn't seem to work, but also bad in that it seems an abuse of what requires was meant to do and will make applying path overrides to fix this harder.

    Ext 6.6:

    Code:
    Ext.define('Ext.plugin.Viewport', {
        extend: 'Ext.plugin.Responsive',
    
    
        alias: 'plugin.viewport',
    Ext 6.7

    Code:
    Ext.define('Ext.plugin.Viewport', {
        extend: 'Ext.plugin.Abstract',
    
    
        requires: [
            'Ext.Responsive'
        ],
    
       alias: 'plugin.viewport',

  3. #3
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    331

    Default

    Thanks for the report. I've opened a new issue for this.
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

  4. #4
    Sencha Premium User wemerson.januario's Avatar
    Join Date
    Nov 2008
    Location
    Goiânia - GO, Brazil
    Posts
    898

    Default

    +1 Ext JS 6.7
    Code:
     plugins: 'viewport',
    still fail
    Wemerson Januario @JanuarioCoder
    Novanti Tecnologia, Sencha MVP/ Ext JS Consultant
    ____________________________________________
    Hire me on UpWork:

    GitHub
    https://github.com/wemersonjanuario

    Treinamento e Consultoria Ext JS. QUALIFIQUE-SE JÁ!

  5. #5
    Sencha Premium User
    Join Date
    Jan 2009
    Posts
    466

    Default

    Just checked the nightly. I was dismayed to find that the only change in classic from minor version 163 to 165 was a doubling down on this new responsive design. The ResponsiveApp.view.main.Main example had the responsive plugin removed and replaced by the requires: ['Ext.Responsive'] code.

    I'm not the final authority on Ext architecture, but it seems to me that basing resize logic as a side effect of an override that gets included as part of the loading processes will not work well. Please back out this design and rethink it. Or, if it is truly better, please fix it so Viewports work again and explain why this design is better than the plugin architecture we had before.

  6. #6
    Sencha User
    Join Date
    Jan 2016
    Location
    Brazil
    Posts
    138

    Default

    I noticed responsive examples in our code still worked in 6.7.0 even though viewports ignored windows resize. So experimenting a little with this I found this quick workaround, based on the initial fiddle:



    Basically from the initial example I changed the outer Panel reference to Viewport (so that the issue can actually be reproduced), and to actually come around the issue, added an empty responsive config with responsiveConfig: { }. Didn't need to add extra require or use plugin (probably resolved by Ext JS itself).

    This is equivalent to using this override to Ext.Viewport:

    Code:
    Ext.define("gh1627", {
        override: 'Ext.Viewport',
        constructor: function(config) {
            Ext.applyIf(config, { responsiveConfig: {} });
            this.callParent(arguments);
        }
    });
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  7. #7
    Sencha Premium User
    Join Date
    Jan 2009
    Posts
    466

    Default

    Interesting. Thanks for the workaround!

    This seems to work for the actual Viewport class. We're still missing behavior that was in 6.6 since there it was possible to include the viewport plugin on an arbitrary component and turn it into a 'viewport' that would respond to browser resize. For example, this works in 6.6 but not 6.7:



    Maybe there's an equivalent way of doing this with responsive configs? Still seems to me that depending on some magic requires: [] to be there is less intuitive and less powerful than the plugin, but maybe there was some reason Sencha can tell us. Haven't worked much with modern; maybe that's the way things are done there?

  8. #8
    Sencha Premium User
    Join Date
    Jun 2018
    Posts
    21

    Default

    I tend to use the fullscreen: true config in Modern where I would use the viewport plugin in Classic. If I want a responsive layout in Modern, there is no difference from Classic, which means using the responsive plugin and responsiveConfig. So as far as I know, there hasn't been any Modern equivalent of this strange requires: ["Ext.Responsive"] up until this point.

    I too am curious about the reason for this change, especially because it seems so ineffective!

  9. #9
    Sencha Premium User
    Join Date
    Jan 2009
    Posts
    466

    Default

    I see in the nightly 166 where they're trying to fix the code, though it's more along the lines of the workaround discussed in this thread and not a back out. I haven't tested it yet so don't know if it works, but at least they're looking at it.

  10. #10
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    331

    Default

    This issue has been fixed in development, with the fix included in the latest nightly build (available from the Support Portal).
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

Page 1 of 2 12 LastLast

Similar Threads

  1. Stencil for Classic\classic and Classic\theme-gray
    By ORS in forum Sencha Stencils
    Replies: 0
    Last Post: 13 Dec 2018, 5:59 AM
  2. Replies: 7
    Last Post: 10 Sep 2018, 3:22 AM
  3. [OPEN] [Classic][RTL][6.2.1] cellediting problem with viewport
    By Mahmoud690 in forum Ext JS 6.x Bugs
    Replies: 3
    Last Post: 9 Feb 2017, 1:49 PM
  4. Replies: 1
    Last Post: 28 Jan 2017, 8:07 PM
  5. Replies: 3
    Last Post: 28 Jun 2013, 5:31 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •