Skip to content
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

Fix wrapping redundant cities in the economics view #2325

Merged
merged 2 commits into from
Jul 14, 2024

Conversation

lmoureaux
Copy link
Contributor

@lmoureaux lmoureaux commented Jul 14, 2024

Fix wrapping redundant cities in the economics view

We were resizing columns to avoid wrapping with resizeColumnsToContents,
then resizing rows. This produced horizontal scrolling and strange
behaviour when the redundant list got long.

Fix this by:

  1. Setting the last column (redundant cities) to use all remaining
    space, and
  2. Adjusting the width of all columns except the last.

Closes #2289.

Tested locally by inverting the logic of get_economy_report_data to show all non-redundant cities (which is usually many).

Remove a variable by using the size of the list of redundant cities to
count them.
We were resizing columns to avoid wrapping with resizeColumnsToContents,
then resizing rows. This produced horizontal scrolling and strange
behaviour when the redundant list got long.

Fix this by:
1) Setting the last column (redundant cities) to use all remaining
   space, and
2) Adjusting the width of all columns except the last.

Closes longturn#2289.
@lmoureaux lmoureaux requested a review from jwrober July 14, 2024 02:16
@jwrober jwrober merged commit 22e1f9f into longturn:master Jul 14, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redundant Cities list does not wrap
2 participants