fix: Unexpected Behavior when Toggling Italics in Text Editor and improve clarity of formatting status#1506
Merged
mattinannt merged 3 commits intoformbricks:mainfrom Oct 30, 2023
moheyt:toggling-italics-in-text-editor
Merged
fix: Unexpected Behavior when Toggling Italics in Text Editor and improve clarity of formatting status#1506mattinannt merged 3 commits intoformbricks:mainfrom moheyt:toggling-italics-in-text-editor
mattinannt merged 3 commits intoformbricks:mainfrom
moheyt:toggling-italics-in-text-editor
Conversation
|
@moheyt is attempting to deploy a commit to the formbricks Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Thank you for following the naming conventions for pull request titles! 🙏 |
Contributor
|
The changes in this PR look good overall. However, I have a few suggestions to improve the code:
function getButtonClass(isActive: boolean): string {
return isActive ? "bg-subtle active-button" : "inactive-button";
}Then, you can use this function in your code like this: className={getButtonClass(isBold)}
/* Style for active buttons */
.active-button {
color: #000000;
}
/* Style for inactive buttons */
.inactive-button {
color: #777;
}
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
Contributor
Author
|
thanks @Dhruwang can you please add hacktoberfest label into this? |
Contributor
Author
|
@Dhruwang thanks bro means alot. |
kevinkong91
added a commit
to kevinkong91/formbricks
that referenced
this pull request
Oct 30, 2023
* main: (28 commits) chore: Add Table of Contents to README (formbricks#1427) fix: account deletion failing issue (formbricks#1509) fix: remove welcome card from email preview (formbricks#1495) fix(bug): default role implemented (formbricks#1524) fix: changing description of Code Action (formbricks#1522) refactor: Migrate activity service (formbricks#1471) fix: Error in Docs navigation formbricks#1518 (formbricks#1521) feat: dynamic title and description (formbricks#1459) fix: Spelling Errors (formbricks#1517) fix: added scrollbar whenever overflowed in the settings/profile page (formbricks#1498) fix: long url not getting reset after closing modal (formbricks#1502) fix: Unexpected Behavior when Toggling Italics in Text Editor and improve clarity of formatting status (formbricks#1506) fix: zod pin validation failing (formbricks#1507) fix: Error message on Login not shown (formbricks#1508) fix: downgrade nextjs to fix error with react email (formbricks#1516) chore: downgrade next version in formbricks-com (formbricks#1513) feat: picture selection question (formbricks#1388) feat: formtribe leaderboard update as per today (formbricks#1505) fix: Added if statement for preventing use of reserved word in question ID (formbricks#1435) fix: Disabling Welcome Card leads buggy preview (formbricks#1320) ...
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.
…editor
What does this PR do?
This pull request addresses the reported issue with the unexpected behavior when toggling italics in the text editor. Additionally, it includes an enhancement to improve the clarity of formatting status for the users.
Changes Made:
1. Bug Fix: Unexpected Behavior When Toggling Italics:
Modified the code handling the "italic" button's click event to prevent it from unintentionally triggering bold formatting when deactivating italics. The click event now toggles the "italic" formatting without conditional checks for bold.
2. Enhancement: Clarity of Formatting Status:
Introduced a visual indicator for the "bold" formatting. When "bold" formatting is active, the "bold" button's appearance changes to provide a clear visual cue to the user. When "bold" formatting is not active, the button reverts to its default appearance.
Benefits:
Fixes #1504
Recording.2023-10-30.010955.mp4
Type of change
How should this be tested?
Checklist
Required
pnpm buildconsole.logsgit pull origin mainAppreciated