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

Standardise Handling Of Scrubbing In The Inspector #6001

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

seanparsons
Copy link
Contributor

@seanparsons seanparsons commented Jun 19, 2024

Problem:
We want to make the following changes to the number inputs:

  • Make a lot of the inputs scrubbable.
  • If an input is scrubble, remove the increment buttons.
  • Set the step size appropriately for the field that is being updated.

Fix:
Mostly these changes have involved just applying the right properties to the NumberInput controls.

However one part that needed changing a tiny bit beyond that was a fix to FrameUpdatingLayoutControl, the common prior value was being stored in the event handler closure. But it needed to be recalculated as the value changes while scrubbing through them.

Commit Details:

  • In FlexGapControl remove the increment buttons and move the label inside so it can be scrubbed.
  • Fixed the handling of the prior values upon which the movement is calculated in FrameUpdatingLayoutControl.
  • Set step size to 1 in FrameUpdatingLayoutControl.
  • Removed increment controls from BorderSubSection.
  • Removed increment controls and set step size to 0.1 in ShadowSubsection.
  • Removed increment controls and set step size to 0.1 in TextShadowSubsection.
  • Removed increment controls and set step size to 0.1 in TransformSubsection.
  • Added onMouseDown handler to inner label of NumberInput.

Manual Tests:
I hereby swear that:

  • I opened a hydrogen project and it loaded
  • I could navigate to various routes in Preview mode

Further addresses #5869.

- In `FlexGapControl` remove the increment buttons and move the label inside so it can be scrubbed.
- Fixed the handling of the prior values upon which the movement is calculated in
  `FrameUpdatingLayoutControl`.
- Set step size to 1 in `FrameUpdatingLayoutControl`.
- Removed increment controls from `BorderSubSection`.
- Removed increment controls and set step size to 0.1 in `ShadowSubsection`.
- Removed increment controls and set step size to 0.1 in `TextShadowSubsec
- Removed increment controls and set step size to 0.1 in `TransformSubsection`.
- Added `onMouseDown` handler to inner label of `NumberInput`.
Copy link
Contributor

github-actions bot commented Jun 19, 2024

Try me

Copy link

relativeci bot commented Jun 19, 2024

#13144 Bundle Size — 62.26MiB (+0.02%).

4b5906a(current) vs 6339ece master#13140(baseline)

Warning

Bundle contains 51 duplicate packages – View duplicate packages

Bundle metrics  Change 4 changes Regression 2 regressions
                 Current
#13144
     Baseline
#13140
Regression  Initial JS 45.32MiB(+0.03%) 45.31MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 40.71% 22.66%
No change  Chunks 30 30
No change  Assets 33 33
Change  Modules 4305(+0.07%) 4302
Regression  Duplicate Modules 525(+0.38%) 523
No change  Duplicate Code 31.84% 31.84%
No change  Packages 448 448
No change  Duplicate Packages 51 51
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#13144
     Baseline
#13140
Regression  JS 62.24MiB (+0.02%) 62.23MiB
Improvement  HTML 11.16KiB (-0.33%) 11.2KiB

Bundle analysis reportBranch feature/inspector-input-scrubbin...Project dashboard

@seanparsons seanparsons merged commit e0b6c59 into master Jun 21, 2024
16 checks passed
@seanparsons seanparsons deleted the feature/inspector-input-scrubbing-standardise branch June 21, 2024 10:14
liady pushed a commit that referenced this pull request Dec 13, 2024
- In `FlexGapControl` remove the increment buttons and move the label
inside so it can be scrubbed.
- Fixed the handling of the prior values upon which the movement is
calculated in `FrameUpdatingLayoutControl`.
- Set step size to 1 in `FrameUpdatingLayoutControl`.
- Removed increment controls from `BorderSubSection`.
- Removed increment controls and set step size to 0.1 in
`ShadowSubsection`.
- Removed increment controls and set step size to 0.1 in
`TextShadowSubsection`.
- Removed increment controls and set step size to 0.1 in
`TransformSubsection`.
- Added `onMouseDown` handler to inner label of `NumberInput`.
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