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

Fix: Analysis Text Output Preview #1560

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

deepsidhu85
Copy link
Contributor

@deepsidhu85 deepsidhu85 commented Dec 16, 2024

Description of changes

What did you change in this pull request? Provide a description of files changed, user interactions changed, etc. Include how to test your changes.

This PR fixes a bug with analysis text preview not being able to set the loaded file size using document.getElementId due to changes with react useeffect hook in react 18. Updated to set a state variable instead and that is used by the UI to display the loaded file size.

Before fix:

image

image

After fix:

image

image

Related issue

Link to the GitHub issue this pull request addresses using the #issuenum format. If it completes an issue, use Fixes #issuenum to automatically close the issue.

Checklist

Things for the developer to confirm they've done before the PR should be accepted:

* [ ] CHANGELOG.md (and UPGRADING.md if necessary) updated with information for new change.
* [ ] Tests added (or description of how to test) for any new features.
* [ ] User documentation updated for UI or technical changes.

… file size using document.getElementId due to changes with react useeffect. Updated to set a state variable instead
@deepsidhu85 deepsidhu85 self-assigned this Dec 16, 2024
@@ -108,7 +105,7 @@ export default function AnalysisTextPreview({ output }) {
</TextOutputWrapper>
<div>
<Space direction={"horizontal"}>
<span id={`${output.filename}-preview-status`}></span>
<span id={`${output.filename}-preview-status`}>{fileSizePreview}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: This is a great way to handle it, not really sure why it wasn't set up like this to begin with.

Copy link
Contributor

@joshsadam joshsadam left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for the update

@joshsadam joshsadam merged commit fbdd728 into development Dec 17, 2024
15 checks passed
@joshsadam joshsadam deleted the fix-analysis-text-preview branch December 17, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants