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

[blockly] Add timer context #2575

Merged
merged 2 commits into from
May 15, 2024
Merged

Conversation

stefan-hoehn
Copy link
Contributor

Adds the possibility to provide any information to the timer's statement block that can be used when this block is eventually executed. This has become possible with the awesome addition in the jsscripting lib that @florian-h05 has provided to the createTimer-function.

Here are some examples how this can be used:

image

pinging @rkoshak as you might be interested to notice that.

Signed-off-by: Stefan Höhn <[email protected]>
@stefan-hoehn stefan-hoehn requested a review from a team as a code owner May 12, 2024 09:03
Copy link

relativeci bot commented May 12, 2024

#1959 Bundle Size — 10.6MiB (~+0.01%).

735dbcb(current) vs 5282f44 main#1955(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  no changes
                 Current
#1959
     Baseline
#1955
No change  Initial JS 1.86MiB 1.86MiB
No change  Initial CSS 607.87KiB 607.87KiB
No change  Cache Invalidation 18.16% 18.16%
No change  Chunks 223 223
No change  Assets 246 246
No change  Modules 2876 2876
No change  Duplicate Modules 149 149
No change  Duplicate Code 1.86% 1.86%
No change  Packages 95 95
No change  Duplicate Packages 2 2
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#1959
     Baseline
#1955
Regression  JS 8.79MiB (+0.01%) 8.79MiB
No change  CSS 890.75KiB 890.75KiB
No change  Fonts 526.1KiB 526.1KiB
No change  Media 295.6KiB 295.6KiB
No change  IMG 140.74KiB 140.74KiB
No change  HTML 1.24KiB 1.24KiB
No change  Other 871B 871B

Bundle analysis reportBranch stefan-hoehn:blockly_timer_usingProject dashboard

Signed-off-by: Florian Hotze <[email protected]>
Copy link
Contributor

@florian-h05 florian-h05 left a comment

Choose a reason for hiding this comment

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

LGTM thanks!
I have to admit the code looks weird if there is no context, but it works and I couldn't find a quick solution.

@florian-h05 florian-h05 changed the title [blockly] add timer context [blockly] Add timer context May 15, 2024
@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI labels May 15, 2024
@florian-h05 florian-h05 added this to the 4.2 milestone May 15, 2024
@florian-h05 florian-h05 merged commit a32fd66 into openhab:main May 15, 2024
8 checks passed
@florian-h05 florian-h05 deleted the blockly_timer_using branch May 15, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants