-
Notifications
You must be signed in to change notification settings - Fork 13
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
191 flexible validation error console height #193
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -179,7 +179,7 @@ export default function Editor({ locked, setLocked }: { locked: boolean; setLock | |||
)} | |||
</div> | |||
{viewMode !== "pipeline" && <ValidationErrorConsole errors={totalValidationErrors} font={firaCode} />} | |||
{viewMode == "both" && <ResizeBar onWidthChange={onWidthChange} />} |
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.
Question: Why was this condition removed? Now the resize bar is shown when the editor is hidden.
@@ -42,58 +51,123 @@ export default function ValidationErrorConsole({ errors, font }: { errors?: IErr | |||
} | |||
}, [errorCount, warningsCount]); | |||
|
|||
const onHeightChange = useCallback((newHeight: number) => { |
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.
Question: Why do we need this useCallback
fn? As far as I can see, we could just use setHeight
within the useEffect
call below.
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.
fixed and pushed. @bripkens
{errors?.jsYamlError?.mark?.line && <ErrorMessage jsYamlError={errors?.jsYamlError} font={font} />} | ||
</div> | ||
)} | ||
<> |
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.
Question: Why do we need this fragment?
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.
fixed and pushed. @bripkens
…alidation-error-console-height
})} | ||
{errors?.jsYamlError?.mark?.line && <ErrorMessage jsYamlError={errors?.jsYamlError} font={font} />} | ||
<AutoSizer> | ||
{({ height }) => ( |
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.
Question: Why do we need AutoSizer
here?
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.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
No description provided.