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

Feat/forms button improvements #822

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

m-o-n-i-s-h
Copy link
Contributor

@m-o-n-i-s-h m-o-n-i-s-h commented Mar 7, 2024

Disable forms button until all the necessary parameters are provided.

Description

This pull request introduces a modification to the forms functionality, specifically targeting the submit button. The primary change ensures that the submit button remains disabled until all the necessary parameters are provided by the user. This enhancement is essential for improving the user experience and preventing incomplete form submissions.

Changes Made

  • Added logic to disable the submit button by default.
  • Implemented parameter validation to enable the submit button only when all required parameters are provided.

Screenshots

Actual Behaviour:

actual behaviour of forms button

New Behaviour:

disableFormButton

NOTICE

The program was tested solely for our own use cases, which might differ from yours.

Author Info: Monish monish.nandakumaran@mercedes-benz.com on behalf of Mercedes-Benz Research and Development India

https://github.com/mercedes-benz/mercedes-benz-foss/blob/master/PROVIDER_INFORMATION.md

Sample JSON:

movieDisableFormButton.json

Signed off: Monish monish.nandakumaran@mercedes-benz.com

Copy link

sonarcloud bot commented Mar 7, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
7.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 11.76471% with 15 lines in your changes missing coverage. Please review.

Project coverage is 39.49%. Comparing base (d165cce) to head (0432950).
Report is 32 commits behind head on develop.

Files Patch % Lines
src/utils/parameterUtils.ts 18.18% 9 Missing ⚠️
src/extensions/forms/chart/NeoForm.tsx 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #822      +/-   ##
===========================================
- Coverage    39.55%   39.49%   -0.07%     
===========================================
  Files          216      217       +1     
  Lines         9205     9225      +20     
  Branches      2732     2738       +6     
===========================================
+ Hits          3641     3643       +2     
- Misses        5503     5521      +18     
  Partials        61       61              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alfredorubin96
Copy link
Collaborator

Can you please check the code duplication and if you can add testing for this new behaviour in Cypress? Thank you so much for contributing to the project!

Copy link

sonarcloud bot commented May 6, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
7.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

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.

None yet

2 participants