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

Update the flightlog rebased #5666

Merged

Conversation

JonBooth78
Copy link
Contributor

@JonBooth78 JonBooth78 commented Nov 19, 2023

User facing changes:

_Note: This replaces / closes #5636 as due to the way I did some merging along the way (since rebased away and hidden in this branch), I could no-longer update that PR.

Note: Screenshots below have alpha baked into them so the background looks a little off on the export window as that grey is actually transparent so the background actually appears black

Export Collapsed

screenshot-20231119-160052

Export Expanded

screenshot-20231119-160057

Description

  • Consolidate the three tabs of the flightlog into a single page with all entries on it
  • Add an options bar to the right hand side to toggle on and off individual types of log entry from the displayed list so you can still see what you’d like
  • When pruning the flightlog for space reasons, never remove any elements that have a custom annotation/note added by the user
  • Split system flight log entries into a separate arrival and destination entry if there are other entries that come chronologically between them
  • Add the ability to order the flightlog oldest to newest as well as the default newest to oldest
  • Remove the spurious log on game start of the player docking at their starting station
  • Add the option showing the current player stats to the flightlog at the top
  • Add the ability to export the currently displayed flightlog to a file, located in the userdata folder based on the player’s name, either as plain text or HTML

Potentially controversial changes I’m aware of:

  • Adding an optional window layout to the tab layout to allow me to add a floating window at the bottom of the screen. I'm also considering (in the future) to use this to allow a popup when editing a flightlog entry, with a multi-line entry box as although imgui doesn't support word-wrapping entry boxes this would feel nicer and mitigate that a bit too.
  • This is very much showing my working in the order of commits

Things I’ve tested:

  • Loading existing games
  • Saving games and reloading them with the new flightlog format
  • Starting a new game
  • Jumping between systems
  • Landing at spaceports
  • Custom flightlog entries and adding custom annotations to other entries

Things I am considering to doing later:

  • Change the backing model such that system and station events are container events that can contain events that happened when within that system or station. System events of course will contain station events.
  • Buttons to add the location of flightlog entries to the current system navigation route
  • Automatic flight log entries when a ship is killed by the player
  • Automatic flight log entries when the player changes their ship
  • Automatic flight log entries when the player changes the ship equipment
  • Automatic flight log entries for commerce, so when the user purchases or sells cargo
  • Automatic flight log entries when missions are started/failed/completed
  • Automatic flight log entries when a screenshot is taken and some way to view it from the log (as long as it’s still on disc)
  • Filters for all of the above
  • CSV export

@impaktor
Copy link
Member

impaktor commented Dec 3, 2023

  1. @Web-eWorks I assume this is good to merge, as I think that was the state of the original PR this is based from?

This is very much showing my working in the order of commits

So rebase, or we can just squash merge, or do we want to keep all commits? E.g I see new functions like l_pigui_set_next_window_collapsed and ui.setNextWindowCollapsed that could be their own "New function to allow X". I just don't want the full development history in master, as some developers rely on clean / non-messy commit history to understand which feature caused a line to change.

@JonBooth78
Copy link
Contributor Author

@Web-eWorks , I think this is ready for final review, although looks like it'll need rebasing again on master.

@JonBooth78 JonBooth78 force-pushed the update-the-flightlog-rebased branch from cb8e289 to 920abf1 Compare January 8, 2024 09:21
@JonBooth78
Copy link
Contributor Author

Rebased. I'm wondering if I'll hit some clang format errors now ?

@JonBooth78
Copy link
Contributor Author

Yeah, hit some clang format errors, I'll have to sort them out later in the week - sorry

@JonBooth78
Copy link
Contributor Author

@Web-eWorks , this should now be ready for review.

Copy link
Member

@sturnclaw sturnclaw left a comment

Choose a reason for hiding this comment

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

I'm quite happy with the effect and direction of this PR. I do apologize for not getting through the review until now - my schedule has been quite busy and I've accidentally let things slip through the cracks like this review.

I've left (several!) comments where there are things I'd like to see addressed, either as part of this PR directly or in a follow-up PR if you're not confident in being able to address them all in the next ~2 weeks. We'll be entering formal "feature freeze" on the 27th and anything not bugfix/stability related will be put on hold at that point until the release.

Overall I consider this PR to be functional enough to merge as part of the release, but in addition to the nitpicks that comprise most of the comments I've left there are a few maintainability concerns regarding serialization and dataflow that I'd like to see addressed long-term.

@JonBooth78 JonBooth78 force-pushed the update-the-flightlog-rebased branch 3 times, most recently from 001607a to e8b050a Compare January 19, 2024 05:22
Copy link
Member

@sturnclaw sturnclaw left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for addressing the last round of review comments. I've gone over the diff again and only one additional area has stood out to me as something that could be improved.

Before merge, I'd like you to address the table[key, value] -> table<key, value> annotation issues (they're not high severity but they are very quick to fix) and you indicated prior you intended to address the NaturalDocs formatting - otherwise, the remaining outstanding issues are an "at your discretion" priority.

I plan to merge this PR sometime Sunday evening/night EST - hopefully that gives you enough time to address the remaining issues. If not, let me know any time and I'll merge sometime next week.

@JonBooth78 JonBooth78 force-pushed the update-the-flightlog-rebased branch from e56c355 to 29d4757 Compare January 21, 2024 02:35
@sturnclaw
Copy link
Member

Looks good to me, thanks for addressing that formatting issue. At this point I'd recommend rebasing and squashing together related changes / iterative improvement commits to clean up the history (in the name of appeasing @impaktor, the resident git fascist 😄).

@JonBooth78
Copy link
Contributor Author

@Web-eWorks following up on your recommendation to tidy up counting elements and I found a bug and another issue I'm tidying. Hope to have it done in the next 3-4 hours

@sturnclaw
Copy link
Member

@JonBooth78 bump - ETA on final squash + rebase? I'd like to merge this before #5706.

@JonBooth78 JonBooth78 force-pushed the update-the-flightlog-rebased branch 12 times, most recently from 7c44b0b to 2fb6607 Compare January 26, 2024 03:45
@JonBooth78 JonBooth78 force-pushed the update-the-flightlog-rebased branch 9 times, most recently from f0c97c4 to dfda65d Compare January 26, 2024 06:13
@JonBooth78 JonBooth78 force-pushed the update-the-flightlog-rebased branch from dfda65d to 0f20d80 Compare January 26, 2024 06:33
@JonBooth78 JonBooth78 force-pushed the update-the-flightlog-rebased branch from 0f20d80 to 920866d Compare January 26, 2024 06:37
@JonBooth78 JonBooth78 force-pushed the update-the-flightlog-rebased branch 2 times, most recently from de55e68 to de57ab9 Compare January 26, 2024 07:02
This also moves FlightLog.lua to modules/FlightLog/FlightLog and splits out new functionality, moving some logic from the UI code into the base functionality

This changes the way that flightlogs are persisted but will still load the old version

TODO: word-wrapping multi-line text editing of custom text entries
@JonBooth78 JonBooth78 force-pushed the update-the-flightlog-rebased branch from de57ab9 to f5e84b2 Compare January 26, 2024 07:05
@JonBooth78
Copy link
Contributor Author

@Web-eWorks , this is all tidied up ready to merge. Apologies it took so long, I was trying to do it step by step and kept tripping over the file split that git failed to track (well github refused to track for pushing new changes to the PR, hence having to create this second one in the first place) - oh that and a bug in my git client (which I've updated and now it's gone away) . In the end realized that if we pulled all the non-flightlog related changes ahead of all the flightlog related ones and the rename that we can track, then the rest can be a single, stand alone commit.

@sturnclaw
Copy link
Member

@JonBooth78 started a new game from the latest commit, initial entry is missing its custom description.

image

@sturnclaw
Copy link
Member

sturnclaw commented Jan 26, 2024

Fixed - it was an errant colon in the function declaration for FlightLog.MakeCustomEntry 😄

(My editor apparently cleaned up a lot of trailing whitespace on save too - if using VSCode I'd definitely recommend turning on the Trim Trailing Whitespace and Insert Final Newline options...)

@JonBooth78
Copy link
Contributor Author

JonBooth78 commented Jan 26, 2024 via email

@sturnclaw sturnclaw merged commit 14720dd into pioneerspacesim:master Jan 26, 2024
@JonBooth78 JonBooth78 deleted the update-the-flightlog-rebased branch February 3, 2024 20:02
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.

3 participants