Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Assets): set SVG base path in the window object to keep persistence #1218

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

dgonzalezr
Copy link
Collaborator

@dgonzalezr dgonzalezr commented Aug 21, 2024

Description

Some of the latest changes with the asset paths require projects to set the base path regardless of whether they use the default location. With this PR, if the base path has not been set and there's no BEEQ script added to the HTML, we will set the assets path to the default location: /svg and avoid projects doing so on their end. This time we are also setting the value in the window object to keep persistence since using a global variable is flaky when protect sets the base path but it is not taken into account when BqIcon calls getBasePath().

Related Issue

Fixes #ISSUE_NUMBER

Documentation

Screenshots (if applicable)

image

Checklist

  • I have read the CONTRIBUTING document.
  • I have read the CODE OF CONDUCT document.
  • I have reviewed my code.
  • I have tested the changes locally.
  • I have updated the documentation (if applicable).
  • I have added unit tests and e2e tests (if applicable).
  • I have requested reviews from relevant team members.

Additional Notes

@dgonzalezr dgonzalezr added the bug 🐛 Something isn't working label Aug 21, 2024
endv-bogdanb
endv-bogdanb previously approved these changes Aug 21, 2024
@dgonzalezr dgonzalezr force-pushed the refactor/assets-path branch from f128434 to 83c20e7 Compare August 21, 2024 16:37
@dgonzalezr dgonzalezr force-pushed the refactor/assets-path branch 2 times, most recently from 558a6e1 to 7e83b41 Compare August 23, 2024 11:38
@dgonzalezr dgonzalezr changed the title fix(Assets): set default path location if no basePath or script is set fix(Assets): set SVG base path in the window object to keep persistence Aug 23, 2024
endv-bogdanb
endv-bogdanb previously approved these changes Aug 23, 2024
If not base path has been set and there's no beeq script added to the HTML, we will set the assets path to the default location: `/svg`
Copy link

@dgonzalezr dgonzalezr merged commit c642527 into main Aug 26, 2024
6 checks passed
@dgonzalezr dgonzalezr deleted the refactor/assets-path branch August 26, 2024 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants