ubuntu.com icon indicating copy to clipboard operation
ubuntu.com copied to clipboard

Apply design for static contact form

Open britneywwc opened this issue 1 year ago • 1 comments

Done

  • Update design for static form on /kernel/real-time/contact-us
  • Design: https://www.figma.com/design/mxftgCWDJ6s3LrlaedREkP/24.10-Static-forms?node-id=1-3&t=wJYqljxJE6kXFa8h-0

QA

  • Go to demo
  • Check that the demo adheres to the design

To-do

  • Fix form submission error and marketo issues
  • Update design for other static forms

Issue / Card

Fixes #

Screenshots

[If relevant, please include a screenshot.]

Help

QA steps - Commit guidelines

britneywwc avatar Jul 05 '24 10:07 britneywwc

@petesfrench @juanruitina This is ready for review

britneywwc avatar Jul 10 '24 10:07 britneywwc

@britneywwc SCSS and Prettier CI actions are failing, can you check please?

akbarkz avatar Jul 10 '24 11:07 akbarkz

It seems fieldset only picks up legend as the label if it's immediately nested under it, so we will need to be a bit more explicit. aria-labelledby should do the trick (code is just a suggestion, feel free to tweak as you wish)

Current implementation (see accessibility inspector on the right): Screenshot 2024-07-10 at 14 04 32

With aria-labelledby (inspector does pick label): Screenshot 2024-07-10 at 14 06 14

Unrelated: I think you should us p-section--hero in the first section so the spacing is right.

juanruitina avatar Jul 10 '24 12:07 juanruitina

@juanruitina This feels weird being able to select both, the versions you use and, that you don't use any. I also wonder if this could lead to funneling problems for the marketing team image

petesfrench avatar Jul 10 '24 13:07 petesfrench

I would be OK with disabling "I don't use Ubuntu today" and "I don't know" if any of the fields above them is checked. Similarly, disabling all other fields when either "I don't use Ubuntu today" and "I don't know" are checked.

juanruitina avatar Jul 10 '24 14:07 juanruitina

@britneywwc I had a little play around and was able to implement the pre-existing script static-forms.js, this looks for the .js-formfield class name and dynamically adds the heading and user's input to the 'Comments_for_lead' fieldset. I think this is a better approach, as it means we wont have to hard code any forms.

You can see what I did here: https://github.com/canonical/ubuntu.com/pull/14061/files# I have left comments to indicate the changes I made. This is super rough, so if you aren't sure about anything please reach out. Hope this helps.

petesfrench avatar Jul 10 '24 15:07 petesfrench

Right now it is possible to select both "I don't use Ubuntu" and "I don't know", I think the other option should also be disabled together with the releases above. Feel free to change to UX+1 once you fix this. Thank you!

juanruitina avatar Jul 11 '24 12:07 juanruitina