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

🐛 Inaccurate Validation and UI Issues in Constitution Type Proposal Form #2965

Open
kneerose opened this issue Feb 13, 2025 · 3 comments
Open

Comments

@kneerose
Copy link
Contributor

kneerose commented Feb 13, 2025

Area

Proposal Pillar

Domain

https://govtool.cardanoapi.io/

Which wallet were you using?

No response

Context

While testing the validation and submission process for the constitution type proposal form, I encountered several issues:

1. Save Draft and Continue Button Visibility:

  • The "Save Draft and Continue" button is visible even when the New Constitution URL field is empty, despite it being a required field for this type of proposal.

Image

  • Additionally, clicking "Save Draft" or "Submit Proposal" with an empty New Constitution URL field throws an error on the backend-triggered

Image

2. Hide log for production

  • log is visible for New Constitution URL, Guardrails Script URL, Guardrails Script Hash
    Image

3. URL Format Discrepancy:

  • URLs without https:// or www. are accepted on the frontend but are rejected by the backend.

Image

4. Save Draft and Continue Button Visibility for Guardrails Script:

  • The "Save Draft and Continue" button is visible when the guardrails script data is enabled and the Guardrails Script URL and Guardrails Script hash fields are empty.

Image

Clicking "Save Draft" or "Submit Proposal" with empty guardrails script URL and hash fields throws an error on the backend-triggered

Image

Steps to reproduce

  1. Connect to the wallet
  2. Navigate to proposals page
  3. Open the proposal creation form and select Updates to the Constitution
  4. Follow the scenarios mentioned above.

Actual behavior

  • Validation on the frontend is inaccurate.
  • The UI does not update correctly based on the field values.

Expected behavior

  • Proper validation should be enforced for all required fields.
  • The UI should reflect the validation states accurately.
@kneerose
Copy link
Contributor Author

@nebojsact I have updated the PDF version to 0.6.2 locally and verified whether the above changes were applied. However, points 3 and 4 are still reproducible.

3. URL Format Discrepancy:

  • The frontend accepts URLs without https:// or www., but the backend rejects them.

Image

4. "Save Draft and Continue" Button Visibility for Guardrails Script:

  • The "Save Draft and Continue" button remains visible when the guardrails script data is enabled, even if the Guardrails Script URL and Guardrails Script Hash fields are empty.

Image

CC: @bosko-m

@nebojsact
Copy link

It is strange, but I'll check again, I'm pretty sure that I correct this and URL must have protocol (http s or ipfs), for second, Do you like to make both fields mandatory if the box checked?

@bosko-m
Copy link
Contributor

bosko-m commented Feb 20, 2025

If the checkbox is selected I think both field need to be mandatory @nebojsact .
CC @Ryun1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: In QA
Development

No branches or pull requests

3 participants