Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

fix: skipping initial button state #380

Merged
merged 2 commits into from
Aug 31, 2022

Conversation

baptisteArno
Copy link
Contributor

@baptisteArno baptisteArno commented Jul 6, 2022

Summary

Relying on the touched property for skipping the initial button state didn't work with forms that contain only a button.

This PR is another proposition to "skip" the initial button state. And it fixes the single-button form.

It is solving the following button flashing issue:

CleanShot.2022-07-08.at.18.23.15.mp4

@baptisteArno baptisteArno requested review from a team, vincentaudebert and QuiiBz and removed request for a team July 6, 2022 13:12
@codecov-commenter
Copy link

codecov-commenter commented Jul 6, 2022

Codecov Report

Merging #380 (a36c937) into main (73981a2) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #380      +/-   ##
==========================================
+ Coverage   91.78%   91.83%   +0.05%     
==========================================
  Files          25       25              
  Lines         292      294       +2     
  Branches       36       36              
==========================================
+ Hits          268      270       +2     
  Misses         13       13              
  Partials       11       11              
Impacted Files Coverage Δ
src/components/Submit/index.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73981a2...a36c937. Read the comment docs.

@baptisteArno baptisteArno self-assigned this Aug 12, 2022
@baptisteArno baptisteArno added the enhancement New feature or request label Aug 12, 2022
@baptisteArno baptisteArno force-pushed the fix/loading-for-button-only-forms branch from 80bcc2a to a36c937 Compare August 12, 2022 07:01
@baptisteArno baptisteArno merged commit db21691 into main Aug 31, 2022
@baptisteArno baptisteArno deleted the fix/loading-for-button-only-forms branch August 31, 2022 14:10
scaleway-bot pushed a commit that referenced this pull request Aug 31, 2022
## [1.25.6](v1.25.5...v1.25.6) (2022-08-31)

### 📦 Chore

* **devdeps:** update jest monorepo to v29 ([#460](#460)) ([a803710](a803710))

### ⚡ Refactor

* **Toggle:** switch to toggle ([#465](#465)) ([9c2a6b0](9c2a6b0))

### 🐛 Bug Fixes

* skipping initial button state ([#380](#380)) ([db21691](db21691))
@scaleway-bot
Copy link
Collaborator

🎉 This PR is included in version 1.25.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants