Blockly: "Zelos" the List field is not aligned properly

Created on 27 Jan 2020  路  7Comments  路  Source: google/blockly

I was going through toolbox and i found that *LIST and TEXT has some misaligned field*

The create list with and create text with inputs are not properly aligned, as external inputs

To Reproduce


Steps to reproduce the behavior:

  1. Go to 'Toolbox'
  2. Click on 'TEXT'
  3. Scroll down to 'create text with ' block
  4. See error

Expected behavior
Should have properly aligned fields in one straight line

Screenshots

misaligned
TEXTBUG

Desktop (please complete the following information):

  • OS: Windows
  • Browser : chrome
  • Version latest
rendering bug

Most helpful comment

Fixed.

All 7 comments

The problem here is the zelos takes inputsInline: false and creates new rows, but aligns rows the same way it would had they beed on a single row. That means the default is left aligned. Visually if we think about external inputs as separate rows, their alignment is right by default.
So there are two ways to get deal with this:

  • Make it so the alignment is right aligned by default for additional rows created in zelos when inlineInputs: false.
  • Update the block definition for create text and create list to setAlign(right) for its value inputs.

@rachel-fenichel thoughts?

i think that create list with and create text with are just any blocks just like other , and we have the option to modify it with the methods available (e.g. setAlign() ) , i would go for second option , but let's discuss about both

I prefer updating the block definitions.

  • We already have the API to do it
  • It's the simplest solution
  • If a developer doesn't get the new block definitions, their blocks will still be fully functional

i agree @rachel-fenichel

Fixed.

actually i am using, i am loading blockly as a script
https://blockly-demo.appspot.com/static/blockly_compressed.js

but this change is not being reflected ? :(
the link is not updated ?

We have yet to push our release to https://blockly-demo.appspot.com. It should happen later today and I will send out a post on the forum with more information once it has been updated.

Was this page helpful?
0 / 5 - 0 ratings