-
Notifications
You must be signed in to change notification settings - Fork 83
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
Migrate '/download/iot/intel-iot#get-in-touch' form to c.com #1489
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## partners-intel-feature-branch #1489 +/- ##
================================================================
Coverage ? 72.30%
================================================================
Files ? 17
Lines ? 1437
Branches ? 0
================================================================
Hits ? 1039
Misses ? 398
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bug where the form modals' close button do not work. It closes when Esc is pressed though.
/** | ||
* Initializes 'other' inputs textareas, so that when they are updated the value is passed to the input and attached to the payload. | ||
*/ | ||
function setupOtherInputs() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text input can still be accessed and passes through the payload even when "Other" is not selected. Should the text input show only when "Other" is selected?
Has the close button bug been addressed? It still isn't working for the forms using the form builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes, looks good! Left a comment on the old forms-data.json file
static/files/forms-data-OLD.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file supposed to be removed before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Good catch
6ee26ca
to
fee7c7f
Compare
…stead of one large file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more super minor thing, everything else LGTM!
"Canonical partners with silicon companies, board manufacturers and ODMs to help the industry bring smart device and software capabilities to market faster.", | ||
"Tell us about your project so we can bring the right Canonical team members to the conversation to help you." | ||
], | ||
"formId": "5477", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"formId": "5477", | |
"formId": "4205", |
To match the formID on https://ubuntu.com/download/iot/intel-iot
* feat(/partners/silicon/intel): Build page (#1484) * feat(/partners/intel): Build page * chore(sitemap.xml): Add /partners/silicon/intel * chore(test_routes.py): Add /partners/silicon/intel * refactor: Use flask directory nesting to define url paths and remove unused python * feat(_breadcrumbs.html): Allow breadcrumbs jinja module to consume any number of breadcrumbs * refactor(/partners/silicon/intel): Remove partners footer * fix(/partners/silicon/intel): Add absolute path for urls pointing to ubuntu.com * Migrate '/download/iot/intel-iot#get-in-touch' form to c.com (#1489) * refactor(set_form_rules): use indervidual form-data files per form instead of one large file * refactor: Moce /silicon/intel into it's own folder * feat: build form-data.json file for /partners/silicon/intel * feat: Add fallbacks for missing fields in form-data file * feat: Add optional textarea field to radio boxes * refactor(app.py): Format python * fix(form-template.html): Unbreak the form generator * feat: Improve the appearnace and function of the other textarea * refactor: Format-prettier * refactor: Remove rogue print statments * refactor(set_form_rules): clean up path finding logic by leveraging 'pathlib' * feat: Update return URL to use full path * refactor: Revert context processor changes * feat: Show and hide other input textarea when selecting the associated input * style: Format-js * fix: Close button was not working * refactor: Remove old forms-data.json * fix: Update form is for intel form * fix: Add 'noCommentsFromLead' to cyber-resilience-act form-data
Done
Fly-by
set_form_rules
function to look for individual files found in the same folder as the page they serve (as opposed to one giant file). This will also allow for the use of 'generic' form templates, where you only need to add the URL of the page to re-use a form.form-fields.html
, where if anid
orvalue
is not passed it will be constructed from the label (except with textarea as this does not use a label). This allows quicker production of forms as less data is needed to be added, but the option is still there if really needed.QA
Issue / Card
Fixes https://warthogs.atlassian.net/browse/WD-17902