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

Start item number from 1 instead of 0 #136

Merged
merged 1 commit into from
Feb 8, 2024
Merged

Conversation

dmijatovic
Copy link
Collaborator

@dmijatovic dmijatovic commented Feb 5, 2024

The list item number start from 1 instead of 0

Closes #130

Changes made:

  • useIndexable hook returns item index + 1 value
  • Tests are updated
  • Added npm script test:headed to haddock3-download app to view integration tests locally

How to test:

  • The change can be validated via storybook
  • All test are passing (unit & integration tests)

image

Copy link

netlify bot commented Feb 5, 2024

Deploy Preview for i-vresse-workflow-builder ready!

Name Link
🔨 Latest commit cecb743
🔍 Latest deploy log https://app.netlify.com/sites/i-vresse-workflow-builder/deploys/65c49c062ef86700083bdc19
😎 Deploy Preview https://deploy-preview-136--i-vresse-workflow-builder.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2699ae2) 66.68% compared to head (f1efcc4) 66.74%.
Report is 2 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #136      +/-   ##
==========================================
+ Coverage   66.68%   66.74%   +0.05%     
==========================================
  Files          57       57              
  Lines        4049     4065      +16     
  Branches      336      337       +1     
==========================================
+ Hits         2700     2713      +13     
- Misses       1345     1348       +3     
  Partials        4        4              
Flag Coverage Δ
core-unit 63.79% <ø> (+0.08%) ⬆️
form-unit 78.50% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
packages/form/src/useIndexable.ts 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@dmijatovic dmijatovic force-pushed the 130-start-list-with-1 branch from f1efcc4 to e56bf34 Compare February 6, 2024 10:02
@dmijatovic dmijatovic requested a review from sverhoeven February 6, 2024 10:06
Copy link
Member

@sverhoeven sverhoeven left a comment

Choose a reason for hiding this comment

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

Overall looks good to me.

Nice, this also updated indexeable for tablefield, see http://localhost:6007/?path=/story/tablefield--array-of-object-with-index-column

I do however have some consistency remarks:

Can you also update the docs?
At https://github.com/i-VRESSE/workflow-builder/blob/130-start-list-with-1/docs/uiSchema.md?plain=1#L146 the 3 should be changed to 4.

apps/haddock3-download/package.json Show resolved Hide resolved
Update unit and integration tests
Added playwright headed script for local use
@dmijatovic dmijatovic force-pushed the 130-start-list-with-1 branch from e56bf34 to cecb743 Compare February 8, 2024 09:16
@dmijatovic dmijatovic requested a review from sverhoeven February 8, 2024 09:19
Copy link
Member

@sverhoeven sverhoeven left a comment

Choose a reason for hiding this comment

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

Great thanks for the contribution.

@dmijatovic dmijatovic merged commit 6427dcc into main Feb 8, 2024
5 checks passed
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.

Number molecules starting at 1
3 participants