Skip to content
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

Closed
wants to merge 10 commits into from

Conversation

roshan-gh
Copy link
Contributor

No description provided.

@roshan-gh roshan-gh self-assigned this Nov 11, 2023
@roshan-gh roshan-gh linked an issue Nov 11, 2023 that may be closed by this pull request
Copy link

vercel bot commented Nov 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
otelbin ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2023 3:31pm

@@ -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} />}
Copy link
Member

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) => {
Copy link
Member

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.

Copy link
Contributor Author

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>
)}
<>
Copy link
Member

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?

Copy link
Contributor Author

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} />}
<AutoSizer>
{({ height }) => (
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bripkens at initial implementation I used it to fix transition and lag problem. Now removed it and pushed. thanks for notice. @bripkens

Copy link

sonarcloud bot commented Nov 13, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@roshan-gh roshan-gh closed this Nov 13, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2023
@roshan-gh roshan-gh deleted the 191-flexible-validation-error-console-height branch November 13, 2023 17:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flexible validation error console height
2 participants