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

after update to 3.4 some expressions do not get evaluated #2310

Closed
mjakubicek opened this Issue Apr 7, 2017 · 8 comments

Comments

Projects
None yet
3 participants
@mjakubicek

mjakubicek commented Apr 7, 2017

Help us to manage our issues by answering the following:

  1. Describe your issue:

After update to 3.4, the expression on line 5 does not get evaluated - the HTML contains just the expression itself including the braces:

1. <word>
2. <div style="display: inline-block; vertical-align: top">
3.    <button if={ !annot } type="button" class="mdl-button mdl-js-button mdl-js-ripple-effect word" id="w{ i }">
4.      { w }&nbsp;
5.      <div class="mdl-tooltip mdl-tooltip--large" for="w{ i }">{ parent.taglist[i] }</div>
6.    </button>
7.    <div if={ annot }>
8.      <button type="button" class="mdl-button mdl-js-button mdl-js-ripple-effect ambword" onclick={ toggleTag }>
9.        { w }&nbsp;
10.      </button>
11.      <ul class="mdl-list" hide={ !show_annot } style="margin-top: 0px" ref="ann_tags">
12.        <tagitem tag={ t } tagindex={ ti } each={ t, ti in parent.taglist[i] }/>
13.        <tagitem tag="None" tagindex={ parent.taglist[i].length }/>
14.      </ul>
15.      <div if={ !show_annot && tag } style="text-align: center; margin-right: 10px;">
16.        <raw content={ tag.replace(/red/g, "green") }/>
17.      </div>
18.    </div>
19.  </div>
20. </word>

Note that parent.taglist is defined, and it works fine on lines 12 and 13.

  1. Can you reproduce the issue?

Yes (but it's a big project not publicly accessible), and downgrading back to latest 3.2 fixes the issue without any changes to the code.

  1. On which browser/OS does the issue appear?

Google Chrome 57.0.2987.133 Linux x86_64

  1. Which version of Riot does it affect?

3.4.0

  1. How would you tag this issue?
  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Apr 9, 2017

Member

@mjakubicek please provide a demo we can test to check if it's really a riot issue. Your request is a bit to vague to me and i can not help you further without a detailed explanation of the issue

Member

GianlucaGuarini commented Apr 9, 2017

@mjakubicek please provide a demo we can test to check if it's really a riot issue. Your request is a bit to vague to me and i can not help you further without a detailed explanation of the issue

@mjakubicek

This comment has been minimized.

Show comment
Hide comment
@mjakubicek

mjakubicek Apr 9, 2017

ok, here is a minimalistic example: http://plnkr.co/edit/ghL5vlUNrrnKbrcZl05G?p=preview
if you change the link to Riot JS to "3.2" instead of "3.4", it will start working (it will show "0")

mjakubicek commented Apr 9, 2017

ok, here is a minimalistic example: http://plnkr.co/edit/ghL5vlUNrrnKbrcZl05G?p=preview
if you change the link to Riot JS to "3.2" instead of "3.4", it will start working (it will show "0")

@rsbondi

This comment has been minimized.

Show comment
Hide comment
@rsbondi

rsbondi Apr 9, 2017

Member

parent.taglist[i] is an array, not 0

Member

rsbondi commented Apr 9, 2017

parent.taglist[i] is an array, not 0

@mjakubicek

This comment has been minimized.

Show comment
Hide comment
@mjakubicek

mjakubicek Apr 9, 2017

I know - but that works with 3.2 and doesn't work with 3.4 and I don't see any warnings about backward incompatibilities in the changelog...

mjakubicek commented Apr 9, 2017

I know - but that works with 3.2 and doesn't work with 3.4 and I don't see any warnings about backward incompatibilities in the changelog...

@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Apr 9, 2017

Member

@mapmarkus if it was working on riot 3.2 it was an issue, this is what you were looking for http://plnkr.co/edit/gMd2hyltimjc1pgwyFui?p=preview all the other possible hacks are not part of the riot api and shouldn't be supported

Member

GianlucaGuarini commented Apr 9, 2017

@mapmarkus if it was working on riot 3.2 it was an issue, this is what you were looking for http://plnkr.co/edit/gMd2hyltimjc1pgwyFui?p=preview all the other possible hacks are not part of the riot api and shouldn't be supported

@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Apr 9, 2017

Member

ah side note: it was working because javascript allows this https://jsfiddle.net/gianlucaguarini/d11fkf4q/

Member

GianlucaGuarini commented Apr 9, 2017

ah side note: it was working because javascript allows this https://jsfiddle.net/gianlucaguarini/d11fkf4q/

@mjakubicek

This comment has been minimized.

Show comment
Hide comment
@mjakubicek

mjakubicek Apr 9, 2017

I see (though, this is still a backward incompatibility, even if not intentional, and should be mentioned in the changelog...)

mjakubicek commented Apr 9, 2017

I see (though, this is still a backward incompatibility, even if not intentional, and should be mentioned in the changelog...)

@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Apr 9, 2017

Member

ok thanks for the suggestion i have just released riot@3.4.1 i will update the old release notes as well

Member

GianlucaGuarini commented Apr 9, 2017

ok thanks for the suggestion i have just released riot@3.4.1 i will update the old release notes as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment