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

Fix React Compiler lints + improve performance #11450

Merged
merged 87 commits into from
Nov 21, 2024

Conversation

somebody1234
Copy link
Contributor

Pull Request Description

Important Notes

None

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • ~~If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.~~

@somebody1234 somebody1234 added CI: No changelog needed Do not require a changelog entry for this PR. g-dashboard labels Oct 30, 2024
@somebody1234
Copy link
Contributor Author

@MrFlashAccount lints refactored out

Copy link
Contributor

mergify bot commented Oct 30, 2024

⚠️ The sha of the head commit of this PR conflicts with #11382. Mergify cannot evaluate rules on this PR. ⚠️

1 similar comment
Copy link
Contributor

mergify bot commented Oct 30, 2024

⚠️ The sha of the head commit of this PR conflicts with #11382. Mergify cannot evaluate rules on this PR. ⚠️

@somebody1234 somebody1234 changed the base branch from develop to wip/sb/optimize-asset-table-rendering October 31, 2024 09:56
Base automatically changed from wip/sb/optimize-asset-table-rendering to develop October 31, 2024 10:36
@somebody1234 somebody1234 marked this pull request as ready for review November 6, 2024 11:40
@somebody1234 somebody1234 changed the title Fix React Compiler lints Fix React Compiler lints + improve performance Nov 19, 2024
@somebody1234 somebody1234 added the CI: Keep up to date Automatically update this PR to the latest develop. label Nov 20, 2024
@somebody1234 somebody1234 removed the CI: Keep up to date Automatically update this PR to the latest develop. label Nov 20, 2024
@@ -56,7 +56,7 @@ declare module '@tanstack/query-core' {
/** Query Client type suitable for shared use in React and Vue. */
export type QueryClient = vueQuery.QueryClient

const DEFAULT_QUERY_STALE_TIME_MS = 2 * 60 * 1000
const DEFAULT_QUERY_STALE_TIME_MS = Infinity
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it mean that we never update queried data? It may be a problem for our cloud browser, which won't be refreshed after putting a new file to cloud directory.

Copy link
Contributor

@MrFlashAccount MrFlashAccount Nov 21, 2024

Choose a reason for hiding this comment

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

It's a temporary solution to avoid ton of setTimeout calls during subscribe

Instead of setting stale time we now have a query that mark all queries as stale each 2 minutes.

Worth noting that marking query as stale doesn't mean that it will be refetched immidiately.

Also if we use the same cache and queries across dashboard and project-view, we'll have a consistent state between vue and react

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of setting stale time we now have a query that mark all queries as stale each 2 minutes.

Then it's a good idea to leave comment about it here.

Copy link
Contributor

Choose a reason for hiding this comment

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

We'll remove it once react-query landed a fix (they already opened a PR)

@somebody1234 somebody1234 added the CI: Keep up to date Automatically update this PR to the latest develop. label Nov 21, 2024
@somebody1234 somebody1234 removed the CI: Keep up to date Automatically update this PR to the latest develop. label Nov 21, 2024
Copy link

🧪 Storybook is successfully deployed!

📊 Dashboard:

@jdunkerley jdunkerley merged commit 8c2e2af into develop Nov 21, 2024
50 of 51 checks passed
@jdunkerley jdunkerley deleted the wip/sb/fix-react-compiler-lints branch November 21, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge g-dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants