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

Refactor WhatsNew.cs and update the UI #1319

Merged
merged 7 commits into from
Jan 26, 2022
Merged

Refactor WhatsNew.cs and update the UI #1319

merged 7 commits into from
Jan 26, 2022

Conversation

originalfoo
Copy link
Member

@originalfoo originalfoo commented Jan 26, 2022

  • Renamed ChangelogEntry class to Changelog (Entry made it sound too atomic)
  • Renamed ChangeEntry struct to Item to make it more discernable
  • Applied same naming conventions to the UI
  • Changelog parsing code moved to WhatsNew class
    • Having the changelog parse all changelogs was super-confusing
    • Added some error checking, and various other QoL tweaks
  • Parsing of changelog lines will terminate after last seen changelog is parsed
    • This significantly reduces the number of changelogs in the UI
    • User will still see all changelogs since the last version (which could be some time ago if they've not played for a while)
    • Once they've caught up to latest version, then that's the ony changelog they'll see until new version comes out
    • Might lessen impact of StackOverflowException - WhatsNewPanel.cs #1314
  • Disable autoLayout while populating the scroll / content panel
  • Tweaked the scrollbar to look a bit nicer
    • Also discovered that autosize property on the sprites had an empty setter :/
  • Removed one of the lookup lists and reduced amount of string chopping during parsing
  • Call MarkAsShown() from OpenModal() instead of the panel close button
    • This ensures if panel breaks it won't be recurrent problem for users
  • Tested in STABLE, TEST and DEBUG builds - seems to work well

@originalfoo originalfoo added UI User interface updates code cleanup Refactor code, remove old code, improve maintainability labels Jan 26, 2022
@originalfoo originalfoo self-assigned this Jan 26, 2022
Copy link
Member

@krzychu124 krzychu124 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks cool, I hope it'll help with all issues with regards to what's new panel

@originalfoo originalfoo added this to the 11.6.4-hotfix-1 milestone Jan 26, 2022
@originalfoo originalfoo mentioned this pull request Jan 26, 2022
- This ensures if panel breaks it won't be recurrent issue for user
@krzychu124
Copy link
Member

Good idea with moving MarkAsShown() 👍 👏

@originalfoo originalfoo merged commit 6428b92 into master Jan 26, 2022
@originalfoo originalfoo deleted the limit-whats-new branch January 26, 2022 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup Refactor code, remove old code, improve maintainability UI User interface updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants