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

build: release v6.45.0 #6200

Merged
merged 9 commits into from
Apr 26, 2023
Merged

build: release v6.45.0 #6200

merged 9 commits into from
Apr 26, 2023

Conversation

LinHuiqing
Copy link
Contributor

@LinHuiqing LinHuiqing commented Apr 26, 2023

New

  • chore: update payment guide in payment unsupported msg #6199
  • fix(deps): bump type-fest from 3.8.0 to 3.9.0 in /shared #6195
  • chore: update previous payment typing and hooks #6191
  • chore: add missed out changelog for 6.44.1 #6197
  • build: merge release v6.44.1 to develop #6196
  • build: release v6.44.1 #6193
  • perf: memoize field row containers #6189
  • build: merge release v6.44.0 to develop #6187

Tests

chore: update payment guide in payment unsupported msg #6199

@KenLSM

  • go to an email mode form. Go to settings, make sure that the settings page is as seen in the screenshot
  • go to the payment guide link, make sure that it can open

chore: update previous payment typing and hooks #6191

@KenLSM

Previous payment check should still work correctly, duplicating test cases from #6170
To check basic functionality
Go to a payment form

  • make a payment successfully
  • attempt to make a second payment with the same email
  • you should see the modal directing you to your previous payment page
  • click the link and ensure you are the same payment page from when you made a successful payment

To check that we get the latest successful payment
all of these are done with the same email as above

  • go back and make a second payment with the same email again (take note of your payment id/payment page link)
  • make a payment successfully
  • go back to the form
  • make a payment intent (but do not pay)
  • go back to the form
  • fill in the form and click proceed to pay, the duplicate payment modal should show, directing you to the second payment that you made. Check that the payment id/payment page link is equivalent to your second payment

To check that we do not erroneously show the duplicate payment modal
On the same form

  • make a payment with a different email
  • you should not see the duplicate payment modal at proceed to pay

On a different form

  • make a payment with the original email form above
  • you should not see the duplicate payment modal at proceed to pay

To ensure no regression issues on non-payment forms
(As changes was made to PublicFormSubmitButton)

  • go to a non-payment storage mode form
  • make a submission
  • go to an email mode form
  • make a submission

perf: memoize field row containers #6189

@LinHuiqing

To ensure the feature works

(skipped: react profiler only works in development)
On development environment: Use react dev tool -> profiler

  • go to a form in your admin view
  • start profiler recording
  • shift some of the fields around
  • stop recording, you should see that most fields are not re-rendered at each step, and they are memoized at the FieldRow level

On non-development environment: Use react dev tool -> components

  • go to a form in your admin view
  • each question should be denoted by a Hr and have the Memo tag on the right of it

Go to a large form

  • try to drag a field. The dragging of the field (before dropping) should feel smooth, and there should be minimal jitters.

To ensure core features are still intact

  • In any storage form, ensure the following functionality is still working
    • Create a new field
    • Edit the field properties of any field
    • Edit the field properties, do not save, click away (close the drawer or select another field) the discard editing modal should appear
    • Drag a field to change its position, question number should be updated too
    • Duplicate a field
    • Attempt to delete a field, the modal should open, and can be cancelled
    • Delete the field, modal should open, and field can be deleted
    • Preview the form. Make a submission
    • Open the form to respondents. Make a submission
  • Do the same steps above for an email form
  • Do the same steps on mobile

Notes

There are still a few unnecessary re-renders upon drag and dropping of the fields.

Ideally, only the fields affected (field id changed) should re-render and all other fields should be unaffected. However, currently there is still some existing hooks that causes a re-render for all the fields even if they are memoized

LinHuiqing and others added 8 commits April 25, 2023 11:11
build: merge release v6.44.0 to develop
* chore: export props from hooks for in FieldRow props

* feat: shift hooks from fieldRow to BuilderFields

* feat: memoize FieldRow with deep equality check
build: merge release v6.44.1 to develop
* chore: update typing of getPreviousPayment

we no longer return empty data, instead we return 404

* chore: use sendstatus instead

* test: update test cases with internal server error case

check that sendstatus was called

* refactor: remove unnecessary isDuplicate state
Bumps [type-fest](https://github.com/sindresorhus/type-fest) from 3.8.0 to 3.9.0.
- [Release notes](https://github.com/sindresorhus/type-fest/releases)
- [Commits](sindresorhus/type-fest@v3.8.0...v3.9.0)

---
updated-dependencies:
- dependency-name: type-fest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
CHANGELOG.md Outdated Show resolved Hide resolved
@LinHuiqing LinHuiqing marked this pull request as ready for review April 26, 2023 05:16
@LinHuiqing LinHuiqing temporarily deployed to staging-al2 April 26, 2023 05:20 — with GitHub Actions Inactive
@foochifa
Copy link
Contributor

@LinHuiqing I forgot profiler doesn't work for non dev env HAHAHA instead, you could go to react dev tools -> components. And make sure the fieldrowcomponent (as a Hr I think) is memo-ed (so there should be a memo tag to it)

@LinHuiqing
Copy link
Contributor Author

...field id should be updated too.

do you mean question number? @foochifa

@foochifa
Copy link
Contributor

foochifa commented Apr 26, 2023

Ah yes field id is question number hahah sorry for the confusion

@LinHuiqing
Copy link
Contributor Author

just to note for #6189: the form and drag + drop is noticeably laggier on mobile

Copy link
Contributor

@KenLSM KenLSM left a comment

Choose a reason for hiding this comment

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

lgtm!

@LinHuiqing LinHuiqing merged commit b59b2e4 into release-al2 Apr 26, 2023
@LinHuiqing LinHuiqing deleted the release_v6.45.0 branch April 26, 2023 06:47
@wanlingt wanlingt mentioned this pull request May 3, 2023
55 tasks
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.

3 participants