ncssar / radiolog

SAR radio log program
Other
13 stars 3 forks source link

team notes #697

Closed caver456 closed 6 months ago

caver456 commented 7 months ago

Allow for 'notes' for each team tab.

Display could be something like a row pinned to the top of the team's table; but that seems a bit odd for multiline notes. And/or maybe something that shows a multiline popup when hovered, similar to a tooltip (like the fleetsync filter button at the top right) or a Note on an Excel cell.

Entry method for now could just be direct typing by the operator, but, eventually could be automated e.g. list of team members, assignment name, etc, pulled from (or pushed from) plans console via some shared file that radiolog watches.

This came up when the operator found it handy to type in a list of names of individuals on each team, and needed to make it visually quickly accessible by prepending the entry with a line of equals signs or plus signs or such - but that still could require scrolling to see it.

caver456 commented 7 months ago

Features that could be added later:

caver456 commented 6 months ago

Some explanation is needed on the latest WIP (tooltips) commit on the branch for this issue.

Tab status colors are set (every second for every tab) from updateTeamTimers. This is done using setStyleSheet. This has worked fine for years.

But: if you add a tooltip on the tabButton, its style is inherited from the style of the tabButton. So, the tooltip's background color would be the same as its tab, based on status and/or blink state. That was pretty distracting! We just want a single simple consistent unchanging background for the tooltip - white is fine.

After a bunch of googling, turns out the best way to 'stop' that 'inheritance' is to set the style using an object selector.

Did some attempts setting the stylesheet of QToolTip, and setting the palette of the tabButton rather than using styleSheet, but no luck. There might be a solution in one of those methods, but, a couple of days of trying didn't yield success.

So - went with the object selector. That worked but required a few changes in various parts of the code.

Previously: tab.setStyleSheet('background:green') Now: tab.setStyleSheet('#tab_z_Team00001 { background:green }'

This leaves the tooltip with a white background, as desired.

caver456 commented 6 months ago

Having a tough time deciding the best way to indicate that a given team has notes, and to allow pinning, without taking up real estate.

Maybe a dot in the tab label area? Above and to the right, like a superscript? Below the label as a dot or a tiny notes icon? These would serve as an indication that the team has notes; then a hover on the tab could open an actual popup with a 'pin' button. When pinned, the notes become a single line of text above the team table, also with an unpin button.

caver456 commented 6 months ago

Maybe do the simple part first: show the single line of notes above the team table, since it sounds like that will be part of the plan no matter what.

caver456 commented 6 months ago

Interesting note upon selecting 'Team Notes from team 2 context menu: image This happens after typing text for team 1, then closing and not saving. Need to track this down...

caver456 commented 6 months ago

figured that one out - probably. Going forward with possibly-final commit.