Skip to content

feat(quotes): create quote tagging (@albindavidc)#7685

Open
albindavidc wants to merge 8 commits intomonkeytypegame:masterfrom
albindavidc:feature/tags
Open

feat(quotes): create quote tagging (@albindavidc)#7685
albindavidc wants to merge 8 commits intomonkeytypegame:masterfrom
albindavidc:feature/tags

Conversation

@albindavidc
Copy link

@albindavidc albindavidc commented Mar 19, 2026

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.json has 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

image image

@monkeytypegeorge monkeytypegeorge added frontend User interface or web stuff assets Languages, themes, layouts, etc. packages Changes in local packages labels Mar 19, 2026
@albindavidc albindavidc marked this pull request as ready for review March 19, 2026 20:18
@github-actions github-actions bot added the waiting for review Pull requests that require a review before continuing label Mar 19, 2026
import { LanguageSchema } from "./languages";

// Tags for quotes
export const QUOTE_TAGS = [
Copy link
Member

Choose a reason for hiding this comment

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

we define the schema first and infer the type from it. also check other schemas how to name them

Copy link
Author

Choose a reason for hiding this comment

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

Updated to use quote tag schema.

})
.strict();

export const QuoteDataSchema = QuoteDataBaseSchema.superRefine((data, ctx) => {
Copy link
Member

Choose a reason for hiding this comment

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

please revert and move to the check-assets instead. require all new quotes to have at least one tag

Copy link
Author

Choose a reason for hiding this comment

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

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).

"rootDir": "./src",
"target": "ES6"
"target": "ES6",
"lib": ["ESNext"]
Copy link
Member

Choose a reason for hiding this comment

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

why is this needed?

@github-actions github-actions bot added waiting for update Pull requests or issues that require changes/comments before continuing and removed waiting for review Pull requests that require a review before continuing waiting for update Pull requests or issues that require changes/comments before continuing labels Mar 19, 2026
@albindavidc albindavidc requested a review from fehmer March 19, 2026 21:32
@github-actions github-actions bot added the waiting for review Pull requests that require a review before continuing label Mar 19, 2026
@github-actions
Copy link
Contributor

Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes.

@github-actions github-actions bot added waiting for update Pull requests or issues that require changes/comments before continuing and removed waiting for review Pull requests that require a review before continuing labels Mar 19, 2026
@github-actions github-actions bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assets Languages, themes, layouts, etc. frontend User interface or web stuff packages Changes in local packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quote Tags

3 participants