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

Move FullStory script after importmaps #3790

Merged
merged 1 commit into from
Jul 29, 2023
Merged

Move FullStory script after importmaps #3790

merged 1 commit into from
Jul 29, 2023

Conversation

Benabik
Copy link
Collaborator

@Benabik Benabik commented Jul 29, 2023

Resolves #3767 (on modified dev)

Description

Running Javascript before the importmap seems to break Firefox's ability to load external modules.

Notes:

  1. Minimizing the fullstory_script code to <script>(function(){})</script> still failed.
  2. The import map works enough to load our application.js but fails to load jQuery (the first import in application.js).

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  1. Remove if Rails.env.production? from the fullstory_script calls on main.
  2. Load dashboard in Firefox
  3. Open console
  4. See error: Uncaught TypeError: The specifier “jquery” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “../” or “/”.
  5. Switch to this branch, repeat above, error does not occur.

Can also test by clicking on < collapsed sections in sidebar or any icon in the top bar (hamburger, calendar, or bell).

app/views/layouts/_devise_shared.html.erb Outdated Show resolved Hide resolved
Running Javascript before the importmap seems to break Firefox's
ability to load external modules.

Notes:

1. Minimizing the fullstory_script code to
   `<script>(function(){})</script>` still failed.
2. The import map works enough to load our application.js but fails to
   load jQuery (the first import in application.js).

fixes #3767
@scooter-dangle scooter-dangle added the Ruby for Good 2023 DC Created for Ruby for Good 2023 DC label Jul 29, 2023
Copy link
Collaborator

@scooter-dangle scooter-dangle left a comment

Choose a reason for hiding this comment

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

Great! Thanks!

@scooter-dangle scooter-dangle dismissed awwaiid’s stale review July 29, 2023 19:58

Change made…resolved ✅

@scooter-dangle scooter-dangle merged commit 33ceb9f into main Jul 29, 2023
13 checks passed
@scooter-dangle scooter-dangle deleted the 3767-importmap branch July 29, 2023 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ruby for Good 2023 DC Created for Ruby for Good 2023 DC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: On Firefox in prod, the drop-down menus do not work
3 participants