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 extra button bug in report #1820

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

LuizFNJ
Copy link
Collaborator

@LuizFNJ LuizFNJ commented Feb 15, 2025

Description

Basically, these conditionals used to return an empty string, which was ignored when using the Ant Design button. However, after switching to the MUI button, they started rendering because MUI renders everything, including empty arrays, null, or false. I just had to ensure that none of these values were returned. I tested it in the fact-check report and all other sections, such such as verification requests and sources.

Fixes #1812

Fact-check:
Screenshot from 2025-02-15 17-45-08
Screenshot from 2025-02-15 17-45-22
Screenshot from 2025-02-15 17-46-01
Screenshot from 2025-02-15 17-45-55
Screenshot from 2025-02-15 17-55-16
Screenshot from 2025-02-15 17-55-27
Informative news:
Screenshot from 2025-02-15 17-52-16
Screenshot from 2025-02-15 17-52-27
Screenshot from 2025-02-15 17-52-59
Screenshot from 2025-02-15 17-52-48

Type of change

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

Testing

Test the different types of reports available on the platform, specifically in sentences.

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 review from pepermao and removed request for thesocialdev February 15, 2025 17:01
@LuizFNJ
Copy link
Collaborator Author

LuizFNJ commented Feb 15, 2025

This fixes one of the Cypress errors, but it should still fail. I'm working on resolving this in another PR.

@LuizFNJ LuizFNJ requested a review from thesocialdev February 15, 2025 20:03
@thesocialdev thesocialdev merged commit e3ccfcd into stage Feb 19, 2025
6 of 7 checks passed
@thesocialdev thesocialdev deleted the Fix-bug-extra-button-on-the-report branch February 19, 2025 00:07
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: Extra button on report page
2 participants