Skip to content

Fixing the Toggle Section button#1785

Merged
thesocialdev merged 1 commit intostagefrom
Correct-toggle-section
Jan 20, 2025
Merged

Fixing the Toggle Section button#1785
thesocialdev merged 1 commit intostagefrom
Correct-toggle-section

Conversation

@LuizFNJ
Copy link
Collaborator

@LuizFNJ LuizFNJ commented Jan 19, 2025

Description

Basically, I set the initial value of the state to false, and in the useEffect, I performed a check on the size of the speech relative to the window size. If it was larger, it would mean the speech is scrollable and, therefore, the state would be set to true. Now, the default value is false, and it will only be set to true if the speech is scrollable.

Screenshot from 2025-01-19 22-06-37

Fixes #1784

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Testing

Go to the ClaimView page with a speech long enough to require scrolling the screen to read it entirely.

Developer Checklist

General

  • Code is appropriately commented, particularly in hard-to-understand areas
  • Repository documentation has been updated (Readme.md) with additional steps required for a local environment setup.
  • No console.log or related logging is added.
  • No code is repeated/duplicated in violation of DRY. The exception to this is for new (MVP/Prototype) functionality where the abstraction layer may not be clear (comments should be added to explain the violation of DRY in these scenarios).
  • Documented with TSDoc all library and controller new functions

Frontend Changes

  • No new styling is added through CSS files (Unless it's a bugfix/hotfix)
  • All types are added correctly

Backend Changes

  • All endpoints are appropriately secured with Middleware authentication
  • All new endpoints have a interface schema defined

Tests

  • All existing unit and end to end tests pass across all services
  • Unit and end to end tests have been added to ensure backend APIs behave as expected

Merge Request Review Checklist

  • An issue is linked to this PR and these changes meet the requirements outlined in the linked issue(s)
  • High risk and core workflows have been tested and verified in a local environment.
  • Enhancements or opportunities to improve performance, stability, security or code readability have been noted and documented in JIRA issues if not being addressed.
  • Any dependent changes have been merged and published in downstream modules
  • Changes to multiple services can be deployed in parallel and independently. If not, changes should be broken out into separate merge requests and deployed in order.

@LuizFNJ LuizFNJ requested a review from thesocialdev as a code owner January 19, 2025 22:27
@sonarqubecloud
Copy link

@thesocialdev thesocialdev merged commit 8185cd9 into stage Jan 20, 2025
6 of 7 checks passed
@thesocialdev thesocialdev mentioned this pull request Jan 26, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: QA

Development

Successfully merging this pull request may close these issues.

Bug: Toggle Section starts breaking the layout

2 participants