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

[Feature] Make the pack field in contributions an array, allowing for multiple packs to share one contribution for a given texture. #68

Open
3vorp opened this issue Jan 10, 2025 · 3 comments

Comments

@3vorp
Copy link
Contributor

3vorp commented Jan 10, 2025

Is your feature request related to a problem?

#39

Describe the feature you'd like

Replace the pack field with contribution storage with a packs array. For now, this will always just have a single pack in it, but this will faciliate cross-project contributions and is an easy step to do right now.

Screenshot(s)

interface CurrentContribution {
	date: number; 
	pack: string;
	authors: string[];
	texture: string;
}
interface ProposedContribution {
	date: number; 
	packs: string[];
	authors: string[];
	texture: string;
}

Notes

This will require a decent number of things to be changed:

  • Gallery modal author tab
  • Submission bot contribution adding
  • Texture lookup for gallery and slash command bot
  • Webapp contribution form
  • Decent amount of the API
@TheRolfFR
Copy link
Member

It could be split with API giving an interface for the implementation. Question is: What services are using the API? Do they all need access to this? I would prefer no rename and a union field type for this:

interface ProposedContribution {
	date: number; 
	packs string | string[];
	authors: string[];
	texture: string;
}

@3vorp
Copy link
Contributor Author

3vorp commented Jan 10, 2025

I don't like the idea of changing the type and not the name, since that way it's significantly harder to track down bugs. By making the field itself invalid, breaking changes are much more obvious. Additionally, I want to update the contribution json itself to store contributions in this way, meaning having this union type would be pointless

@TheRolfFR
Copy link
Member

We should transition slowly with 2 POST endpoints on API before breaking things or just allow both packs types in that endpoint interface, and treat .
2 GET endpoints should remain as long as features are not implemented on the frontend side

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

No branches or pull requests

2 participants