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

mrc-4011 Add step prop to number input #45

Merged
merged 17 commits into from Feb 27, 2023
Merged

mrc-4011 Add step prop to number input #45

merged 17 commits into from Feb 27, 2023

Conversation

EmmaLRussell
Copy link
Contributor

@EmmaLRussell EmmaLRussell commented Feb 22, 2023

We need to provide custom step values for MINT as an increment of 1 is not appropriate for all parameter values. This adds optional step prop to number inputs.

Test by viewing example/index.html and note that under 'Advanced Options', the 'Decimal parameter' value increments by 0.1 using the spinner arrows.

Some additional housekeeping that was required:

  • retire the old travis build and add a github action. Update build status badge on readme (will be updated to master branch on merge).
  • explicitly assert non-nulls in tests
  • do not use default coverageProvider - fix for error as described here

@codecov
Copy link

codecov bot commented Feb 22, 2023

Codecov Report

❗ No coverage uploaded for pull request base (master@0c537c7). Click here to learn what that means.
Patch has no changes to coverable lines.

❗ Current head eeea85d differs from pull request most recent head 22b0f59. Consider uploading reports for the commit 22b0f59 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             master       #45   +/-   ##
==========================================
  Coverage          ?   100.00%           
==========================================
  Files             ?         2           
  Lines             ?        49           
  Branches          ?        34           
==========================================
  Hits              ?        49           
  Misses            ?         0           
  Partials          ?         0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link

@M-Kusumgar M-Kusumgar left a comment

Choose a reason for hiding this comment

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

Hey emma, nice job, the stepper works as expected. However, while i don't think this is a super important point, it is good to keep in mind: the read only form will only display values with precision of 0.001. So for example if you set the step to 0.0005, it will not accurately display the value. Perhaps that is a note to include in the documentation or something like that. For our purposes however, i don't see that being particularly important!

Copy link
Contributor

@LekanAnni LekanAnni left a comment

Choose a reason for hiding this comment

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

LGTM

Just some suggestions

@@ -0,0 +1,15 @@
name: test
on: [push]
Copy link
Contributor

Choose a reason for hiding this comment

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

 on: push:
    branches:
      - 'main'
  pull_request:
    branches:
      - 'main'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, don't need it on every push. But I don't want to limit the PR branches to 'main' as we do sometimes have PRs into non-main branches, so I won't specify branch for `pull-request'

with:
node-version: 12.x
- run: npm install -g codecov
- run: npm install
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- run: npm install
- run: npm ci

@EmmaLRussell
Copy link
Contributor Author

Hey emma, nice job, the stepper works as expected. However, while i don't think this is a super important point, it is good to keep in mind: the read only form will only display values with precision of 0.001. So for example if you set the step to 0.0005, it will not accurately display the value. Perhaps that is a note to include in the documentation or something like that. For our purposes however, i don't see that being particularly important!

Good point, will add to docs

Copy link
Contributor

@LekanAnni LekanAnni left a comment

Choose a reason for hiding this comment

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

I understand we may need to trigger a job when pull request is opened against other branches. However, you have not specified any target and I do not think you can have an empty pull_request: without a target.

push:
branches:
- 'main'
pull_request:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pull_request:
pull_request:
branches:
types: [opened, reopened, edited]

Copy link
Contributor

@LekanAnni LekanAnni Feb 27, 2023

Choose a reason for hiding this comment

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

Maybe you can, just a bit confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've put in a ~ which should hopefully make it a bit more obvious that it's an empty 'any' target

push:
branches:
- 'main'
pull_request:
Copy link
Contributor

@LekanAnni LekanAnni Feb 27, 2023

Choose a reason for hiding this comment

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

Maybe you can, just a bit confusing.

@EmmaLRussell EmmaLRussell merged commit 4fc9021 into master Feb 27, 2023
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.

None yet

3 participants