Geoweaver icon indicating copy to clipboard operation
Geoweaver copied to clipboard

Code Refactor - HTML Strings in JS Files

Open gokulprathin8 opened this issue 11 months ago • 0 comments

What is this PR about?

Move all HTML strings in JavaScript files to a separate HTML file with a templating library for better management and less confusion.

Some of the files that needs to be refactored are:

  • [ ] gw.workflow.js
  • [ ] gw.ssh.js
  • [ ] gw.host.js
  • [ ] gw.menu.js
  • [ ] gw.process.js
  • [ ] gw.user.js
  • [ ] gw.workspace.js

There might be more files, please add them here if you think the list is incomplete.

What needs to be done?

  • Refactor existing JavaScript code to remove inline HTML strings.
  • Organize HTML content into template files using Thymeleaf, ensuring that dynamic content is properly managed through Thymeleaf's syntax.
  • Test the refactored code extensively to ensure that the UI rendering behaves as expected without regressions.

P.S application.properties already has thyme-leaf configured, we just need to use it.

Expected Outcome

JS and HTML are sperated to a good extent. Making it easy to build features on top of existing codebase easy and efficient.

gokulprathin8 avatar Mar 05 '24 20:03 gokulprathin8