Skip to content

Add sorting to npm scripts - #112725

Merged
Alex Ross (alexr00) merged 4 commits into
microsoft:masterfrom
olderor:olderor/fix-npm-scripts-order
Dec 22, 2020
Merged

Alex Ross (alexr00) merged 4 commits into
microsoft:masterfrom
olderor:olderor/fix-npm-scripts-order

Conversation

@olderor

Copy link
Copy Markdown
Contributor

This PR fixes #92773 - npm scripts panel is not ordered

Our team has a pain point in npm scripts because we have a lot of package.json files inside our repo and the npm scripts are always different, so it's super difficult to find the one you are looking for.

Current implementation:
Observe the order is always different. Scripts are jumping.

Suggested approach:
Sort by the label. The order will remain the same. Easy to find the command you are looking for.

@ghost

Deleted user (ghost) commented Dec 17, 2020 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@olderor

Bohdan Yevchenko (olderor) commented Dec 18, 2020 •

Copy link
Copy Markdown
Contributor Author

This PR also fixes (duplicates):
#90902 NPM Scripts should be sorted
#109501 Add predictable order and state awareness to NPM Scripts Tab

Alex Ross (@alexr00) Johannes Rieken (@jrieken) Please let me know if this PR looks good or if you have any questions. I would like the fix to be available in the next release. Thanks!

@Ashok314 Ashok314 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I have added the comments for a test case where there is only one item.

Comment thread extensions/npm/src/npmView.ts Resolved
Comment thread extensions/npm/src/npmView.ts Resolved
@ami-eng

ami-eng commented Dec 20, 2020 via email

Copy link
Copy Markdown

@olderor

Copy link
Copy Markdown
Contributor Author

ami-eng not sure what do you want me to stop. You probably want to just click on the unsubscribe link instead to stop receiving the notifications.

Comment thread extensions/npm/src/npmView.ts Resolved

@alexr00 Alex Ross (alexr00) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thank you!

@alexr00
Alex Ross (alexr00) merged commit 445f259 into microsoft:master Dec 22, 2020
@alexr00 Alex Ross (alexr00) added this to the January 2021 milestone Dec 22, 2020
@olderor
Bohdan Yevchenko (olderor) deleted the olderor/fix-npm-scripts-order branch December 23, 2020 00:08
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm scripts panel is not ordered

5 participants