Skip to content

Upgrade to DynamiaTools v5.4.12#17

Merged
marioserrano09 merged 7 commits intomasterfrom
5.4.x
Dec 28, 2025
Merged

Upgrade to DynamiaTools v5.4.12#17
marioserrano09 merged 7 commits intomasterfrom
5.4.x

Conversation

@marioserrano09
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 28, 2025 23:28
@marioserrano09 marioserrano09 merged commit ddd8d3d into master Dec 28, 2025
6 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades the DynamiaTools framework from version 5.4.1 to 5.4.12, introducing dark mode functionality and updating dependencies.

  • Updates DynamiaTools dependency and artifact version from 5.4.1 to 5.4.12
  • Adds dark mode toggle feature with new JavaScript implementation and CSS styling
  • Updates Bootstrap framework and adds required JavaScript dependencies (popper.min.js, bootstrap.min.js)

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
sources/pom.xml Updates project version and DynamiaTools dependency to 5.4.12
sources/src/main/resources/web/templates/dynamical/views/index.zul Updates CSS/JS resource version tags and adds new JavaScript dependencies for dark mode
sources/src/main/resources/zk/dynamical/index-main.zul Adds dark mode toggle UI component and aria-expanded attribute for accessibility
sources/src/main/resources/web/templates/dynamical/static/js/dark-mode.js Implements dark mode toggle functionality and device detection
sources/src/main/resources/web/templates/dynamical/static/js/bootstrap.min.js Adds Bootstrap v5.3.7 minified library
sources/src/main/resources/web/templates/dynamical/static/css/dynamical.css Adds dark mode CSS rules, fixes modal border radius calculation, and styles dark mode toggle
sources/src/main/java/tools/dynamia/themes/dynamical/viewers/DynamicalCrudView.java Removes unused imports (IconSize and ZKUtil)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

localStorage.setItem("theme", theme);
}

// Inicializar: leer localStorage o usar default "light"
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

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

Spanish comment in JavaScript code. Consider using English for consistency with the rest of the codebase.

Copilot uses AI. Check for mistakes.
const savedTheme = localStorage.getItem("theme") || "light";
applyTheme(savedTheme);

// Toggle al dar clic
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

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

Spanish comment in JavaScript code. Consider using English for consistency with the rest of the codebase.

Copilot uses AI. Check for mistakes.
Comment on lines +21 to +25
// Toggle al dar clic
toggleBtn.addEventListener("click", () => {
const newTheme = body.classList.contains("dark-mode") ? "light" : "dark";
applyTheme(newTheme);
});
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

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

The toggleBtn element existence should be validated before adding an event listener. If the selector doesn't match any element, this will throw an error when trying to call addEventListener on null.

Suggested change
// Toggle al dar clic
toggleBtn.addEventListener("click", () => {
const newTheme = body.classList.contains("dark-mode") ? "light" : "dark";
applyTheme(newTheme);
});
// Toggle al dar clic (solo si el elemento existe)
if (toggleBtn) {
toggleBtn.addEventListener("click", () => {
const newTheme = body.classList.contains("dark-mode") ? "light" : "dark";
applyTheme(newTheme);
});
}

Copilot uses AI. Check for mistakes.
Comment on lines +733 to +737
.dark-mode-switch .light-icon{
display: none;
}

.dark-mode .dark-mode-switch .light-icon{
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

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

There's a missing space after the colon in the CSS selector. This should be .dark-mode-switch .light-icon { (with a space before the opening brace).

Suggested change
.dark-mode-switch .light-icon{
display: none;
}
.dark-mode .dark-mode-switch .light-icon{
.dark-mode-switch .light-icon {
display: none;
}
.dark-mode .dark-mode-switch .light-icon {

Copilot uses AI. Check for mistakes.
const body = document.body;
const toggleBtn = document.querySelector(toggleSelector);

// Función para aplicar modo según preferencia
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

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

Spanish comment in JavaScript code. Consider using English for consistency with the rest of the codebase.

Copilot uses AI. Check for mistakes.
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.

1 participant