RadPageLayout detects wrong screensize and viewport

13 posts, 0 answers
  1. BiBongNet
    BiBongNet avatar
    27 posts
    Member since:
    May 2010

    Posted 02 Nov 2014 Link to this post

    Hi,

    I'am using PageLayout and Device Detection framework, version 2014.3.1024 (just released!).

    The problem is: PageLayout responds incorrectly with device screen size and viewport of browsers.

    For example:

    - Set HiddenLg="True" for LayoutColumn, but this column is hidden with browser viewport 1025-1280 (which is actually Medium).
    - Set HiddenXl="True" for LayoutColumn, but this column is hidden with browser viewport 1281 and higher (1281-1366 is actually Large, and 1367 and higher is Extra large).

    This occurs with all other options and also device screen (I have tested on some mobile phones)... It seems PageLayout is always one step higher than  DeviceScreenSize enum of Detection framework. Looking inside your DeviceScreenSize enum (as pasted below), I think the problem is obviously there (perhaps?): This enum version is without ExtraSmall while PageLayout does have ExtraSmall option (Xs). So wrong mapping of value between PageLayout and DeviceScreenSize enum might cause one step different among the two.

    The enum should be:

    ExtraSmall = 0,
    Small = 1,
    Medium = 2,
    Large = 3,
    ExtraLarge = 4,

    Please check if this is the problem.

    By the way, I would suggest the following feature:

    HiddenUp, HiddenDown (or whatever the name is)

    In many cases (if not to say most cases), you want to set hidden to an element from a point upward or downward.
    Let's say:

    - Case HiddenDown:
    You want to set hidden for a div with Medium, Small and ExtraSmall (display on Large and ExtraLarge), now you have to set these:
    HiddenMd="True" HiddenSm="True" HiddenXs="True"

    With HiddenDown="Md" would cover them all.

    - Case HiddenUp:
    You want to set hidden for a div with Medium, Large and ExtraLarge (display with ExtraSmall, Small), now you have to set these:
    HiddenXl="True" HiddenLg="True" HiddenMd="True"

    With HiddenUp="Md" would cover them all.

    Actually, I have developed these features myself as additional functions of your PageLayout and they are working well, saving time and with less code.

    Hope that this will come with the next version.

    Thank you.
    (And sorry for my bad English :()



    ============= DeviceScreenSize enum of Detection framework =============================================
        // Summary:
        //     The device screen size based on the its dimensions in CSS pixels
        //
        // Remarks:
        //     The default ranges are: Small (to 600) CSS pixels Medium (601-1024) CSS pixels
        //     Large (1025 - 1366) CSS pixels ExtraLarge (over 1366) CSS pixels
        public enum DeviceScreenSize
            {
            Small = 0,
            Medium = 1,
            Large = 2,
            ExtraLarge = 3,
            }
  2. Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    539 posts

    Posted 06 Nov 2014 Link to this post

    Hi.

    You are right about the inconsistency -- we'll take care of that.

    And the suggestion about PropUp / PropDown is actually quite sound. It's worth checking out. I am bookmarking this thread and keep you informed.

    Regards,
    Ivan Zhekov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. BiBongNet
    BiBongNet avatar
    27 posts
    Member since:
    May 2010

    Posted 07 Nov 2014 in reply to Ivan Zhekov Link to this post

    Hi,

    Thank you for your reply.

    Will this be fixed in the next version or available with internal build?
  5. Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    539 posts

    Posted 13 Nov 2014 Link to this post

    Hello.

    We haven't yet fixed the issue.

    On the other thing, I am still experimenting with the possible API and fluency. Not substantial yet, but it's beginning to take shape.

    Regards,
    Ivan Zhekov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Dana Cobb
    Dana Cobb avatar
    46 posts
    Member since:
    Mar 2007

    Posted 03 Dec 2014 in reply to Ivan Zhekov Link to this post

    Glad to hear about addressing that inconsistency. Am working even more with these two frameworks, starting another big overhaul this week.

    Dana
  7. Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    539 posts

    Posted 08 Dec 2014 Link to this post

    Dana,

    while we haven't yet targeted the issue with viewport mismatch, there is a help article about custom viewport / breakpoint sizes. I think you will find it interesting: http://www.telerik.com/help/aspnet-ajax/detection-framework.html.

    By using the approach described there you can "add" the missing viewport size yourself.

    Regards,
    Ivan Zhekov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. Dana Cobb
    Dana Cobb avatar
    46 posts
    Member since:
    Mar 2007

    Posted 08 Dec 2014 in reply to Ivan Zhekov Link to this post

    Thanks Ivan, i had just implemented that last week. I had played with the getScreenSize previously, but i just didn't "get it". Upon revisiting I was able to create breakpoints that exactly mirrored my media queries! Since my work is primarily on dynamically generated pages...this allowed me to make decisions in the code behind that would be reinforced by the css from my media queries. What a great opportunity this is for precise control over the generation of dynamic controls.!


    Dana
  9. C
    C avatar
    1 posts
    Member since:
    Jul 2015

    Posted 28 Jul 2015 Link to this post

    Has this been fixed?
  10. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 31 Jul 2015 Link to this post

    Hi,

    We haven't aligned this yet. We are going to discuss how this could be done in best possible way. When we are ready our documentation will be updated. Until then you could use the approach provided by Ivan.

    Regards,
    Peter Filipov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  11. Peter
    Peter avatar
    2 posts
    Member since:
    Jun 2015

    Posted 14 Aug 2015 in reply to Ivan Zhekov Link to this post

    Hi 

    I just stumbled over this problem too.

    As far as I can say the problem is still there (2015-08-14).

    In my case it gives good results for Xs, Sm, Lg and Xl,

    but the Md (which is detected usually on tablets) is somehow not predictable.

    Please fix this as sson as possible.

    Thank you

    Peter

     

  12. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 19 Aug 2015 Link to this post

    Hi Peter,

    Thank you for your feedback. We are doing our best to align the breakpoints between the controls.

    Regards,
    Peter Filipov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  13. Marco Piumi
    Marco Piumi avatar
    29 posts
    Member since:
    Apr 2005

    Posted 21 Sep Link to this post

    The problem exists too.
    When will it be corrected?
  14. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 26 Sep Link to this post

    Hello Marco Piumi,

    We logged a request for improvement of the PageLayout. Currently it still isn't scheduled for implementation in a specific release, but you can track its status in our Feedback Portal.

    Regards,
    Ivan Danchev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017