Results 1 to 6 of 6

Thread: NumberField Label Width not preserved over restart when linked.

    Success! Looks like we've fixed this one. According to our records the fix was applied for DSGNR-7005 in Architect 4.0.0.
  1. #1
    Sencha Premium Member
    Join Date
    Nov 2012
    Location
    Cheshire
    Posts
    43
    Vote Rating
    6
      0  

    Default NumberField Label Width not preserved over restart when linked.

    REQUIRED INFORMATION
    Architect Build tested:
    • 3.5.1.348
    Project Type:
    • ExtJS 6.x
    Description:
    • LabelWidth is not being read for a linked component upon opening Sencha Architect.
    Steps to reproduce the problem:
    • Create a new ExtJS 6.0.2 project in Architect
    • Add A Panel Class
    • Add a NumberField Class and set label width to 50 (example)
    • Drag NumberField Class onto panel and "Link" duplicate a couple of times.
    • Leaving one as default, Change other linked numberfields labelWidths to 100 and 150 on the panel class.
    • Save
    • Quit Architect
    • Reload Project
    • Labels linked in panel will all have the default labelwidth of 50.
    The result that was expected:
    • Labelwidth to keep between restart.
    The result that occurs instead:
    • LabelWidth is not being read from metaData file on Architect restart.
    HELPFUL INFORMATIONScreenshot, Project, or Video:Possible fix:
    • LabelWidth is being added to the MetaData files however upon opening Sencha Architect 3.5 is is not being accounted for.
    Operating System:
    • OSX 10.11
    [edit]
    Looking at MetaData file before restarting Architect.

    Linked Item's labelWidth does not keep when a Panel is Transformed into a Window component for example. This defaults back to the original extended class value.

  2. #2
    Sencha User
    Join Date
    Sep 2014
    Location
    Central Europe
    Posts
    795
    Vote Rating
    52
      0  

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

    Btw have you seen this behavior with any other classes / configs ? Would greatly help us identify the scale of the problem. Thanks!

  3. #3
    Sencha Premium Member
    Join Date
    Nov 2012
    Location
    Cheshire
    Posts
    43
    Vote Rating
    6
      0  

    Default

    I have seen similar behaviour with "autoShow" config option on panel & formpanels when using them as linked classes. That was back in the Architect 3.2 days.

    I will throw a quick test to see if it affects other components that have labels. Fairly sure it's where a class config option (which itself is overriding the default) is overridden in the linked component of that class.

    Used to just work around it but working on a project where I've linked a class a dozen plus times and every restart is annoying. Going to break it out as a UX component and build it as a package to get around this issue for the moment to hopefully get around this issue.

  4. #4
    Sencha User petr.felzmann's Avatar
    Join Date
    Apr 2015
    Posts
    187
    Vote Rating
    13
      0  

    Default

    This bug occurs only if the master config value is non-default and the linked config value is default. In the case of labelWidth the default value is 100. So the workaround is to not set the labelWidth of master (equivalent to set it to 100) and set the linked instances config to the desired value. Does this workaround work for you?

  5. #5
    Sencha Premium Member
    Join Date
    Nov 2012
    Location
    Cheshire
    Posts
    43
    Vote Rating
    6
      0  

    Default

    Quote Originally Posted by petr.felzmann View Post
    This bug occurs only if the master config value is non-default and the linked config value is default. In the case of labelWidth the default value is 100. So the workaround is to not set the labelWidth of master (equivalent to set it to 100) and set the linked instances config to the desired value. Does this workaround work for you?
    Yes I know that is an option but when you have a few dozen (or hundreds even) of the linked class where a default value is overridden for a sensible reason. It seems woefully inefficient to set the same config on every linked instance. Especially if it needs updating later on.

    I used a different work around which was to create a separate ExtJS package and add the class in to the project that way and used the createalias to set the xtypes. This stopped me having to write the same config over and over, and write cleaner code.

  6. #6
    Sencha User petr.felzmann's Avatar
    Join Date
    Apr 2015
    Posts
    187
    Vote Rating
    13
      0  

    Default

    I understand your point, thanks for your report. This issue is going to be fixed in upcoming release.

Similar Threads

  1. Form button uses same width as label width
    By dgajjar in forum Ext 6: Q&A
    Replies: 2
    Last Post: 17 Nov 2015, 2:22 AM
  2. Replies: 1
    Last Post: 20 May 2015, 5:18 AM
  3. Replies: 1
    Last Post: 24 Aug 2014, 11:19 PM
  4. Creating a sliderfield linked to a numberfield
    By willeastcott in forum Ext: Q&A
    Replies: 4
    Last Post: 22 May 2013, 8:36 AM
  5. Img Width/Height resets after Designer restart
    By Sottilde in forum Sencha Architect 2.x: Bugs
    Replies: 1
    Last Post: 14 Apr 2012, 10:33 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
  •