ncssar / radiolog

SAR radio log program
Other
13 stars 3 forks source link

show count of hidden team tabs to the right of the rightmost visible team tab #708

Open caver456 opened 7 months ago

caver456 commented 7 months ago

If any tabs are hidden, show a very small text '+ 3 more' or such to the right of the rightmost visible team tab.

This came up after THE NARROWS OP2, 12/1/23, after noticing the operator had hidden many tabs. This is related to #706 and #698.

The text should be as small as possible, to take up minimal real estate, while still drawing attention to the fact that there are hidden tabs. If there's no great solution, an alternative might be to blink the three-dots at the left of the team tab.

caver456 commented 7 months ago

Tabling this issue due to high complexity and low-to-medium benefit. Made two commits on this branch, and leaving the branch open and the issue open, but the timing complexity is pretty serious. Not as simple as it sounds, and possibly made worse by case sensitivity issues related to #702 etc. Maybe consider tackling this issue again after #694 and #702.

caver456 commented 7 months ago

Sample of the timing issues, seems like this might be related to case-sensitivity:

053550:in updateTeamTimers: teamTimersDict={'z_Team00001': 128, 'z_Team00002': 126, 'z_TeamPcso': 119, 'z_01s42': 109, 'z_Team00003': 96}
053550:in updateTeamTimers: extTeamName in teamTimersDict=z_Team00001
053550:in updateTeamTimers: extTeamName in teamTimersDict=z_Team00002
053550:in updateTeamTimers: extTeamName in teamTimersDict=z_TeamPcso
053550:in updateTeamTimers: extTeamName in teamTimersDict=z_01s42
053550:in updateTeamTimers: extTeamName in teamTimersDict=z_Team00003
053551:newEntry called with these values:
053551:['0535', '', 'Team Pcso', '[RADIOLOG: operator is unhiding hidden team tab for "Team Pcso"]', '', 'In Transit', 1701869751.1709216, '', '', '']
053551:new team: newTeamName=Team Pcso extTeamName=z_TeamPcso niceTeamName=Team Pcso shortNiceTeamName=Pcso
053551:extTeamNameList before sort:['spacerLeft', 'z_Team00001', 'z_Team00003', 'spacer2', 'moreTab', 'z_TeamPcso']
053551:grouped tabs:{'NCSOcmd': ['z_01s42'], 'NCSO': [], 'NCPD': [], 'TPD': [], 'GVPD': [], 'CHP': [], 'Numbers': ['z_Team00001', 'z_Team00002', 'z_Team00003'], 'other': ['z_TeamPcso']}
053551:extTeamNameList after sort:['spacerLeft', 'spacer1', 'z_Team00001', 'z_Team00003', 'spacer2', 'z_TeamPcso', 'moreTab']
053551:addTab: extTeamName=z_TeamPcso  i=5  count before insert=4
053551:ERROR: clicked a cell z_TeamPcso that does not exist in extTeamNameList or hiddenTeamTabsList
053551:in updateTeamTimers: teamTimersDict={'z_Team00001': 129, 'z_Team00002': 127, 'z_TeamPcso': 120, 'z_01s42': 110, 'z_Team00003': 97}
053551:in updateTeamTimers: extTeamName in teamTimersDict=z_Team00001
053551:in updateTeamTimers: extTeamName in teamTimersDict=z_Team00002
053551:in updateTeamTimers: extTeamName in teamTimersDict=z_TeamPcso
Traceback (most recent call last):
  File "C:\Users\caver\Documents\GitHub\radiolog\radiolog.py", line 3838, in updateTeamTimers
    self.ui.tabWidget.tabBar().tabButton(i,QTabBar.LeftSide).setStyleSheet(statusStyleDict[status])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'setStyleSheet'