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

Add UUID to indexed compendium documents, and getUuid(id) method to compendium collections to easily build UUID's #9342

Closed
mkahvi opened this issue May 6, 2023 · 1 comment
Assignees
Labels
api Issues related to the API used by Mod Devs compendium Issues related to Compendium packs tech-debt Issues focused on the reduction of technical debt

Comments

@mkahvi
Copy link

mkahvi commented May 6, 2023

User Experience

Currently I need to do (await pack.getDocument(documentId)).uuid or manually construct the UUID to accomplish this.

It'd be better if there was a helper function for this purpose (e.g. pack.getDescendantUUID(id)) or the index included the UUID.

@aaclayton
Copy link
Contributor

Good suggestion. I think there are a couple places where we manually compose a compendium UUID because we lack a centralized function that handles this for us.

image

We should prioritize adding a static method that, given the components of the UUID (pack name, document name, document ID) handles the formatting in the correct way.

@aaclayton aaclayton added tech-debt Issues focused on the reduction of technical debt api Issues related to the API used by Mod Devs labels May 8, 2023
@aaclayton aaclayton added this to the Version 11 - Testing 2 milestone May 8, 2023
@aaclayton aaclayton added the compendium Issues related to Compendium packs label May 8, 2023
@Fyorl Fyorl self-assigned this May 11, 2023
@cswendrowski cswendrowski assigned cswendrowski and unassigned Fyorl May 11, 2023
@cswendrowski cswendrowski changed the title Add a way to get UUID of a document inside a compendium without fetching the document itself Add UUID to indexed compendium documents, and getUuid(id) method to compendium collections to easily build UUID's May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues related to the API used by Mod Devs compendium Issues related to Compendium packs tech-debt Issues focused on the reduction of technical debt
Projects
Status: Done
Development

No branches or pull requests

4 participants