Skip to content

Conversation

@FlaminSarge
Copy link
Contributor

@FlaminSarge FlaminSarge commented Nov 17, 2025

Hovering (or long-pressing on mobile) will flip the icon to whatever isn't being displayed (ornament if setting is off, base icon if setting is on).
Setting uses 'all'/'none' instead of boolean so that if in the future we want to expand the setting to only weapons/armor/exotics/etc. we can use the same setting.
This also adds a slight transition for the shiny background animation so it's not as abrupt when it is hovered.
Reduced motion setting is honored and does not include the 0.2s transition, just instantly changing the icon instead.

base_feature.mov
reduced_motion.mov
shiny_background.mov

Changelog: Add setting to toggle display of ornaments

@FlaminSarge
Copy link
Contributor Author

Reduced motion setting is honored and does not include the 0.2s transition, just instantly changing the icon instead.

Debating whether this shouldn't even be included and should just not swap icons at all when reduced-motion.

@FlaminSarge
Copy link
Contributor Author

FlaminSarge commented Nov 17, 2025

Also this does reduce the visual intensity of the masterwork glow for ornamented exotics since it draws behind the icon if it has an ornament, I believe (due to the whole background/foreground thing being skipped in the !animatedBackground && !altIcon block).

Also tested on mobile, does work with the long-press, since that triggers hover and we don't have anything hooked up to long-press on DIM.

Comment on lines +86 to +87
(i) => i !== exampleArmor && i.bucket.inArmor && i.isExotic && i.ornamentIconDef,
) || allItems.find((i) => i !== exampleArmor && i.ornamentIconDef);
Copy link
Contributor Author

@FlaminSarge FlaminSarge Nov 17, 2025

Choose a reason for hiding this comment

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

Note that this prefers an ornamented exotic armor example before finding any example item.

@bhollis
Copy link
Contributor

bhollis commented Nov 22, 2025

Also tested on mobile, does work with the long-press, since that triggers hover and we don't have anything hooked up to long-press on DIM.

In sheets like the pull item sheet, we do use long press to activate the item popup. I'm not worried about it.

display: none;
display: block;
transition: opacity 0.2s ease-out;
opacity: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing to test would be whether all browsers correctly remove the layer (and stop the animation) when opacity is 0. My guess is they don't, and it actually might be incorrect to do so. If that's the case, the animated images may cost CPU even when hidden. To fix that you'd have to use an animation that flips display and then faded opacity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm hoping that the content-visibility setup handles this, let me know if it's being used correctly.

@FlaminSarge
Copy link
Contributor Author

(Planning to rebase and squash this once it's ready)

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.

3 participants