Add easterEggUtil with generateHappy() function (fix color CSS bug)#75
Draft
Add easterEggUtil with generateHappy() function (fix color CSS bug)#75
Conversation
Member
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Co-authored-by: klmhyeonwoo <19422885+klmhyeonwoo@users.noreply.github.com>
Member
export function generateHappy(message?: string) {
const defaultMessages = [
"Keep going — you're doing great! 💪",
"Small steps lead to big changes. 🌱",
"Today is a good day to smile. 😊",
"You're closer than you think. 🌈",
"Stay curious, stay kind. ✨",
"Progress, not perfection. 🚀",
"You make the code better. 💻❤️",
"Breathe. You’re doing your best. 🌤️",
"Trust the process, enjoy the journey. 🛤️",
"Every bug fixed is a victory. 🐞🏆",
];
const text =
message ??
defaultMessages[Math.floor(Math.random() * defaultMessages.length)];
const timestamp = new Date().toLocaleTimeString();
console.log(
`%c[${timestamp}] %c${text}`,
'color: #ff69b4; font-weight: bold;',
'color: #333; font-size: 14px;'
);
return text;
}Good! |
Copilot
AI
changed the title
[WIP] Fix generateHappy function in easterEggUtil
Add easterEggUtil with generateHappy() function (fix color CSS bug)
Nov 14, 2025
klmhyeonwoo
reviewed
Nov 14, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new generateHappy() utility function to display encouraging messages to developers in the console and fixes a CSS color bug where team-layer/kr-corekit#333 (likely from a GitHub reference copy/paste) is corrected to the proper hex color value #333.
Key changes:
- New
easterEggUtil/generateHappy()function with 10 default motivational messages and optional custom message support - Fixed malformed CSS color value from GitHub reference to proper hex color
#333 - Added complete test coverage with 6 test cases
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package/easterEggUtil/generateHappy/index.ts | Implements the main function with styled console output and corrected CSS color value |
| package/easterEggUtil/generateHappy/index.test.ts | Comprehensive test suite covering default/custom messages, console output, and styling |
| package/easterEggUtil/index.ts | Module export for the new utility |
| package/index.ts | Added easterEggUtil to main package exports |
| package.json | Added easterEggUtil to package exports configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
@copilot Please Add README.md for genereateHappy() util function |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: klmhyeonwoo <19422885+klmhyeonwoo@users.noreply.github.com>
Contributor
Author
Added comprehensive README documentation for generateHappy():
Commit: 4506372 |
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.
Implements
generateHappy()function to display encouraging developer messages in the console. The issue code contained a malformed CSS color valueteam-layer/kr-corekit#333(likely from a GitHub reference copy/paste) that should be#333.Changes
New utility:
package/easterEggUtil/generateHappy/team-layer/kr-corekit#333→#333Exports: Added easterEggUtil to package exports (package.json, package/index.ts)
Tests: 6 test cases covering default/custom messages, console output formatting, and styling parameters
Documentation: Comprehensive README documentation
package/easterEggUtil/generateHappy/with usage examples, API details, and feature descriptionsUsage
Console output:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.