Skip to content

Commit

Permalink
[StyleGuideFrontend]: Fix misstyping in "Do not throw unhandled excep…
Browse files Browse the repository at this point in the history
…tions" section of mate-frontend.md, add this section to content list. (#51)
  • Loading branch information
alex-shepel authored Apr 11, 2024
1 parent d0a8f51 commit 64acf77
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mate-frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [1.1. Always add NoSSR to AuthUser query on landings](#11-always-add-nossr-to-authuser-query-on-landings)
- [1.2. Rename old components before refactoring](#12-rename-old-components-before-refactoring)
- [1.3. Create new components for A/B tests](#13-create-new-components-for-ab-tests)
- [1.4. Do not throw unhandled exceptions](#14-do-not-throw-unhandled-exceptions)
- [2. CSS](#2-css)
- [2.1. Use `rem-calc` function for "size" and "indent" values instead of hardcoding pixels](#21-use-rem-calc-function-for-size-and-indent-values-instead-of-hardcoding-pixels)
- [2.2. Use `em` units for font-related properties](#22-use-em-units-for-font-related-properties)
Expand Down Expand Up @@ -126,7 +127,7 @@ const getTooltipPosition = (size: number): Position => {
if (hasEnoughSpaceAbove(size)) {
return Position.Top;
}

if (hasEnoughSpaceBelow(size)) {
return Position.Bottom;
}
Expand All @@ -143,7 +144,7 @@ const getTooltipPosition = (size: number): Position => {
if (hasEnoughSpaceBelow(size)) {
return Position.Bottom;
}

logger.error('No space for tooltip');

// Yes, it will not be fit in the viewport.
Expand All @@ -162,7 +163,7 @@ const getMessageJSX = (rawJSX: string): JSX.Element => {
try {
return parseJSX(rawJSX);
} catch (error) {
logger.error(`Failed to fetch chat ${id}`);
logger.error(`Failed to parse JSX`);

return <p>Unrecognized message</p>;
}
Expand Down

0 comments on commit 64acf77

Please sign in to comment.