Skip to content

Conversation

@zorkow
Copy link
Member

@zorkow zorkow commented Apr 26, 2022

Integration of new SRE v4. Depends on SRE v4.0.4.

Changes to SRE integration

SRE can now be imported directly via the file given in its distribution. To keep import clean sre.ts now imports all API methods and exports them for use elsewhere. Consequently modules depending on SRE only have to import sre.js. Files with old type handling (d.ts files) are removed.

Changes to the explorer

Most changes are wrt. the new handling of API methods and updating to new locales. The most significant change in logic is that setupEngine now returns a promise itself, indicating when locale loading has been complete. Consequently previously awkward constructions with sreReady are rewritten in explorer.ts but also in semantic-enrich.ts.

Changes to the components

The component integrating SRE is now build similar to other components:

  • New sre component directory takes care the webpacking. Main file sre.js and configuration in sre_config.js
  • No more need to distinguish between sre-node and sre-browser.
  • Affects components depending on sre: semantic-enrich and a11y
  • The PR also contains the new init.js component subsuming the startup.js calls implemented by @dpvc

New component

The PR also includes a new exemplary component tex-chtml-full-speech that demonstrates how SRE locales can be included via json imports in a MathJax distribution. This ensures that MathJax's internal MathMaps map is usually empty, keeping builds small and also allowing our lab still to work as usual.

zorkow and others added 30 commits September 24, 2021 02:18
Update component files for changes to sre component
…at they can be added before other imports, and so that the combined components work with SRE4. Also, fix sre webpack libs.
Allow SRE to use resolverPath during startup
@zorkow zorkow requested a review from dpvc April 26, 2022 10:17
Copy link
Member

@dpvc dpvc left a comment

Choose a reason for hiding this comment

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

This looks good, but I think there is an issue with the promise handling in KeyExplorer. See the discussion in the comments to the code.

@dpvc dpvc added this to the 3.2.1 milestone May 1, 2022
@zorkow
Copy link
Member Author

zorkow commented May 6, 2022

Incorporates review suggestions. PTAL.

Note, that this also takes care of the path issue that I had mentioned yesterday. So no need for another PR on this.

However, I noticed that when a non-existent locale is provided in the option settings, we get a discrepancy in the context menu.
SRE will default correctly to English, but the menu will not show this. I will solve this in another PR.

Copy link
Member

@dpvc dpvc left a comment

Choose a reason for hiding this comment

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

Two small changes requested, but otherwise looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants