Skip to content

fix: create icon_paths field for communities#410

Open
suprstarrd wants to merge 1 commit intoPretendoNetwork:devfrom
suprstarrd:fix/subcommunity-icons
Open

fix: create icon_paths field for communities#410
suprstarrd wants to merge 1 commit intoPretendoNetwork:devfrom
suprstarrd:fix/subcommunity-icons

Conversation

@suprstarrd
Copy link
Contributor

@suprstarrd suprstarrd commented Mar 7, 2026

Resolves #407 and is related to #87 and #268

Changes:

This commit adds an icon_paths field for communities and puts it in use if it exists for a certain community. This allows subcommunities to have their own icons, and also allows for more granular control over where icons exist in the future.

There are a few minor but more complicated exceptions where this addition is not respected yet.

Had to pull this out of a few other unrelated changes (which are now in separate branches on my fork) so if anything seems out of place, let me know so I can pluck it. That's where it comes from.

This allows subcommunities to have their own
icons, and also allows for more granular control
over where icons exist in the future.

There are a few minor but more complicated
exceptions where this addition is not respected
yet.

Signed-off-by: Sienna "suprstarrd" M. <business@suprstarrd.com>
@suprstarrd suprstarrd force-pushed the fix/subcommunity-icons branch from 780a0a4 to ecb90b8 Compare March 7, 2026 17:03
},
ctr_header: { type: String },
wup_header: { type: String },
icon_paths: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a 100% sure but I think mongoose will fill in this object for existing db entries. So itll make it always truthy.

If you could test if this works as expected (not break) with existing db entries that don't have icons. that'd be grand

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also with communities created by miiverse-api, it should be nullable, right?
Games don't upload icons, so it'd have to inherit the parent.

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.

[Bug]: Subcommunities adopt the icons of their parent communities on the Posts page

2 participants