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

ref(js): Introduce simple useProjects #29457

Merged

Conversation

evanpurkhiser
Copy link
Member

Switches the withProjects over to the useProjects hook, which very basically just connects to the store ATM

@evanpurkhiser evanpurkhiser requested a review from a team October 20, 2021 21:58
@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2021

size-limit report

Path Base Size (76217a7) Current Size Change
src/sentry/static/sentry/dist/entrypoints/app.js 52.75 KB 52.74 KB -0.01% 🔽
src/sentry/static/sentry/dist/entrypoints/sentry.css 70.89 KB 70.89 KB 0%

Copy link
Contributor

@davidenwang davidenwang left a comment

Choose a reason for hiding this comment

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

niceee

@evanpurkhiser
Copy link
Member Author

This is super basic right now, a bunch of tests are failing that I'm fixing, then right after this we'll have all the project util stuff end up in here 😎

@evanpurkhiser
Copy link
Member Author

@priscilawebdev @matejminar could I get a review for all the tests I changed.

Because withProjects uses the hook now it needed a lot more acting

Copy link
Contributor

@davidenwang davidenwang left a comment

Choose a reason for hiding this comment

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

nice stuff, and good updates to RTL over multiple await ticks

expect(initialData.router.replace).toHaveBeenLastCalledWith({
pathname: undefined,
query: {environment: [], project: [0]},
query: {cursor: undefined, environment: [], project: [2]},
Copy link
Contributor

Choose a reason for hiding this comment

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

is it bad that we changed the functionality here?

Copy link
Member Author

Choose a reason for hiding this comment

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

So the reason this changed is a detail of the test implementation because we had mocked the return value incorrectly in the test before.

So it's actually the same 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

ahhh i see now

@evanpurkhiser evanpurkhiser merged commit 20cedf1 into master Oct 26, 2021
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-js-introduce-simple-useprojects branch October 26, 2021 22:26
@github-actions github-actions bot locked and limited conversation to collaborators Nov 11, 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.

2 participants