Tables window details view and other fixes#5997
Conversation
…ng any tables in the campaign with the same name).
… clients' LookupTableDetailsTablePanel)
…egion tags used in class
There was a problem hiding this comment.
I still have to go through the implementation, but the UI looks pretty nice on the whole.
I have some suggestions, based partly on the fact that I prefer a narrower Tables window docked to the side of the window. In that case, the details view would end up looking like this:

- We can do without the #Values and #Image columns. This would also save some CPU cycles for those who run very large tables (not sure how big a deal this latter point will be).
- The column names can be a bit more concise. Actually, icons or something else narrow would be nice for the checkbox columns, but that's a bigger ask.
- Show Table to Players -> Show to Players
- Pick Once Table -> Pick Once
- Allow Lookup by Players -> … Actually, I don't have an idea for shortening this one.
- We should probably enforce some minimum size (determined by the column headings, perhaps), and allow the details table to scroll horizontally if that is exceeded. This would guarantee that at least the table structure is readable.
| MapTool.getCampaign().getLookupTableMap().remove(origname); | ||
| // if not a new table (i.e. create/duplicate) delete the previous named one from the server. | ||
| if (!isNew) { | ||
| MapTool.serverCommand().deleteLookupTable(origname); |
There was a problem hiding this comment.
Good find - this was a regression in #5868.
A future improvement for us would be to have unique table IDs so renames are actually renames and not delete+create.
Thanks for taking an initial look! I was debating whether to:
Personally I like having all the summary table stats as it enables management of the tables at a glance (esp. when developing or importing tables or getting to grips with others frameworks). Less useful when running a game. I tested it with a several large data tables (with no images though) and had no noticeable drop in performance. I suppose I could create some more with images. Not sure how to add counters/timers to non-zone rendering things though - is that even possible/desirable for this? Columns icons are good idea, will revisit. I did previously have ticks and cross icons, but the disabled check boxes were on a potential path to enabling them on that panel as well, suppose that could be done with icons though if that was desired. Will be more concise with the names... I did just use the existing entries for I18N tables for those, but will create some new keys. Adding horizontal scroll and column sizing. Agree, will add/revisit. |
Probably if there is no performance issue without images of should also be fine with images since these don't factor into the control flow when counting. And it's totally possible (and easy!) to add timers anywhere. Figuring out how and when to report them is the hard part. I wouldn't worry about it for now. |
Identify the Bug or Feature request
closes #2248
Description of the Change
Provide an optional details view of the tables window in a tabular format. Views can be selected via new toggle buttons in the table window. The details view shows a different set of columns for a GM than a player. Default is the existing Image Panel.
Changes:
LookupTableFunction#processMutatedLookupTable()- > centralize handling of table updates from MTScript functions in the same class) to the server and refresh of theLookupTablePanelLookupTableMacro-> updated logging to use I18N.LookupTablePanel- switch to use a CardLayout and addition of theLookupTableDetailsTablePanel.LookupTablePanelView-> Addition of toggle buttons (and associated new button icons) to switch between the image panel and the details table panel.CampaignManager-> adding resetting the temp lookup table.LookupTable-> new methods to get counts of entries, entries with values, and entries with images.MapTool-> reset and refresh theLookupTablePanelwhen setting a campaign (e.g. resolves staleLookupTablePanelwhen clients connecting to a server or when gm loads campaign with clients connected).AppActions-> only allow GMs to add default tables (otherwise players may override customised tables with the same names in a connected campaign). Corrected issue where if a server was running and the gm added the default tables, they would not be show in connected clients' Table window.EditLookupTablePanel-> if the lookup table name changes (and is not a new table), delete the original lookup table on the serverNew:
LookupTableDetailsTablePanel-> Implements a scrollable details table based on the underlying model.LookupTableDetailsTablePanelModel-> Defines the table and (GM/Player) columns for theLookupTableDetailsTablePanel. Employs snapshot list ofLookupTables to avoid race conditions when updating the JTable.LookupTableDetailsTableColumnRenderers-> based on the column metadata specify which column renderer to use, one of:TableColumnAlignedRenderers- align columnsTableColumnDisabledBooleanRenderer- disable checkboxesTableColumnIconRenderer- fit images to the table row heightPossible Drawbacks
Documentation Notes
Release Notes
This change is