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
Prompt does not support color codes in web client #973
Comments
I presume this is in devel branch. |
This seems to work correctly in devel branch. Closing this now. Request a re-open if you are still having issues. |
I just did a pull of the wclient branch to update everything as of this morning - refreshed, cleared my cache, the works - and I'm afraid I'm still getting the issue. I did modify my CSS file a bit - would that have any effect on this at all? I assume not, since I don't think stripping out the color codes has anything to do with the CSS file... Also, sorry if I'm coming off as naggy or unhelpful! I just read back over this again and realized it comes across as really whiny, ehehe |
@BattleJenkins I tested with the example from your prompt and in the wclient-branch web client I get the following result: For easier copy&pasting (images suck for this), here's the command I tried:
Which, apart from too many spaces here and there seems to work as expected. The CSS is critical for the colors though - we are after all looking at a html file being built dynamically. A large portion of the webclient CSS file is dedicated to how Xterm256 colors are to be displayed (512 lines of it, in fact). But if you have xterm256 working elsewhere in the client you should have the correct webclient.css file at least. Reopening this, but can still not reproduce the problem. Can you give some example of a prompt that doesn't work? |
Here, I tried the exact line of code you provided, but it didn't seem to work! So, the problem is likely from my end somewhere... I haven't touched the webclient aside from providing my own CSS file, so I'm going to try going with the default and seeing if that's what's causing the issue, and get right back to you! |
Okay so I dummied out my custom CSS file in the static_overrides and it reverted to the default CSS file. Unfortunately, I still seem to be getting the issue. Here's my normal prompt update code, just in case it helps, but since updating the prompt manually with the @py command doesn't seem to fix it, I'm not sure if it would:
|
@BattleJenkins Hm. I just tested it with both Firefox and Chrome and the colors seems to be working in both places for me. Have you tried different browsers? Since I presume you have xterm256 colors working in the web client outside the prompt, it should not be a problem with the CSS file, really (and you are using the latest CSS anyway if you copied it manually). Just to weed out the simple errors, I presume you are shutting down both the Portal and Server, right? HTML color conversion is happening at the Portal level, so you can't just Secondly, let's make sure your client is really pulling the latest, stop your server/portal completely, then go to mygame/web and delete the "static" folder. This folder is created automatically (it should never contain any manual changes, those go in the static_override folder) so when you start again, this folder will be automatically rebuilt (you'll see a lot of copy-lines). See if that helps. |
I've only tried it in Chrome so far - I don't have any other browsers installed currently, because I'm a bad developer. I stopped the server completely with 'evennia stop' on the command line, deleted the entire static folder, started it up again, saw all the copy-lines, and... same problem. Tried clearing the cache, using an incognito window, everything, but I'm still getting the same dang problem... |
Since I can't reproduce this with a fresh Evennia, it's hard to really tell what the problem is. To completely make sure you can |
Ok, so I cloned the latest Evennia off github, installed a new virtualenv, did the whole install from scratch, switched to wclient branch and initialized a game dir, migrated and started the server. I have a colored prompt just fine, both in Chrome and in Firefox. Could you try the full-out fresh reinstall too - then it really can't be any difference between our setups. In that case it more sounds like something fishy with your browser or something strange like that. |
Okay I absolutely completely started over in a whole new directory with a whole new virtualenv with a fresh install from github: Whyyy!! If it really is a browser issue - does it do this for you? I've got the server online if you want to check it: http://62.151.177.174/webclient/ |
So I checked out the log and got something interesting:
|
Oh! You are using the AJAX client. That would explain why we get different results - if your ports are not correctly set for using the websocket, it will fall back to the AJAX, and a bug there may well linger. I'll look at that. |
Dang! I guess that explains it! It's a good thing I'm a total amateur at configuring server settings and ports and such so I could uncover this obscure bug! |
Brief summary of issue / Description of requested feature:
The prompt in the webclient doesn't currently support the same color codes as the rest of the client output. I modified my prompt function to both update the prompt as well as message the prompt's string to the character - above is how the prompt should appear, and below is how it does. This isn't an issue with my CSS file, as the issue persists even if I use the stock CSS file or no CSS file at all.
Steps to reproduce the issue / Reasons for adding feature:
Expected result of feature
The prompt should display with color codes! Lots of games use color codes in their prompts - in fact, I would wager that every game with color support does.
The text was updated successfully, but these errors were encountered: