Skip to content

feat(img): add recipe and tokens#31167

Merged
thetaPC merged 9 commits into
ionic-modularfrom
FW-6845
Jun 2, 2026
Merged

feat(img): add recipe and tokens#31167
thetaPC merged 9 commits into
ionic-modularfrom
FW-6845

Conversation

@thetaPC

@thetaPC thetaPC commented May 23, 2026

Copy link
Copy Markdown
Contributor

Issue number: resolves internal


What is the current behavior?

ion-img reads the active theme via getIonTheme() and applies it as a host class even though no SCSS rule depends on the theme class. The @virtualProp theme is also exposed publicly.

What is the new behavior?

  • Removed theme classes: Images won't render with a theme defined as a class.

Does this introduce a breaking change?

  • Yes
  • No

This PR introduces breaking changes to how ion-img is styled.

Migration Path:

  1. Theme classes: Remove any instances that target the theme classes: ion-img.md, ion-img.ios.

Other information

Previews

@vercel

vercel Bot commented May 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview, Comment Jun 2, 2026 9:31pm

Request Review

cp -r "${CORE_DIR}/src" "${OUTPUT_DIR}/src"
cp -r "${CORE_DIR}/dist" "${OUTPUT_DIR}/dist"
cp -r "${CORE_DIR}/css" "${OUTPUT_DIR}/css"
cp -r "${CORE_DIR}/themes" "${OUTPUT_DIR}/themes"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The themes/ directory (generated by npm run build.themes and dynamically imported by scripts.js at runtime as /themes/{theme}/default.tokens.js) wasn't being copied into the Vercel output, so the token modules 404'd in deployed previews while working fine locally where the dev server serves it from core/.

test.describe(title('img: basic'), () => {
// TODO FW-3596
test.describe.skip('image successfully loads', () => {
test.describe('image successfully loads', () => {

@thetaPC thetaPC May 26, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This test was originally marked skip under FW-3596 because it was flaky on CI. That predates the move to Docker based e2e runs, where the test environment is now deterministic (pinned browser, pinned OS, controlled timing). The flake was almost certainly caused by host environment variance.

Verified stable by running npm run test.e2e.docker img/test/basic -- --repeat-each=80 locally several times. Zero failures.

If the test ends up flaking in the future, we can skip and create a new ticket to address it.

@thetaPC thetaPC marked this pull request as ready for review May 26, 2026 17:45
@thetaPC thetaPC requested a review from a team as a code owner May 26, 2026 17:45
@thetaPC thetaPC requested a review from ShaneK May 26, 2026 17:45

@ShaneK ShaneK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me! Great work 🎉

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The old version was accidentally added during a sync. The original version was generated through a flaky test so it's not the true snapshot.

@thetaPC thetaPC merged commit 2dcec2d into ionic-modular Jun 2, 2026
73 of 94 checks passed
@thetaPC thetaPC deleted the FW-6845 branch June 2, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: angular @ionic/angular package package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants