Skip to content

Conversation

BrayanDSO
Copy link
Member

@BrayanDSO BrayanDSO commented Aug 28, 2025

Purpose / Description

Implements the New JavaScript API (which needs to be reviewed as well) in the new study screen and the previewers.

Approach

In the commits

How Has This Been Tested?

Emulator 34 with the api_showcase sample template:

study.screen.webm
previewer.webm

Learning (optional, can help others)

Using CompletableDeferred is a nice hack to send requests from the viewModel to the view

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Copy link
Contributor

Important

Maintainers: This PR contains Strings changes

  1. Sync Translations before merging this PR and wait for the action to complete
  2. Review and merge the auto-generated PR in order to sync all user-submitted translations
  3. Sync Translations again and merge the PR so the huge automated string changes caused by merging this PR are by themselves and easy to review

@BrayanDSO BrayanDSO force-pushed the ts-api branch 2 times, most recently from 46de383 to 375c523 Compare August 28, 2025 14:29
@BrayanDSO BrayanDSO changed the title feat: New JavaScript API feat: implement New JavaScript API in the study screen and previewers Aug 28, 2025
@BrayanDSO BrayanDSO mentioned this pull request Aug 28, 2025
when getting an optional number (Long, Double, Int) of a JSONObject, the default methods always return some number as fallback, such as 0, instead of returning null

so this adds nullable methods like getStringOrNull
Adds a set of Enums to represent the API endpoints

js-api-endpoints is a file generated by the API `export-endpoints.ts` script.
mathjax and jquery come from the backend now
works on the new study screen and the previewers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant