-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[FL-3893] JS modules #3841
Merged
Merged
[FL-3893] JS modules #3841
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PVS-Studio report for commit |
Compiled f7 firmware for commit |
This was referenced Aug 28, 2024
skotopes
requested changes
Oct 10, 2024
applications/system/js_app/modules/js_event_loop/js_event_loop.h
Outdated
Show resolved
Hide resolved
un draft when ready |
…/flipperdevices/flipperzero-firmware into portasynthinca3/3893-js-backport
skotopes
approved these changes
Oct 14, 2024
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's new
event_loop
,gpio
,gui
andstorage
gui
submodules:gui/loading
,gui/submenu
,gui/empty_screen
,gui/text_input
,gui/text_box
,gui/dialog
storage
)submenu
(superseded bygui/submenu
),textbox
(superseded bygui/text_box
),dialog
(superseded bygui/dialog
)TextInputModel
field:minimum_length
text_input_set_minimum_length
,furi_event_loop_is_subscribed
furi_event_loop_maybe_unsubscribe
Verification
gpio
,gui
):gpio
andgui
JS example scriptsRemarks
Performance
The GUI example is quite heavy, requiring about 32 KiB of heap space with all the GUI modules loaded. The script starts up slowly compared to other scripts (~500ms), but runs just fine.
Readability
The later the date of creation of a module, the more its implementation looks like it's written in a DSL. Without all these macros the code would just become 80% noise, and thus a huge pain in the butt to write and maintain.
Checklist (For Reviewer)