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

FS-4861 - Show or hide Welsh-specific fields depending on Welsh available toggle #147

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wjrm500
Copy link
Contributor

@wjrm500 wjrm500 commented Dec 12, 2024

Ticket

Show or hide Welsh-specific fields depending on Welsh available toggle

Description

FAB users are asked on the “Create a Fund” page to specify whether Welsh is available for the fund. However, regardless of what they select, we show fields that are only relevant if the answer is yes (Welsh is available), e.g., “Description (Welsh)”. This clutters the interface unnecessarily.

To resolve this, we should only show Welsh-specific fields if Welsh is selected as available. We should do this for fields on both the “Create a Fund” and “Create a Round” pages. We should move the Welsh available toggle above all Welsh-specific fields so that the user flow makes sense.

Testing instructions

Pre-requisites...

  • For devs - checkout this branch, restart FAB Docker container locally
  • For others - ensure this branch is deployed to the dev environment (go here, click "Run workflow" in top right corner, select this branch for "Use workflow from", select "dev" for "Which AWS account to use", click "Run workflow", await job completion)

The below instructions are relevant for the dev environment. If you are testing locally, you will need to change the URLs.

Test 1 - Welsh available toggle affects visibility of fields on "Create a Fund" page

  1. Go to the Create a Fund page
  2. Toggle "Welsh available" from "No" to "Yes"
  3. Observe the fields "Name (Welsh)", "Title (Welsh)" and "Description (Welsh)" materialising
  4. Toggle "Welsh available" back to "No"
  5. Observe those same fields disappearing

Test 2 - Welsh available toggle deletes data from hidden fields

  1. Go to the Create a Fund page
  2. Toggle "Welsh available" from "No" to "Yes"
  3. Observe the fields "Name (Welsh)", "Title (Welsh)" and "Description (Welsh)" materialising
  4. Enter some text in the field "Name (Welsh)"
  5. Toggle "Welsh available" back to "No", and then back again to "Yes"
  6. Observe that the text you entered in the field "Name (Welsh)" has disappeared

Test 3 - Welsh available for a fund affects visibility of fields on "Create a Round" page

  1. Create a fund with Welsh available set to "Yes"
  2. Create another fund with Welsh available set to "No"
  3. Go to the Create a Round page
  4. Select the fund with Welsh available from the "Fund" dropdown at the top
  5. Observe fields including "Title (Welsh)" - just below "Title (English)" - materialising
  6. Select the fund with Welsh not available from the "Fund" dropdown
  7. Observe those same fields disappearing

@wjrm500 wjrm500 force-pushed the FS-4861_welsh-available-hides-fields branch from 7410ff9 to 659de12 Compare December 12, 2024 17:53
…' in-keeping with other English / Welsh fields
Copy link

sonarcloud bot commented Dec 12, 2024

@wjrm500 wjrm500 marked this pull request as ready for review December 12, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant