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

[B2BP-691] - Update Form Component #336

Merged
merged 21 commits into from
Jul 4, 2024
Merged

[B2BP-691] - Update Form Component #336

merged 21 commits into from
Jul 4, 2024

Conversation

Meolocious
Copy link
Collaborator

@Meolocious Meolocious commented Jun 27, 2024

List of Changes

  • Fixed Form component

Screenshot

Form-Component-Before

Before Fix

Form-After-Fix

After Fix

Motivation and Context

This PR is made to align components to new Figma design

How Has This Been Tested?

Tested locally

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Doesn't need any documentation update.

@Meolocious Meolocious self-assigned this Jun 27, 2024
Copy link

changeset-bot bot commented Jun 27, 2024

🦋 Changeset detected

Latest commit: eb3360d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nextjs-website Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.19%. Comparing base (7776e8d) to head (eb3360d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #336   +/-   ##
=======================================
  Coverage   99.19%   99.19%           
=======================================
  Files          23       23           
  Lines         989      999   +10     
  Branches       40       40           
=======================================
+ Hits          981      991   +10     
  Misses          8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Meolocious Meolocious marked this pull request as ready for review July 2, 2024 14:02
@Meolocious Meolocious requested a review from a team as a code owner July 2, 2024 14:02
Meolocious and others added 2 commits July 2, 2024 16:12
Co-authored-by: Simone Salsi <59611877+simosalsi@users.noreply.github.com>
Copy link
Contributor

github-actions bot commented Jul 3, 2024

Branch is not up to date with base branch

@Meolocious it seems this Pull Request is not updated with base branch.
Please proceed with a merge or rebase to solve this.

Comment on lines 7 to 32
const makeFormProps = ({
title,
subtitle,
privacyLinkRecaptchaPolicy,
privacyLinkTextRecaptchaPolicy,
privacyLinkRecaptchaTerms,
privacyLinkTextRecaptchaTerms,
formCategories,
theme,
ctaButtons,
...rest
}: FormSection): FormProps => ({
title,
subtitle,
privacyLinkRecaptchaPolicy,
privacyLinkTextRecaptchaPolicy,
privacyLinkRecaptchaTerms,
privacyLinkTextRecaptchaTerms,
formCategories: formCategories.map(({ label, additionalLabel }) => ({
label,
additionalLabel: additionalLabel ?? '',
})),
theme,
ctaButtons: ctaButtons.map(({ ...ctaBtn }) => ({
...ctaBtn,
})),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const makeFormProps = ({
title,
subtitle,
privacyLinkRecaptchaPolicy,
privacyLinkTextRecaptchaPolicy,
privacyLinkRecaptchaTerms,
privacyLinkTextRecaptchaTerms,
formCategories,
theme,
ctaButtons,
...rest
}: FormSection): FormProps => ({
title,
subtitle,
privacyLinkRecaptchaPolicy,
privacyLinkTextRecaptchaPolicy,
privacyLinkRecaptchaTerms,
privacyLinkTextRecaptchaTerms,
formCategories: formCategories.map(({ label, additionalLabel }) => ({
label,
additionalLabel: additionalLabel ?? '',
})),
theme,
ctaButtons: ctaButtons.map(({ ...ctaBtn }) => ({
...ctaBtn,
})),
const makeFormProps = ({
formCategories,
...rest
}: FormSection): FormProps => ({
formCategories: formCategories.map(({ label, additionalLabel }) => ({
label,
additionalLabel: additionalLabel ?? '',
})),

Removing unchanged parameters, condensing them into ...rest

Copy link
Contributor

github-actions bot commented Jul 4, 2024

Jira Pull Request Link

This Pull Request refers to the following Jira issue B2BP-691

Copy link
Collaborator

@simosalsi simosalsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The optionality of the email field will be reconsidered later with the end user.

@Meolocious Meolocious merged commit e9f7262 into main Jul 4, 2024
9 checks passed
@Meolocious Meolocious deleted the PR-Form-Update branch July 4, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants