question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] EvTables header skewed when using colors

See original GitHub issue

Describe the bug

In certain cases, the evtables header can be skewed. This happens when the header has leading/trailing spaces. They get trimmed which causes the table to look skewed.

To Reproduce

Steps to reproduce the behavior:

  1. Use the following example script:
from evennia.utils import evtable

table = evtable.EvTable("|cHeading1|n", "|cHeading2 |n", "|cHeading 3|n")
table.add_row("This","Test","test")
print(table)
  1. Execute said script
  2. See the error occur (as shown below)
+----------+-----------+-----------+
| Heading1 | Heading2 | Heading 3 |
+~~~~~~~~~~+~~~~~~~~~~~+~~~~~~~~~~~+
| This     | Test      | test      |

Expected behavior

The table should be straight without any indentations

Environment, Evennia version, OS etc

Evennia version: 1.0-dev (rev 54ebdb5ab) OS: nt Python: 3.9.7 Twisted: 21.7.0 Django: 3.2.7

Additional context

This only seems to occur when you are using colors and the space character, otherwise it looks fine.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Griatchcommented, Oct 5, 2021

Rereading @Henddher’s analysis, he used the evennia shell it seems. So maybe it’s something webclient specific then, I’ve not tested it myself at this time.

0reactions
Griatchcommented, Feb 15, 2022

Fixed in develop. Closing for book keeping.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IOS Bug: Different colors in the header bug. #4999 - GitHub
Current Behavior When I have two screens with a different background color header, when I click the back button, while the screen transition ......
Read more >
Anyone having issues with table headers not retain...
Anyone having issues with table headers not retaining shading in Cloud? ... The rest of the tables appear as the default color.
Read more >
Bug in Color header formatting (Matrix visual)
Color header formatting (in Field formatting) does not work when Show values in row groups rather than columns (in Values) is turned on....
Read more >
Header color issue when jumping from one site to another with a
I'm using SharePoint Online Modern pages in SharePoint and am encountering an issue with the header color. I start on a page with...
Read more >
Header Colors in Modules - Instructure Community
Is there any way the headers in Modules could have different color ... the individual level, but you can add icons using Unicode...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found