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

Update Custom Attributes table #584

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

GriffinRichards
Copy link
Collaborator

@GriffinRichards GriffinRichards commented Jan 11, 2024

  • Key/value pairs added to Custom Attribute tables can now be set as defaults, meaning when a new map/event is added that key/value pair will be added to its table automatically. These are stored in the config
  • Numbers in the Custom Attribute tables are now displayed with a value spinner
  • The "Type" column is removed from the table, as data types are now evident when you look at the value cell. Data types can still be specified when you add Custom Attributes
  • Adding keys that will collide with external keys is now prevented with an error message, rather than allowed to silently fail
  • Adding empty keys is now prevented, rather than allowing them to disappear on reload
  • Editing the Custom Attributes table for an Event now marks the map as unsaved

Internally, rewrote a bunch of customattributestable because it was handled unusually (the class was only really for Events, and it shared static functions with the Header tab's version of the table; now they fully share the class)

Closes #526

TODO:

  • Fix the table briefly squishing visually when the first cell is added
  • Fix a resizing issue when the table is first displayed
  • Add right-click context menu (or a new button?) for setting/unsetting defaults
  • Add edit history to the table
  • Handle interaction with Project Settings window
  • Take control of the Delete key when the table has focus?
  • Investigate whether it's reasonable to support adding default attributes to all existing maps/events as well, rather than just new ones
  • Update manual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically add custom fields
1 participant