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 UI issues with Camera Monitor #31809

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eoineoineoin
Copy link
Member

About the PR

Requires space-wizards/RobustToolbox#5425

When using the camera monitor UI, there were several usability issues:

  • There's no indication of which camera you're looking at in the list
  • Every time you change the camera, the list jumps around

Why / Balance

Bad UI -> Better UI

Technical details

Classic "delete and recreate the UI" losing state.

Since the code to merge items is basically identical to #30292 and is likely to occur again in other UIs, I've moved the item list merging code into RobustToolbox, so the criminal records UI got simplified to use the moved code.

Media

Before. List jumps, and the selected camera is only highlighted very briefly:

Peek.2024-09-03.21-17.mp4

After. Normal, human UI:

Peek.2024-09-03.21-43.mp4

Requirements

  • I have read and I am following the Pull Request Guidelines. I understand that not doing so may get my pr closed at maintainer’s discretion
  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

@github-actions github-actions bot added the Changes: UI Changes: Might require knowledge of UI design or code. label Sep 3, 2024
@ps3moira
Copy link
Contributor

ps3moira commented Sep 5, 2024

Would you be able to make cameras toggle with arrow keys?

@eoineoineoin
Copy link
Member Author

Would you be able to make cameras toggle with arrow keys?

That's unrelated to this PR. Feel free to make another PR with that feature yourself.

Comment on lines +173 to +178
var entries = listing.Select(i => new ItemList.Item(RecordListing) {
Text = i.Value,
Metadata = i.Key
}).ToList();
entries.Sort((a, b) => string.Compare(a.Text, b.Text, StringComparison.Ordinal));
RecordListing.SetItems(entries, (a,b) => string.Compare(a.Text, b.Text));
Copy link
Contributor

Choose a reason for hiding this comment

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

A clean up of the station records code should really be its own separate PR

Metadata = i.Key
}).ToList();
entries.Sort((a, b) => string.Compare(a.Text, b.Text, StringComparison.Ordinal));
SubnetList.SetItems(entries, (a,b) => string.Compare(a.Text, b.Text));
Copy link
Contributor

Choose a reason for hiding this comment

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

'SetItems' is popping up as a missing method in my IDE, and nothing else in the current code base seems to be using it. Please check this and update if necessary

Copy link
Member Author

Choose a reason for hiding this comment

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

This PR depends on space-wizards/RobustToolbox#5425

If preferable, I can try making SetItems an extension method in Content.Client, so it doesn't require an RT change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Whoops, not sure how I managed to miss that!

As a heads up, we only have a few RT maintainers around right now, it could be a while before an engine PR gets merged

@chromiumboy chromiumboy added the S: Awaiting Changes Status: Changes are required before another review can happen label Nov 13, 2024
@chromiumboy chromiumboy self-assigned this Nov 13, 2024
@SlamBamActionman SlamBamActionman added the S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. label Nov 14, 2024
@chromiumboy chromiumboy added D3: Low Difficulty: Some codebase knowledge required. A: Security Area: Security department, including Detectives, HoS T: Bugfix Type: Bugs and/or bugfixes P3: Standard Priority: Default priority for repository items. T: Cleanup Type: Code clean-up, without being a full refactor or feature T: UI / UX Improvement Type: UI and player facing interactive graphical interfaces size/S Denotes a PR that changes 10-99 lines. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Nov 16, 2024
@github-actions github-actions bot added the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jan 29, 2025
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@MilonPL MilonPL added the S: Needs Engine PR Merged Status: Requires an existing Robust Toolbox PR to be merged first. label Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Security Area: Security department, including Detectives, HoS Changes: UI Changes: Might require knowledge of UI design or code. D3: Low Difficulty: Some codebase knowledge required. P3: Standard Priority: Default priority for repository items. S: Awaiting Changes Status: Changes are required before another review can happen S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted S: Needs Engine PR Merged Status: Requires an existing Robust Toolbox PR to be merged first. size/S Denotes a PR that changes 10-99 lines. T: Bugfix Type: Bugs and/or bugfixes T: Cleanup Type: Code clean-up, without being a full refactor or feature T: UI / UX Improvement Type: UI and player facing interactive graphical interfaces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants