Skip to content

Conversation

@farmaazon
Copy link
Contributor

@farmaazon farmaazon commented Aug 13, 2025

Pull Request Description

Restoring #13746

Practically, only 5021ed1 is to be reviewed.

Original description

Fixes #13712

Removed remains of svg embedding, as it turned out to not work reliably when combined with shadow-dom (i.e. in visualizations) and the exact behavior is browser dependent. I ended up just unifying all places that reference icon's href into a single function, and added a "missing icon" visual. Unfortunately that means the playwright test snapshots still attempt a potentially cross-origin fetch request to resolve the icons, which is cancelled before hitting playwright's service-worker fetch handler. Allowing cross-origin requests in svg is often possible, but for tags is not yet implemented anywhere. The only workaround that somewhat works is to run the test reporter on the same port as the app under test used to have. We unfortunately use two, so the icons will either show up in dashboard or in project-view tests.

Also deduplicated login logic in playwright tests and added extra agreement modal detection, since that modal often used to be a problem for me when running test suite locally.

The Fix

I don't know why, but adding ?no-inline suffix made it not working. ?inline suffix didn't work as well. Leaving now without suffix.

Edit: There was a bug in vite (see comments below), so bumped vite version with some others to satisfy peer dependencies + applied some necessary changes.

Also restored the old way of documenting SvgIcon with information why I did it that way.

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • [ ] Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • [ ] Unit tests have been written where possible.
  • [ ] If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@farmaazon
Copy link
Contributor Author

@vitvakatu could you also do a QA? I got a bit paranoic here :)

Copy link
Contributor

@kazcw kazcw left a comment

Choose a reason for hiding this comment

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

More recent versions of vite have a bugfix for no-inline with svg assets: vitejs/vite#19496 (apparently the change only affects prod builds though?)

This is fine too, though.

@farmaazon
Copy link
Contributor Author

More recent versions of vite have a bugfix for no-inline with svg assets: vitejs/vite#19496 (apparently the change only affects prod builds though?)

Yes, that matches our symptoms (I think dev buid was fine, and that's why @Frizi overlooked it). So I will try to bump vite version. That will make QA even more needed.

@farmaazon
Copy link
Contributor Author

Pushed changes. Indeed, bumping vite helped.

@farmaazon farmaazon requested a review from vitvakatu August 13, 2025 11:34
@vitvakatu
Copy link
Contributor

could you also do a QA?

on it

@farmaazon farmaazon added the CI: No changelog needed Do not require a changelog entry for this PR. label Aug 13, 2025
Copy link
Contributor

@vitvakatu vitvakatu left a comment

Choose a reason for hiding this comment

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

The application works, but unit and integration tests are not working locally because of vitejs/vite#20286
It works when using node 20.16, so I guess we should bump .node-version also.
Also there is a typecheck failure on CI.

Copy link
Contributor

@vitvakatu vitvakatu left a comment

Choose a reason for hiding this comment

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

Actually nevermind, it was misconfiguration of node version on my side. Everything seems to be working fine.

@farmaazon farmaazon added the CI: Ready to merge This PR is eligible for automatic merge label Aug 13, 2025
@mergify mergify bot merged commit 77d7635 into develop Aug 14, 2025
132 of 136 checks passed
@mergify mergify bot deleted the wip/farmaazon/icons-once-more branch August 14, 2025 13:54
@farmaazon farmaazon added this to the 2025.3 Release milestone Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore embeded svg icons

4 participants