GCTC-NTGC / gc-digital-talent

GC Digital Talent is the new recruitment platform for digital and tech jobs in the Government of Canada. // Talents numériques du GC est la nouvelle plateforme de recrutement pour les emplois numériques et technologiques au gouvernement du Canada.
https://talent.canada.ca
GNU Affero General Public License v3.0
22 stars 9 forks source link

✨ Fields should be required if specific location is selected #4480

Open Jerryescandon opened 2 years ago

Jerryescandon commented 2 years ago

🕵️ Details

On the pool edit page (/admin/pools/:pool-id/edit), the fields that appear after Location (Specific Location (English), Specific Location (French)) should be made required if the Specific location (Specify below) radio is selected.

📸 Screenshot

Screen Shot 2024-02-29 at 17 22 29

✅ Acceptance Criteria

A set of assumptions which, when tested, verify that the bug was addressed.

petertgiles commented 2 years ago

This one's a bit sticky. All the fields on the edit pool page are marked optional because the user is working on a draft. They need to be able to edit other fields (like language requirement or publishing group) without being required to fill all the other fields before updating the draft.

I agree that this looks weird but I think it's part of a bigger conversation about the design of this page. Related: #3974.

Jerryescandon commented 2 years ago

We can probably icebox this for now. I have a bigger issue with "Drafts" as a whole, I think we should create a more robust drafting system, but it might be a bigger issue for a later epic.

mnigh commented 1 year ago

Related #5626.

mnigh commented 11 months ago

@esizer could this be done similar to https://github.com/GCTC-NTGC/gc-digital-talent/issues/5535#issuecomment-1854192803?

esizer commented 9 months ago

@esizer could this be done similar to #5535 (comment)?

Yup! I'm pretty sure react-hook-form only validates visible fields 👍

vd1992 commented 7 months ago

Appears resolved with the pool editor redesign?

image

mnigh commented 7 months ago

Appears resolved with the pool editor redesign?

No, these fields are still not marked as required.