Skip to content

JS code tuning#1839

Merged
UnniKohonen merged 3 commits intomainfrom
issue1829-JS-code-tuning
Nov 27, 2025
Merged

JS code tuning#1839
UnniKohonen merged 3 commits intomainfrom
issue1829-JS-code-tuning

Conversation

@UnniKohonen
Copy link
Contributor

Reasons for creating this PR

There are many warnings originating from Vue and a lot of unnecessary output to console from JS code that could be removed.

Link to relevant issue(s), if any

Description of the changes in this PR

  • Add global config option uiDevMode for loading either production or development version of Vue
  • Remove console.logs from JS code
  • Mount Vue components only if their mount point exists

Known problems or uncertainties in this PR

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
  • The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@UnniKohonen UnniKohonen added this to the 3.0 milestone Nov 27, 2025
@UnniKohonen UnniKohonen self-assigned this Nov 27, 2025
@UnniKohonen UnniKohonen requested a review from osma November 27, 2025 09:24
@UnniKohonen UnniKohonen moved this to Needs review in Skosmos 3.x Backlog Nov 27, 2025
Copy link
Member

@osma osma left a comment

Choose a reason for hiding this comment

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

Looks good. I couldn't get any JS/Vue related messages to appear in the log anymore. Also the uiDevMode setting works as it should. Great work!

A couple of suggestions before merging:

  • add the uiDevMode setting to config.ttl.dist (with the default value false, or commented out)
  • document the uiDevMode setting on the wiki page Configuration for Skosmos 3

@sonarqubecloud
Copy link

@UnniKohonen UnniKohonen merged commit df8ef89 into main Nov 27, 2025
16 checks passed
@UnniKohonen UnniKohonen deleted the issue1829-JS-code-tuning branch November 27, 2025 10:17
@github-project-automation github-project-automation bot moved this from Needs review to Issue/PR closed in Skosmos 3.x Backlog Nov 27, 2025
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.

Vue framework tuning

2 participants