Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Some text in a span with an attr name does not show until sheet is closed and reopened

1461140179

Edited 1461140377
Kryx
Pro
Sheet Author
API Scripter
Hi, I'm having some weird behavior that some fields are not being set to a span until the sheet is closed and regenerated. It works in many places, but this place doesn't seem to work. To reproduce open the 5e Shaped sheet (the latest live version will work) and edit some proficiencies for a NPC. The total values should update (and you can see them update in the console), but they do not visually render until the sheet is closed and reopened. <a href="https://app.roll20.net/forum/permalink/3267793/" rel="nofollow">https://app.roll20.net/forum/permalink/3267793/</a> shows a screenshot of the behavior (I also saw it without any values there at all). Any ideas?
1461172072

Edited 1461172164
Phil B.
Forum Champion
Sheet Author
I tried it out, and I'm not seeing it happen anywhere on the official sheet. But, on the shaped sheet I am seeing some weird issues with setting the skills, that could also be causing this issue with the spans not updating. If I try to update the skills, on a fresh npc, too quickly it keeps setting them back to 0. I quickly: Set Acro to 1, Set Arcana to 2 (switches back to 0), Set Decep to 3, Set Insight to 4 (switches back to 0) This is a gif, but it only plays for me when I click on it:
1461172662

Edited 1461173707
Kryx
Pro
Sheet Author
API Scripter
The bonuses setting back is likely a different issue (though I can't reproduce it). I'm just looking at proficiency currently. Steps to reproduce: Create new character (Shaped v2.4.13) (no need to be an NPC) Clear console Change acrobatics to proficient (change the dash to a checkmark) Here is the log of the total being set: Really updating character sheet values app.js?1460650705:37 Setting up repeating sections took until 15ms app.js?1460650705:37 Finding list of dirty attributes took until 17ms sheetsandboxworker.js?20150218:56 Triggering for change:repeating_skill sheetsandboxworker.js?20150218:56 Triggering for change:repeating_skill:proficiency sheetsandboxworker.js?20150218:56 Triggering for change:repeating_skill:proficiency_max sheetsandboxworker.js?20150218:56 Triggering for change:proficiency sheetsandboxworker.js?20150218:56 Triggering for change:bonus sheetsandboxworker.js?20150218:56 Triggering for change:name sheetsandboxworker.js?20150218:56 Triggering for change:formula sheetsandboxworker.js?20150218:56 Triggering for change:ability_short_name sheetsandboxworker.js?20150218:56 Triggering for change:ability app.js?1460650705:37 Querytest took until 19ms app.js?1460650705:37 Set values took until 150ms app.js?1460650705:37 Took 162ms VM36:1 finalSetAttrs Object {repeating_skill_-kfoe6jf5exqi51gcl5-_total: 2, repeating_skill_-kfoe6jf5exqi51gcl5-_total_with_sign: "+2", repeating_skill_-kfoe6jf5exqi51gcl5-_formula: "2[proficient]"} VM36:1 finalSetAttrs Object {ability_checks_macro_var: "[Strength +0](~strength_check), [Dexterity +0](~de… +0](~repeating_skill_-kfoe6jgmnfbo2mxli79_skill)", skills_macro_var: "[Acrobatics +2](~repeating_skill_-kfoe6jf5exqi51gc… +0](~repeating_skill_-kfoe6jgmnfbo2mxli79_skill)"} app.js?1460650705:37 Really updating character sheet values app.js?1460650705:37 Setting up repeating sections took until 12ms app.js?1460650705:37 Finding list of dirty attributes took until 16ms sheetsandboxworker.js?20150218:56 Triggering for change:repeating_skill sheetsandboxworker.js?20150218:56 Triggering for change:repeating_skill:total sheetsandboxworker.js?20150218:56 Triggering for change:repeating_skill:total_max sheetsandboxworker.js?20150218:56 Triggering for change:repeating_skill:total_with_sign sheetsandboxworker.js?20150218:56 Triggering for change:repeating_skill:total_with_sign_max sheetsandboxworker.js?20150218:56 Triggering for change:repeating_skill:formula sheetsandboxworker.js?20150218:56 Triggering for change:repeating_skill:formula_max sheetsandboxworker.js?20150218:56 Triggering for change:ability_checks_macro_var sheetsandboxworker.js?20150218:56 Triggering for change:ability_checks_macro_var_max sheetsandboxworker.js?20150218:56 Triggering for change:skills_macro_var sheetsandboxworker.js?20150218:56 Triggering for change:skills_macro_var_max app.js?1460650705:37 Querytest took until 19ms sheetsandboxworker.js?20150218:56 Triggering for change:proficiency sheetsandboxworker.js?20150218:56 Triggering for change:bonus sheetsandboxworker.js?20150218:56 Triggering for change:name sheetsandboxworker.js?20150218:56 Triggering for change:formula sheetsandboxworker.js?20150218:56 Triggering for change:ability_short_name sheetsandboxworker.js?20150218:56 Triggering for change:ability sheetsandboxworker.js?20150218:56 Triggering for change:ability_checks_query_var app.js?1460650705:37 Set values took until 124ms app.js?1460650705:37 Took 136ms There are 2 points where the sheet saves the data via sheetworkers: finalSetAttrs Object {repeating_skill_-kfoe6jf5exqi51gcl5-_total: 2, repeating_skill_-kfoe6jf5exqi51gcl5-_total_with_sign: "+2", repeating_skill_-kfoe6jf5exqi51gcl5-_formula: "2[proficient]"} finalSetAttrs Object {ability_checks_macro_var: "[Strength +0](~strength_check), [Dexterity +0](~de… +0](~repeating_skill_-kfoe6jgmnfbo2mxli79_skill)", skills_macro_var: "[Acrobatics +2](~repeating_skill_-kfoe6jf5exqi51gc… +0](~repeating_skill_-kfoe6jgmnfbo2mxli79_skill)"} The first one is the important one. The total_with_sign is set. Here is the HTML in that area: &lt;button type="roll" name="roll_skill" value="..." tabindex="-1" class="btn ui-draggable"&gt; &lt;div class="sheet-shaped-row sheet-no-wrap sheet-flex-end"&gt; &lt;span name="attr_total_with_sign" class="sheet-col-2-em sheet-input-like sheet-inline-block sheet-center sheet-bold sheet-border-bottom"&gt;+0&lt;/span&gt; &lt;span name="attr_name" class="sheet-skill-name sheet-white-space-no-wrap sheet-presentation sheet-pad-l-sm"&gt;Acrobatics&lt;/span&gt; &lt;/div&gt; &lt;/button&gt; If I now close the sheet and reopen it then total_with_sign is set to the correct value. So it is definitely being set, and only once. Though I'm curious your setup that zeroes out the bonuses - none of my users have reported that and I can't reproduce it.
1461262419
Phil B.
Forum Champion
Sheet Author
Okay, looking at it again I'm seeing that you are referencing repeating rows in with your spans. That might be the reason why things aren't updating right away, and would be an issue on our part. We'll look into it. As for the issue that I mentioned. I tried it again in a totally new game, with brand new characters, and was still having the issue. It only happens when you change the values quickly. It seems to happen to every other row I'm updating. I think that's because the issue only happens while stuff is still "moving" behind the scenes, and by the time I get to the next row things have settled. 1. New Character 2. Change to NPC 3. Change Acrobatics 4. Quickly Change Arcana 5. Arcana is set back to 0 (or whatever the previous value was)
1461277308
Kryx
Pro
Sheet Author
API Scripter
Awesome, thanks for the info on the total issue. If there is no other way to track it, could you post here when it has been addressed? Otherwise I can watch for updates. I'll attempt to reproduce the bonus issue. Off the top of my head I can't imagine sheet workers emptying the bonus field for any reason. I'll do some debugging when I gave some time. Thanks again for the swift response!!
1461341508
Phil B.
Forum Champion
Sheet Author
Yeah, I've linked this post in the bug report so someone should reply here when we fix it.
1462480352

Edited 1462480601
Phil B.
Forum Champion
Sheet Author
It took a while, but I think I figured it out. The fix was a little invasive, so I've pushed it to Dev first for some testing before it makes it to main. I've tried it out and confirmed that it fixed this specific issue of the spans in a repeating section not updating, I just want to make sure I haven't broken anything else in the process.
1462482850
Kryx
Pro
Sheet Author
API Scripter
Great, thanks Phil!