-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Feature - Custom color for components #251
Feature - Custom color for components #251
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis update introduces the ability to customize font and background colors for quote templates. Users can now select their preferred colors from a predefined list, which are then passed as props to the Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 2
Files selected for processing (5)
- frontend/src/components/Pages/Home/index.js (4 hunks)
- frontend/src/components/organisms/TemplateCard/index.js (2 hunks)
- frontend/src/config/cardTemplate/index.js (1 hunks)
- frontend/src/util/layouts/index.js (14 hunks)
- src/api/controllers/quotesController.js (1 hunks)
Files skipped from review due to trivial changes (2)
- frontend/src/config/cardTemplate/index.js
- frontend/src/util/layouts/index.js
Additional comments (Suppressed): 6
frontend/src/components/organisms/TemplateCard/index.js (1)
- 64-64: Ensure that the backend endpoint
/quote
correctly handles the new query parametersfontColor
andbgColor
. Also, verify that these parameters are properly URL-encoded to prevent any issues with special characters.frontend/src/components/Pages/Home/index.js (5)
4-4: The import statement has been updated to include
colorValues
from thecardTemplate
configuration. This array should contain valid color values for font and background customization.14-15: Two new state variables
fontColor
andbgColor
have been added with initial values of "white" and "black" respectively. Ensure that these default colors are appropriate for your application's design and user experience.82-107: Two new
Autocomplete
components have been added for selecting the font color and background color. The selected colors are stored in thefontColor
andbgColor
state variables. Make sure that thecolorValues
array provides a good range of color options for users.113-113: The
TemplateCard
component now receivesfontColor
andbgColor
as props. Ensure that these props are used correctly within theTemplateCard
component to update the font and background colors.122-122: The
TemplateCard
component for other layouts also receivesfontColor
andbgColor
as props. This ensures consistency in color customization across different layouts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR LGTM, can you please raise a PR to include this as part of documentation?
Greetings 👋, this time I wanted to add a feature, and this one is based on Issue #237. At interface level there are two new fields for the font color and background color selection. It were required changes both on frontend and backend, but they are synced on the template now.
BEFORE:
AFTER:
Summary by CodeRabbit
New Feature:
TemplateCard
component to accept and apply custom color selections.quoteController
function in the API to handle new color parameters, enabling dynamic color changes in quotes.Refactor:
layouts/index.js
to accommodate new color customization features.