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

chore: Add styles for table and search functionality #42

Merged
merged 1 commit into from
May 10, 2024

Conversation

tsviz
Copy link
Contributor

@tsviz tsviz commented May 10, 2024

This pull request primarily focuses on enhancing the code structure and improving the functionality of the web application. The changes can be categorized into two main themes: JavaScript enhancements and HTML adjustments.

JavaScript code extraction:

  • src/main/resources/static/js/styles.js: The inline styles from index.html have been moved to a new JavaScript file. This not only improves the readability of the HTML file but also allows for better management and reuse of the styles. [1] [2]
  • src/main/resources/static/js/upload_csv.js: The JavaScript code handling CSV file uploads, which was previously embedded in index.html, has been moved to a separate JS file. This improves the modularity of the code and makes it easier to maintain. [1] [2]

Search feature enhancement:

  • src/main/resources/static/js/search.js: A new JavaScript file was added to handle the search feature. It prevents the default form submission, sends an asynchronous request to the server, and updates the search results dynamically on the page. This improves the user experience by not requiring a page reload for each search.
  • src/main/resources/templates/index.html: The HTML form for the search feature has been updated to work with the new JavaScript code. The results are now displayed in a new searchResults div, which gets updated dynamically.

@tsviz tsviz merged commit 8a8cd40 into main May 10, 2024
13 checks passed
@tsviz tsviz deleted the search_improvements branch May 10, 2024 02:18
@tsviz tsviz linked an issue Jul 24, 2024 that may be closed by this pull request
@tsviz tsviz removed a link to an issue Jul 24, 2024
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