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

Native Support for Actor Actions List #1

Closed
12 tasks done
kgar opened this issue Nov 1, 2023 · 1 comment
Closed
12 tasks done

Native Support for Actor Actions List #1

kgar opened this issue Nov 1, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@kgar
Copy link
Owner

kgar commented Nov 1, 2023

Re-create the Character Actions List natively for Tidy 5e Sheets.

Why

The "Character Favorites" module was so popular in combination with Tidy 5e Sheets that it eventually was grafted in as a core feature. The community around the Tidy 5e rewrite have indicated that the Actions List feature is similarly a core experience of Tidy 5e Sheets. To provide more flexibility and to give more control over the structuring and styling of the Actions list feature, make this feature native to Tidy 5e Sheets.

There will likely be more sheet layout options in the future. Having a core feature like the actions list built right into the module opens the door for greater reuse and configuration as the need arises.

What to Do

  • This feature should be disabled by default in order to provide the same New User experience as before. When disabled, there is no trace of the Actions tab, action icons, or anything else related to it, when viewing the sheets. This feature should not have an enable/disable toggle. It should simply exist, but per default tabs in Feature: Allow GM to Set Default Tabs for Each Actor Type #75, the Actions tab will, by default, be unselected but available for all sheets. The GM, however, should be able to change the default to suit their game world.
  • Sheet Settings, "Features" tab, new section: "Actions List"
    • (World scope) Checkbox to Enable/Disable feature
    • The settings from the current actions list module
    • Exclude settings that have to do with injecting the tabs. This will be handled in actor table selection and world-scoped default tab config.
  • When the action tab is included, it should provide the same experience as "Character Actions List," but for the rewritten Tidy 5e Sheets
  • Any existing style issues with the pre-rewrite Tidy 5e / Actions List integration should be resolved in this new feature

When this feature is enabled,

  • An "Actions" tab is available in the leftmost tab position by default for all actor sheet types
  • The "Actions" tab contains the tables/lists of actions available for each type of Action Economy ("Action", "Bonus Action", "Reaction", "Other", ...); NOTE: make separate sections for each of the Usage types (Mythic Action, Legendary Action, Action, etc.).
  • The tables match the specification of the standalone module
  • The Action icon should appear for all items, mirroring the standalone module
  • The algorithm for determining default Action list contents should mirror the standalone module

Reference

https://discord.com/channels/732325252788387980/1116078321067892796/1131598564477370408

@kgar kgar added the enhancement New feature or request label Nov 1, 2023
@kgar kgar self-assigned this Nov 23, 2023
kgar added a commit that referenced this issue Nov 26, 2023
* Added Actions List settings to the settings config.

Added a Features settings tab to Sheet Settings.

Added Actions List settings UI to Features settings tab.

Added English localization fields for Actions list and Features settings tab.

* Added ActionsTab component.

Wired actions list settings to register/unregister the actor tabs according to settings.

Removed unused code.

* Made adjustment to appease TypeScript.

* Removed Action tab inclusion / enabling logic now that it is being handled with default tab selection.

Removed unused Actions localization content.

Moved ActorJournalTab to the actor/tabs directory.

Added the Actions tab to the sheet state for each actor type so that it is available in tab selection.

* Removed deleted settings from the Features Settings tab.

* Added/lightly adapted actions script.

Added ActorActions type to the core ActorSheetContext type.

Updated each actor type to pull actor actions during data setup.

* Adapted most of the original template. WIP.

* Unlocked item table cell height.

Added scroll container to actions tab.

Aligned ItemUseButton to be centered vertically, in preparation for multi-line item table rows.

* Added active effects marker override for ItemName component.

Added image size overrride that applies to ItemUseButton and ItemImage components and is based on a CSS variable, falling back to the usual 1.5rem.

* Gearing up to figure out the rest of the template.

* Worked out a solid truncation approach when dealing with flex-columns.

Added "Other" to the activation type labels.

* Removed unnecessary style from flex column truncate rule.

* Parsed out Hit/DC section.

* Parsed out Damage column.

* Moved stray controls into the controls directory in item-list components.

Extracted RechargeControl and replaced all the places where it'd been copy/pasted throughout development.

* Applied some additional formatting for the uses section.

* More fiddling.

* Added Action Override control to inventory, features, spellbook, NPC abilities, and vehicle attributes tabs.

Added "Shift+Click to clear override" functionality.

Added some null-safety to the actions tab prop checking.

Added localization keys.

* Added generic actorUsesActionFeature function to the actions script.

Added useActionsFeature boolean to all actor sheet contexts.

Limited presence of action filter override control to when useActionsFeature is true.

Added Action Filter Override and Clear Override options to context menu.

* Added context menu support to actions tab table rows.

* Added item-info-card script to begin housing functions that can be extracted out of components.

Added script for determining the item info card to use.

Streamlined item info card template selection by delegating default fallback to the new function during rendering rather than during the delay period.

Removed explicit item card template assignment by the various lists and grids, allowing the item type to determine the card template instead.

Indirectly got item cards on the Action tab.

* Resolved warnings by moving global Foundry references to FoundryAdapter

* Removed rogue logs.

* Added spell class to spell small label.

Stacked item use text so that the numbers are on top and the small text is on bottom.

Set up flex-wrap for the damage strings and make them not truncate. Given enough damage types, the row will expand to accommodate them.
@kgar
Copy link
Owner Author

kgar commented Dec 1, 2023

The actions list is live and available in the Tab Selection screen. Further work and any bugfixes will be done via additional github issues.

@kgar kgar closed this as completed Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant