feat(quotes): create quote tagging (@albindavidc)#7685
Open
albindavidc wants to merge 8 commits intomonkeytypegame:masterfrom
Open
feat(quotes): create quote tagging (@albindavidc)#7685albindavidc wants to merge 8 commits intomonkeytypegame:masterfrom
albindavidc wants to merge 8 commits intomonkeytypegame:masterfrom
Conversation
fehmer
requested changes
Mar 19, 2026
| import { LanguageSchema } from "./languages"; | ||
|
|
||
| // Tags for quotes | ||
| export const QUOTE_TAGS = [ |
Member
There was a problem hiding this comment.
we define the schema first and infer the type from it. also check other schemas how to name them
Author
There was a problem hiding this comment.
Updated to use quote tag schema.
packages/schemas/src/quotes.ts
Outdated
| }) | ||
| .strict(); | ||
|
|
||
| export const QuoteDataSchema = QuoteDataBaseSchema.superRefine((data, ctx) => { |
Member
There was a problem hiding this comment.
please revert and move to the check-assets instead. require all new quotes to have at least one tag
Author
There was a problem hiding this comment.
I thought of adding tags for English as an initial step, and we could extend support for other languages in future iterations. But I have removed it now. ESNest has also been removed (it was meant to give access to .includes method).
packages/schemas/tsconfig.json
Outdated
| "rootDir": "./src", | ||
| "target": "ES6" | ||
| "target": "ES6", | ||
| "lib": ["ESNext"] |
Contributor
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hi MonkeyType team! 👋✨
Resolves #7663
I'm a long-time user of MonkeyType and I've always loved how the different modes each bring a distinct feel to the typing experience ⌨️
Today, I'm contributing an update that I believe will add significant value to the platform: Quote Tagging 🏷️
To improve the quote filtering experience and prepare for future categorization features, I've conducted a comprehensive tagging pass on the entire English quote library 📚
🔹 Tagging: Every quote in
english.jsonhas been tagged with appropriate labels (fiction, poetry, philosophy, political, inspirational, wisdom, mindset, humorous) using source-based and keyword-based heuristics 🧠🔹 Schema Validation: Ensured all quotes meet the requirement of having at least one tag, resolving potential validation issues in the quotes schema ✅
🔹 UI Integration: Updated the quote tag filter UI to better reflect the new categorized library 🎨
I've tried to follow MonkeyType's existing patterns as closely as possible throughout — the schema structure, contract style, config metadata approach, DAL pattern, and UI conventions all mirror what's already in the codebase 🧩
I'm happy to make any changes the team feels are needed 🤝
Thank you for taking the time to review this — MonkeyType is a genuinely great project and I hope this is a worthwhile addition 🙏💙
Files changed: 📂
frontend/static/quotes/english.json— tagged all 1000+ quotes 🏷️frontend/src/ts/test/test-config.ts— updated tag filter UI, active button states, and animations 🎛️frontend/src/ts/test/words-generator.ts— integrated tagged words logic ⚙️frontend/src/ts/test/test-logic.ts— logic for test generation and restart 🔁frontend/src/ts/test/result.ts— results processing updates 📊frontend/src/ts/event-handlers/test.ts— tag filter button handlers 🖱️frontend/src/html/pages/test.html— tag filter selectors 🧱frontend/src/styles/test.scss— styles for.quoteTag🎨###Reference Images