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

Migrating to CSE

1717581014
StéphaneD
Pro
Sheet Author
API Scripter
Hi all So the two sheets I maintain were impacted by the bug with the inline styles removed by Roll20 when deploying to the live servers. It looks like this bug impacted only the sheets with the "legacy": true setting in the sheet.json When CSE came out in 2021, I did not pursue my migration efforts as I tried to enable it (putting "legacy": false in the json), saw that it was messing up the layout, found the Roll20 doc unhelpful, plus I did not have time to spare to revise the sheet and know I s*ck at CSS After this legacy sheets panic, I thought I would try again. So I opened the wiki page on CSE and read it again and thought I understood what needed to be done : Remove the 'sheet-' prefix in front of class names in HTML and CSS But keep it in front on the col, row, 2colrow and 3colrow classes provided by R20 And keep it in front of the rolltemplate classes as well So that's what I did. I loaded the resulting HTML and CSS in a sandbox game ... And the character sheet does not display at all and I don't have the littlest idea why. Did I misread the Roll20 wiki ? Is the only way to move to CSE actually to disable legacy, and just inspect the result and fix whatever issue it creates with your sheet ? I have uploaded the HTML and CSS files on my Github repo @&nbsp; <a href="https://github.com/stephaned68/ChroniquesGalactiques" rel="nofollow">https://github.com/stephaned68/ChroniquesGalactiques</a> These are the files with a -cse suffix If anyone have an idea of what I did wrong and any suggestions on how to actually migrate to CSE, I would appreciate any help
1717630500

Edited 1717633189
vÍnce
Pro
Sheet Author
I think you might also need edit the sandbox sheet.json with { "legacy": false; } I pasted your html and css into a custom game. Same issue; nothing loads. But I noticed that in the html file there may be something broken in the syntax. ie an unclosed tag(s) and/or typos. Easy enough to happen when you have to make lots of edits to be CSE compliant. See how the colorized formatting in the Custom editor seems to suddenly stop? IME, that usually indicates there is an issue with malformed code somewhere.
1717679411

Edited 1717679449
StéphaneD
Pro
Sheet Author
API Scripter
Hi vince Thanks for the heads-up The issue is on line 6166 input type=""hidden" should be&nbsp; input type="hidden" However fixing it does not resolve the issue with the sheet not being displayed :(
1717680779
vÍnce
Pro
Sheet Author
Just to troubleshoot things, I would try loading a little html at a time and see where it breaks.&nbsp; Maybe there's in issue in the css?
1717683707
StéphaneD
Pro
Sheet Author
API Scripter
Hi vince Thanks for the suggestion 4 different sheets (PCs, NPCs, Starships, Mechas) with 2 to 5 tabs each, not easy to split. I'll see what I can do
1717687569

Edited 1717687595
GiGs
Pro
Sheet Author
API Scripter
It might be a good time to change the way you are doing tabs. A character sheet with those should be easy to split. The thing you are doing now is a massive project, Yo should do one sheet at a time, and ideally just do part of the sheet at a time. Make sure the sheet is divided into divs, and just copy small groups of div at a time. The main advantage of using the sandbox is the ability to use your own files, so you don't have to do the full sheet at a time. I'm considering writing an article, maybe more than one, on this topic, so if there are any gotchas or pitfalls you come across, please post the,. I don't actually have much experience doing this.
1717688609
StéphaneD
Pro
Sheet Author
API Scripter
Hi GiGs&nbsp; Thanks for your comment&nbsp; The sheet is obviously already splitted into divs (one for each type of sheet) which are in turn splitted into divs for each tab. Even on one of the tabs of one of the sheet, I have 4 subtabs. I don’t see how splitting into divs makes it easier to paste only parts of the sheet. All I see is that I believe I followed what Roll20 wrote on their wiki to try and make the sheet CSE, and it simply does not work. It may be docs written by software engineers for software engineers, and I may not be a top-notch web developer, but having written code for the last 35 years, I thought I would understand a few directives. I’d absolutely love to redo all this with handlebars and distinct files merged together, using your great tutorials on your blog. I’d love to learn Vue to use the new Beacon system that will come one of these days. Unfortunately I preserve my evenings for some rest and my weekends for my D&amp;D sessions. Not to worry, only 7 years left before retirement ;-)&nbsp; I believe I am going to do it differently : disable legacy and correct whatever nonsensical layout issue it creates. Probably less work. Or not. Will post back here. Thanks
1717689574
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Here's my simple(ish) guide to converting to cse: swap legacy flag to false If your classes in html don't have the sheet- &nbsp;prepend on them, remove it from your css file (except for anything that impacts roll templates) Add&nbsp; .ui-dialog .tab-content .charsheet &nbsp;to the start of ALL your css that impacts the character sheet itself. This will ensure that your styling overrides the Roll20 styling while still operating from the same "base" specificity level. If you had any styling that affected both the rolltemplate and the sheet, make sure to do both of the above That should resolve 99% of the issues.
1717935235

Edited 1717935267
Andreas J.
Forum Champion
Sheet Author
Translator
I added these tips to the LCS page: <a href="https://wiki.roll20.net/LCS#Migrating_from_LCS_to_CSE" rel="nofollow">https://wiki.roll20.net/LCS#Migrating_from_LCS_to_CSE</a>
1718266955

Edited 1718271358
StéphaneD
Pro
Sheet Author
API Scripter
So... I set legacy to false All the classes in both&nbsp; HTML and CSS had the sheet- prefix, so I did not change anything For some mysterious reasons, textarea's default height was not honoured, and roll buttons with overriden icons showed 2 icons instead (Roll20's default and mine) So I preprended the CSS class of the main div in these sheets to make some CSS selectors more specific for a few classes - I don't want to have Roll20-specific CSS classes if I can avoid them. IMHO I shouldn't even have to bother about Roll20 internals, but that's just me being grumpy Something along the lines of&nbsp; .sheet-mainBg textarea { &nbsp; border: none; &nbsp; box-shadow: none; &nbsp; padding: 1px; &nbsp; margin: 0px; &nbsp; height: 1.5em; &nbsp; resize: vertical; &nbsp; vertical-align: top; } .sheet-mainBg button[type='roll'].sheet-iconbtn::before { &nbsp; content: ''; } And a few others And that was it... Sheets converted to CSE :) Now details/summary elements are replacing the old CSS trick for collapsing/expanding areas, wherever possible. Some more testing and new PRs will follow Thanks all for the help and hints, which I did not use :)