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

Use native es6 modules instead of require js #1025

Merged
merged 74 commits into from
Jul 2, 2023

Conversation

Jaifroid
Copy link
Member

Initial working version of native ES6 module. No build process yet.

@Jaifroid Jaifroid added enhancement do-not-merge Sample code dependencies Pull requests that update a dependency file build Code relating to building, publishing, or maintaining the app labels Jun 18, 2023
@Jaifroid Jaifroid added this to the v4.0 milestone Jun 18, 2023
@Jaifroid Jaifroid self-assigned this Jun 18, 2023
document.getElementById('closeMessage').textContent = closeMessageLabel;
document.getElementById('modalLabel').textContent = label;
// Using innerHTML to set the message to allow HTML formatting
document.getElementById('modalText').innerHTML = message;

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.
link.setAttribute('id', 'kiwixJSTheme');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('type', 'text/css');
link.setAttribute('href', prefix + '/css/kiwixJS' + contentTheme + '.css');

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.
@Jaifroid
Copy link
Member Author

Some tests re-enabled.

@Jaifroid
Copy link
Member Author

Build configuration (with rollup and babel) now added.
Also vite dev and production server (but not fully functional yet).

@Jaifroid
Copy link
Member Author

Jaifroid commented Jul 2, 2023

After careful testing, it's clear that the issue with Firefox compatibility is not with this PR, but a longstanding one as stated in #879. I have now tested carefully, and have updated the Compatibility section of the Readme to make clear that support for Firefox in SW mode is FF >= 56 (non-ESR version). We also support at least 52-56 and 58 ESR in jQuery mode only (hence support for Firefox OS). This info has been added.

@Jaifroid
Copy link
Member Author

Jaifroid commented Jul 2, 2023

Last things:

  • Expose the built app in gh-pages in the dist folder
  • Update documentation for contributors and devs
  • Create an issue to adapt our UI tests to run on Browser Stack - see Add cross-browser end-to-end testing with BrowserStack #907
  • Fix IE11 issue with fontawesome
  • Fix IE11 not using webpHero correctly
  • Fix file not found error loading any article in Firefox <= 52
  • Build the production version and upload that one to the docker container
  • Ensure the build scripts use the distribution version
  • Fix regression with useCanvasElementsWorkaround caused by new way of loading webpHero
  • Add new packages to acknowledgements

@Jaifroid
Copy link
Member Author

Jaifroid commented Jul 2, 2023

Everything appears to be working. Proof will be in the daily pudding. 😉. Merging now.

@Jaifroid Jaifroid merged commit 383801f into main Jul 2, 2023
@Jaifroid Jaifroid deleted the Use-native-ES6-modules-instead-of-RequireJS branch July 2, 2023 17:14
@Jaifroid Jaifroid modified the milestones: v4.0, v3.10 Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Code relating to building, publishing, or maintaining the app dependencies Pull requests that update a dependency file enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test current kiwix-js with very old Firefox/Chrome browsers Introduce npm+webpack to build the app
1 participant