Hybrid View

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-9389 in a recent build.
  1. #1
    Sencha User Wedgybo's Avatar
    Join Date
    Jul 2011
    Location
    Edinburgh, Scotland
    Posts
    17
    Vote Rating
    11
    Wedgybo will become famous soon enough

      1  

    Default Best practice for overriding SASS mixins with new package structure.

    Best practice for overriding SASS mixins with new package structure.


    Hi guys,

    I'm just wondering what everyones thoughts are on overriding mixins on the new theme structure?

    Previously we would create a whole new theme and edit the mixin directly and then workout the differences between new ExtJS versions using a diff and apply any changes that were relevant to our mixin. Super messy!

    Now that we are extending an official themes, we still want to editing the original mixins. Currently we are just creating a file, in src/window/Window.scss for example, that copies the whole mixin from the natural theme. Then editing what we want to change.

    Now this appears to work OK because our one is loaded last, but still feels messy, especially after all this work has been done by Sencha to make theme editing a lot more managed!

    If anyone has any insight it would be great to hear it!

    UPDATE: Just noticed that this practice causes an error in the slicer when packaging the theme.


    The widget undefined declares two corners with two different urls
    == Unhandled Error ==
    The widget undefined declares two corners with two different urls


    phantomjs://webpage.evaluate():63 in err
    phantomjs://webpage.evaluate():45
    phantomjs://webpage.evaluate():68 in forEach
    phantomjs://webpage.evaluate():32 in getSlices
    phantomjs://webpage.evaluate():127
    phantomjs://webpage.evaluate():68 in forEach
    phantomjs://webpage.evaluate():88
    phantomjs://webpage.evaluate():3
    phantomjs://webpage.evaluate():1
    /Users/jsutherland/bin/Sencha/Cmd/3.1.0.239/screenshot-runner.js:231
    /Users/jsutherland/bin/Sencha/Cmd/3.1.0.239/screenshot-runner.js:54
    Cheers,
    Jamie
    Last edited by Wedgybo; 29 Mar 2013 at 4:42 AM. Reason: Adding error

  2. #2
    Sencha - Ext JS Dev Team
    Join Date
    May 2011
    Posts
    149
    Vote Rating
    56
    Phil Guerrant is a jewel in the rough Phil Guerrant is a jewel in the rough Phil Guerrant is a jewel in the rough

      0  

    Default


    Just curious, what are you trying to do here? Is there a missing feature from the extjs-window-ui mixin? Perhaps a new parameter that needs to be added?

    There are 2 problem with overriding UI mixins:
    1. Because of the way the files are ordered, the "default" UI will use the neutral theme's mixin, not your overridden one. If you're not using the default UI it will get generated anyway, consuming extra space. I've opened a ticket for this becuase we should really provide a way to prevent the "default" UIs from being generated, if you decide not to use them.
    2. once you've duplicated the mixin, you've essentially "forked" a large portion of the code, and you won't get bug fixes to the mixin going forward.

    I would recommend that if there is some missing feature or bug fix required in the framework's UI mixin, we should fix it there, and I would hope overriding a UI mixin in your theme would not typically be necessary. If you find it really is necessary, the way you are doing it will work fine, you'll just have extra "default" UI rules that may not be used.
    Phil Guerrant
    Ext JS - Development Team

  3. #3
    Sencha User Wedgybo's Avatar
    Join Date
    Jul 2011
    Location
    Edinburgh, Scotland
    Posts
    17
    Vote Rating
    11
    Wedgybo will become famous soon enough

      0  

    Default


    Hi Phil,

    Specific examples are wanting to add gradients to Window headers. Text shadows to various parts. There are quite a lot of components that are not configurable without changing the mixin currently.

    I understand that this is not the preferred way of doing it, which is why I was wondering what the best way should be. At least the new structure for 4.2 theming makes life a bit easier when tracking changes to the original mixin. Before it was a nightmare

    If you want, I'm happy to work with you guys to add in extra configurable parts that would be nice for your themes. We've had to change a few of them when updating our clifton theme to work with 4.2.

    Cheers,
    Jamie

  4. #4
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    647
    Vote Rating
    25
    vadimv will become famous soon enough vadimv will become famous soon enough

      0  

    Default


    I'm interested too in this matter. I'm trying to theme an ST2 app, and just stuck in how to do a clean override of sencha-list mixin to replace disclosure icon and adjust its background gradient.

    Probably redefining the mixin and make sure that is loaded last would do the trick, but yes it's a fork to the current code and is not good.

  5. #5
    Sencha Premium Member CptS's Avatar
    Join Date
    May 2012
    Location
    Germany
    Posts
    37
    Vote Rating
    2
    CptS is on a distinguished road

      0  

    Exclamation Bug: The widget undefined declares two corners with two different urls

    Bug: The widget undefined declares two corners with two different urls


    I think the error "The widget undefined declares two corners with two different urls" is a bug in the sencha cmd.

    You can fix it by change the Sencha CMD\Sencha\Cmd\3.1.0.256\screenshot-runner.js line 105 from
    PHP Code:
    if (!!slices[schema] && slices[schema] != path) { 
    to
    PHP Code:
    if (!!slices[schema] && 'url('+slices[schema]+')' != path) { 
    Can someone from sencha confirm this as a bug?

  6. #6
    Sencha - Ext JS Dev Team
    Join Date
    May 2011
    Posts
    149
    Vote Rating
    56
    Phil Guerrant is a jewel in the rough Phil Guerrant is a jewel in the rough Phil Guerrant is a jewel in the rough

      0  

    Default


    Quote Originally Posted by CptS View Post
    I think the error "The widget undefined declares two corners with two different urls" is a bug in the sencha cmd.
    Can you give us any more information on what you were doing when you got this error? What are the steps we can take to reproduce it?
    Phil Guerrant
    Ext JS - Development Team

  7. #7
    Sencha - Ext JS Dev Team
    Join Date
    May 2011
    Posts
    149
    Vote Rating
    56
    Phil Guerrant is a jewel in the rough Phil Guerrant is a jewel in the rough Phil Guerrant is a jewel in the rough

      0  

    Default


    Quote Originally Posted by vadimv View Post
    I'm trying to theme an ST2 app
    You might want to ask for help in the sencha touch forum http://www.sencha.com/forum/forumdis...uch-2.x-Forums

    Although the approach to creating themes is similar between Touch/Ext JS, there are sure to be differences
    Phil Guerrant
    Ext JS - Development Team

  8. #8
    Sencha - Ext JS Dev Team
    Join Date
    May 2011
    Posts
    149
    Vote Rating
    56
    Phil Guerrant is a jewel in the rough Phil Guerrant is a jewel in the rough Phil Guerrant is a jewel in the rough

      0  

    Default


    Quote Originally Posted by Wedgybo View Post
    If you want, I'm happy to work with you guys to add in extra configurable parts that would be nice for your themes.
    Thanks for offering. Feel free to post your wishlist here, and I'll open a ticket for it. Just list the component sand the things that you wish were configurable via mixin but aren't currently, and I'll see which ones are easy enough to include in the framework mixins.
    Phil Guerrant
    Ext JS - Development Team

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar