Add Display and Download Typing Game Data Functionalities #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New Features:
Display Typing Game Data: Users can now view their typing game statistics directly on the website. This feature enhances user experience by providing immediate access to game performance metrics without the need for downloading.
Download Typing Game Data: Alongside the display functionality, users still have the option to download their game data in CSV format. This feature caters to those who prefer to store or analyze their performance data offline.
Implementation Details:
Data Storage and Retrieval: Game data (mode, level, WPM, words, accuracy) is stored in the browser's local storage, allowing persistence across multiple games.
Display Functionality: A new button titled "Show Data" has been added. When clicked, it displays the user's game data in a CSV-like format within a designated area on the webpage. This data includes mode, level, words per minute (WPM), total words typed, and accuracy.
Download Functionality: Another button titled "Download Data" enables users to download their cumulative game data as a
.csv
file. This is particularly useful for users who wish to maintain a record of their progress or conduct a more detailed analysis of their performance.User Interface: Both buttons are placed in a fixed position on the page to avoid layout shifts and are styled to match the existing aesthetic of the Colemak Club website. The display area for the CSV data is also styled for clear readability.
Testing:
Request for Review:
I kindly request a review of these new features. Feedback and suggestions for improvement are most welcome.