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

Add history tab to bounty console #33932

Merged
merged 22 commits into from
Jan 30, 2025

Conversation

BarryNorfolk
Copy link
Contributor

@BarryNorfolk BarryNorfolk commented Dec 18, 2024

About the PR

Added a history tab to the cargo bounty console.

Why / Balance

Knowing whether or not any bounties have been completed and when is important for people in charge of logistics, or command for that matter. It's also important to know who skipped what bounties so people can either teach which ones to not skip, or nod sagely at their good skip choices.

Technical details

New to the codebase and C# in general, but seemed somewhat straightforward to add.

Media

image
image

Requirements

Breaking changes

🆑

  • add: Added a history tab to the bounty computer, showing all past completed and skipped orders (and who skipped them).

@github-actions github-actions bot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. Changes: UI Changes: Might require knowledge of UI design or code. size/M Denotes a PR that changes 100-999 lines. labels Dec 18, 2024
@BarryNorfolk BarryNorfolk changed the title Bounty/history Add history tab to bounty console Dec 18, 2024
@ScarKy0 ScarKy0 added T: New Feature Type: New feature or content, or extending existing content D2: Medium Difficulty: A good amount of codebase knowledge required. S: Needs Review Status: Requires additional reviews before being fully accepted A: Cargo/Salvage Area: Cargo department or Salvage. P3: Standard Priority: Default priority for repository items. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Dec 18, 2024
@lzk228
Copy link
Contributor

lzk228 commented Dec 18, 2024

a suggestion
why to write the status two times?
small photoshop image how it would look little cleaner
(or if you afraid that a long name will cover the manifest, you can leave the id where it is and place the name in bottom right corner)
image

@lzk228
Copy link
Contributor

lzk228 commented Dec 18, 2024

also a question, how it would look if there are two or more items in the manifest

@BarryNorfolk
Copy link
Contributor Author

BarryNorfolk commented Dec 18, 2024

a suggestion why to write the status two times?

Felt fine to do so, one is an "At a glance" piece of coloured text so you can see whether something was completed or not. The other is more time based information. I don't really have any opinion about the duplication further than that.

also a question, how it would look if there are two or more items in the manifest.

I'll double check, so far it's just whatever the original bounty manifest would have in it. If that looks crap then I'll refine it further.

Copy link
Contributor

@Aeshus Aeshus left a comment

Choose a reason for hiding this comment

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

Thanks for the PR (and congrats on the first contribution)!

I just have mainly stylistic comments, though most of them are inherited from the questionable Cargo Bounty code (so it's not really your fault for not knowing).

Overall, very good PR.

Content.Client/Cargo/UI/BountyHistoryEntry.xaml.cs Outdated Show resolved Hide resolved
Content.Client/Cargo/UI/BountyHistoryEntry.xaml Outdated Show resolved Hide resolved
Content.Client/Cargo/UI/BountyHistoryEntry.xaml.cs Outdated Show resolved Hide resolved
Content.Client/Cargo/UI/CargoBountyMenu.xaml Outdated Show resolved Hide resolved
Content.Server/Cargo/Systems/CargoSystem.Bounty.cs Outdated Show resolved Hide resolved
Content.Shared/Cargo/CargoBountyHistoryData.cs Outdated Show resolved Hide resolved
@BarryNorfolk
Copy link
Contributor Author

Thanks for the PR (and congrats on the first contribution)!

I just have mainly stylistic comments, though most of them are inherited from the questionable Cargo Bounty code (so it's not really your fault for not knowing).

Overall, very good PR.

Cheers, I'll go over these at get them in as a new fix. I merged a version of this to a downstream so I'll add more commits on top so it's easier to bring the two together when they're done!

Any suggestions on formatters btw, the import ordering feels like it should be done via some formatting tool :D

@Aeshus
Copy link
Contributor

Aeshus commented Dec 19, 2024

Any suggestions on formatters btw, the import ordering feels like it should be done via some formatting tool :D

We primarily use JetBrains Rider (free to use for non commercial projects) for writing code and formatting, though Visual Studio also supports sorting imports and probably everything else we use in Rider.

There’s also a Rider Code Cleanup CLI tool, which should match the normal Rider formatting while being completely free, though I haven’t personally heard of anyone using it yet (could be potentially integrated with VSC if enough work is put into it).

@BarryNorfolk
Copy link
Contributor Author

BarryNorfolk commented Dec 20, 2024

Reworked it some more and updated the screenshots in the description. Think I've hit pretty much all your points that you've raised, so let me know. Tons more commits so I can just cherry pick them over to the downstream later on :)

@BarryNorfolk BarryNorfolk requested a review from Aeshus December 20, 2024 12:13
Copy link
Contributor

@Aeshus Aeshus left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes I requested!

I like the styling of the cargo bounty entry, though I just had some minor changes that you can make to the code that doesn't affect the way it looks.

Also, what are your thoughts on reversing the order of the history so that it displays the most revent events highest?

The rest are just code style things.

Thanks!

Content.Shared/Cargo/CargoBountyHistoryData.cs Outdated Show resolved Hide resolved
Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs Outdated Show resolved Hide resolved
Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs Outdated Show resolved Hide resolved
Content.Server/Cargo/Systems/CargoSystem.Bounty.cs Outdated Show resolved Hide resolved
Content.Client/Cargo/UI/BountyHistoryEntry.xaml Outdated Show resolved Hide resolved
Content.Client/Cargo/UI/BountyHistoryEntry.xaml Outdated Show resolved Hide resolved
Content.Client/Cargo/UI/BountyHistoryEntry.xaml Outdated Show resolved Hide resolved
@BarryNorfolk
Copy link
Contributor Author

Merry crimbus

@BarryNorfolk BarryNorfolk requested a review from Aeshus December 23, 2024 12:43
Copy link
Contributor

@Aeshus Aeshus left a comment

Choose a reason for hiding this comment

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

This PR is definitely to the point of being complete!

I have some last comments about some redundant code/documentation stuff, but those aren't the end of the world.

Thanks for going through the whole review process!

Content.Shared/Cargo/CargoBountyHistoryData.cs Outdated Show resolved Hide resolved
Content.Client/Cargo/UI/BountyHistoryEntry.xaml Outdated Show resolved Hide resolved
@BarryNorfolk
Copy link
Contributor Author

No worries, the first PR is always the hardest as you have to get used to things. Plus C# is very new to me, so is the codebase. Copy and pasting things only works so well, if the code you're copying is correct ;)
I do plan on doing some more in this area so I can come back later and fix up any documentations and what not.

@Aeshus Aeshus self-assigned this Jan 30, 2025
@Aeshus Aeshus added S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. and removed S: Needs Review Status: Requires additional reviews before being fully accepted labels Jan 30, 2025
Copy link
Contributor

@beck-thompson beck-thompson 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 to me! Fun idea love the pr 👍

@beck-thompson beck-thompson merged commit 1859214 into space-wizards:master Jan 30, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Cargo/Salvage Area: Cargo department or Salvage. Changes: UI Changes: Might require knowledge of UI design or code. D2: Medium Difficulty: A good amount of codebase knowledge required. P3: Standard Priority: Default priority for repository items. S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. size/M Denotes a PR that changes 100-999 lines. T: New Feature Type: New feature or content, or extending existing content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants