emilyploszaj / emi

A featureful and accessible item and recipe viewer
MIT License
233 stars 47 forks source link

Mod name tooltips: match kebab case mod IDs, fall back to friendly namespaces #399

Closed sisby-folk closed 7 months ago

sisby-folk commented 7 months ago

Attempts to get a mod container with ID cool-mod if the container with ID cool_mod doesn't exist.

If neither exist, falls back to Cool Mod instead of cool_mod using basic string formatting.

Users that need IDs for commands can use F3+H.

sisby-folk commented 7 months ago

example with loggerhead-luminancies

release:

image

pr:

image

emilyploszaj commented 7 months ago

I can understand prettying up IDs, particularly good for stuff like kubejs items, tags, and recipes, but the _ to - conversion does have me a bit hesitant, that seems like something modders should be handling. Alternatively, having a translation key for mod names could be a reasonable solution as well.

sisby-folk commented 7 months ago

Yea to give our use case - we like kebab case everywhere - mod slugs, project name, mod ID, archive name, etc - we think it looks nice and actively decide to not use snake.

But kebab is illegal for packages & therefore effectively namespace. Having to change our entire published mod ID in an update because we added an item has been a consideration due to this limitation before and I reckon we can just do better via this.

emilyploszaj commented 7 months ago

Yeah I'm swayed, though I believe WordUtils is deprecated and would enjoy that warning be suppressed or an alternative method be used.

sisby-folk commented 7 months ago

As far as I'm aware there's not a direct alternative available on the minecraft classpath, so i guess suppression is best?

On Thu, 11 Jan 2024, 5:48 pm Emily Rose Ploszaj, @.***> wrote:

Yeah I'm swayed, though I believe WordUtils is deprecated and would enjoy that warning be suppressed or an alternative method be used.

— Reply to this email directly, view it on GitHub https://github.com/emilyploszaj/emi/pull/399#issuecomment-1886400502, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANJ34KM3F2CJB3BFSRBBU6TYN6DMZAVCNFSM6AAAAABBMIIO2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBWGQYDANJQGI . You are receiving this because you authored the thread.Message ID: @.***>

emilyploszaj commented 7 months ago

Yeah, just chuck in a suppression then, it's a losing battle but I try to keep as few warnings in my workspace as possible