Skip to content

Cleanup Code for compilation dialog #470

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

Merged
merged 2 commits into from
May 13, 2025
Merged

Conversation

mariopesch
Copy link
Member

This pull request introduces several enhancements and refactorings across multiple files, focusing on improving maintainability, localization, and consistency in the codebase. The key changes include the addition of new theme colors, localization updates, the removal of Redux dependencies for language settings, and the renaming of files for consistency. Below is a categorized summary of the most important changes:

Theme and Styling Updates:

  • Added senseboxColors (blue and green) to the theme configuration in src/App.jsx for consistent color usage across components.
  • Updated components like CodeCompilationIcon, DownloadAnimation, and DragDropIcon to use theme.palette.senseboxColors instead of hardcoded senseboxColors. [1] [2] [3]

Localization Enhancements:

  • Added new localized strings for German (ui.js) and English (ui.js) to support compile animations and drag-and-drop features. [1] [2]
  • Replaced hardcoded text in components like DownloadAnimation and DragDropIcon with localized strings from Blockly.Msg. [1] [2]

Code Simplification and Refactoring:

  • Removed Redux dependencies for language settings in DownloadAnimation and DragDropIcon, simplifying the components. [1] [2]
  • Eliminated unused props and Redux mappings in CompilationDialog, making it a standalone component. [1] [2]

File Renaming for Consistency:

  • Renamed files like code-compilation-icon.jsx to CodeCompilationIcon.jsx and compilation-dialog.jsx to CompilationDialog.jsx to align with PascalCase naming conventions. [1] [2]

Miscellaneous:

  • Fixed minor formatting issues, such as adding missing semicolons in src/App.jsx.

@mariopesch
Copy link
Member Author

@Thiemann96 @georgi-s I've cleaned up the Compiler Dialog Code to follow the existing structure and using the blockly i18n language keys

Copy link

Tests

Test Name Status Flaky Duration
Blockly Editor Page Tests [Blockly] visits the editor page 1.3s
Blockly Editor Page Tests [Blockly] visits the tutorial page 168ms
Blockly Editor Page Tests [Blockly] visits the gallery page 126ms
Blockly Editor Page Tests [Blockly] visits the faq page 123ms
Blockly Editor Page Tests [Blockly] visits the settings page 116ms
Blockly Editor Page Tests [Blockly] visits the login page 120ms
Blockly Editor Page Tests [Blockly] navigates to tutorial and back 9.6s
Blockly Editor Page Tests [Blockly] selects senseBox ESP 619ms
Blockly Editor Page Tests [Blockly] selects senseBox MCU 621ms
Blockly Editor Page Tests [Blockly] selects senseBox Mini 616ms
Blockly Editor Page Tests [Blockly] compiles code 18.1s
Code Editor Page Tests [CodeEditor] visits the code editor page 1.5s
Code Editor Page Tests [CodeEditor] selects senseBox ESP 459ms
Code Editor Page Tests [CodeEditor] compiles code 600ms
Code Editor Page Tests [CodeEditor] opens reset dialog 601ms
Code Editor Page Tests [CodeEditor] fetches libraries 2.4s

Github Test Reporter by CTRF 💚

Copy link

Tests

Test Name Status Flaky Duration
Blockly Editor Page Tests [Blockly] visits the editor page 1.2s
Blockly Editor Page Tests [Blockly] visits the tutorial page 169ms
Blockly Editor Page Tests [Blockly] visits the gallery page 131ms
Blockly Editor Page Tests [Blockly] visits the faq page 125ms
Blockly Editor Page Tests [Blockly] visits the settings page 125ms
Blockly Editor Page Tests [Blockly] visits the login page 117ms
Blockly Editor Page Tests [Blockly] navigates to tutorial and back 10.6s
Blockly Editor Page Tests [Blockly] selects senseBox ESP 771ms
Blockly Editor Page Tests [Blockly] selects senseBox MCU 801ms
Blockly Editor Page Tests [Blockly] selects senseBox Mini 723ms
Blockly Editor Page Tests [Blockly] compiles code 18.6s
Code Editor Page Tests [CodeEditor] visits the code editor page 1.3s
Code Editor Page Tests [CodeEditor] selects senseBox ESP 451ms
Code Editor Page Tests [CodeEditor] compiles code 620ms
Code Editor Page Tests [CodeEditor] opens reset dialog 634ms
Code Editor Page Tests [CodeEditor] fetches libraries 2.6s

Github Test Reporter by CTRF 💚

Copy link
Contributor

@Thiemann96 Thiemann96 left a comment

Choose a reason for hiding this comment

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

lgtm

@mariopesch mariopesch merged commit 7c321f9 into development May 13, 2025
5 checks passed
@mariopesch mariopesch deleted the refactor/Compile-Dialog branch May 13, 2025 15:16
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.

2 participants