Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dummy input aligns only left #3330

Closed
pavelkestefran opened this issue Oct 24, 2019 · 7 comments
Closed

Dummy input aligns only left #3330

pavelkestefran opened this issue Oct 24, 2019 · 7 comments
Assignees
Labels
component: rendering issue: bug Describes why the code or behaviour is wrong type: regression

Comments

@pavelkestefran
Copy link

Describe the bug

Dummy input currently does not align right (or center).
Last working in 2.20190722.1

To Reproduce

  1. In blockly factory create a block similar to :
Blockly.Blocks['block_type'] = {
  init: function() {
    this.appendDummyInput()
        .appendField("something long");
    this.appendDummyInput()
        .setAlign(Blockly.ALIGN_CENTRE)
        .appendField("a");
    this.appendDummyInput()
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField("a");
    this.setColour(230);
 this.setTooltip("");
 this.setHelpUrl("");
  }
};

Expected behavior

Fields in Dummy input should respect selected alignment.

Screenshots

Current master:
2019-10-24_09h47_36

2.20190722.1:
2019-10-24_09h50_17

Desktop (please complete the following information):

  • OS: Win10
  • Browser Firefox
  • Version 70.0
@pavelkestefran pavelkestefran added issue: triage Issues awaiting triage by a Blockly team member issue: bug Describes why the code or behaviour is wrong labels Oct 24, 2019
@RoboErikG RoboErikG added component: rendering type: regression and removed issue: triage Issues awaiting triage by a Blockly team member labels Oct 24, 2019
@RoboErikG
Copy link
Contributor

@rachel-fenichel looks like we're missing some logic for dummy input rows. Value inputs and statement inputs do center and right alignment correctly.

@pkestefran are you depending on the alignment in a live app or is this just something you noticed in the developer tools?

image

@pavelkestefran
Copy link
Author

@RoboErikG The behavior is the same in the live app. I have noticed this while testing new changes in blockly with custom blocks we have in our app. We have multiple right aligned dummy inputs within our blocks. For now we will stay with 2.20190722.1

@RoboErikG
Copy link
Contributor

Thanks, that means we may need to do another patch then.

@samelhusseini
Copy link
Contributor

We've fixed this and released a patch v3.20191014.4.
Thanks for reporting.

@pavelkestefran
Copy link
Author

Works great. Thank you for quick release. :)

@pavelkestefran
Copy link
Author

@samelhusseini I played a bit with test blocks in playground and noticed that the alignment is unfortunately still not respected in Zelos and Minimalist renderers. Geras and Thrasos are ok.

2019-10-29_17h22_52

While we are ok, as we use Geras only, the behavior should be consistent.
Can you please check? Thank you.

@samelhusseini
Copy link
Contributor

Hey @pkestefran. The current POR is for Zelos is to not support external value inputs (only inline) like other renderers. We made the call to only add the logic in geras and thrasos.
I don't see a reason why the minimalist renderer shouldn't at least take somehow take into account its input's alignment properties (albeit it is a lower priority for us right now). @rachel-fenichel

I've filed an issue to track this: #3361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: rendering issue: bug Describes why the code or behaviour is wrong type: regression
Projects
None yet
Development

No branches or pull requests

3 participants