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

refactor: clean up state and separate it #1170

Merged
merged 2 commits into from
May 16, 2024
Merged

Conversation

SmiteDeluxe
Copy link
Contributor

Closes #1169

Summary of Changes

  • Split up the currentState into tabs, table and history stores, as no saving to vscode global state anymore so not needed to save as one big object
  • This means that svelte does not have to reevaluate so many things when something small changes, as in a new history item does not cause update to whole state anymore that causes table to update in background
  • Also easier to manage and update
  • tableIdentifier in table object, defaultState property not needed anymore and UserSettings not yet
  • columns don't have a number anymore as order is just array order
  • table filter is object that can have all the tablefilters but not multiple of one type
  • columnWidths still shall remain own store in component, as otherwise resize drag would cause massive amount of updates to the table store
  • setCurrentState msg is not setInitialTable and takes Table, error if executed more than once

@SmiteDeluxe SmiteDeluxe added vscode 🔨 Issues regarding tools like the VS Code extension performance 🏃 Speed things up cleanup 🧹 Refactorings and other tasks that improve the code labels May 14, 2024
@SmiteDeluxe SmiteDeluxe linked an issue May 14, 2024 that may be closed by this pull request
Copy link

github-actions bot commented May 14, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ JSON prettier 4 0 0 2.01s
✅ REPOSITORY git_diff yes no 0.22s
✅ TSX eslint 4 0 0 7.47s
✅ TYPESCRIPT eslint 6 0 0 7.14s
✅ TYPESCRIPT prettier 6 0 0 1.2s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (90bd47c) to head (49d685f).
Report is 48 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1170   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          110       110           
  Lines        19238     19238           
  Branches      4114      4114           
=========================================
  Hits         19238     19238           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lars-reimann
Copy link
Member

Does this PR add new features or is it "only" to refactor? Just asking because of the PR title.

@SmiteDeluxe SmiteDeluxe changed the title feat: clean up state and separate it refactor: clean up state and separate it May 14, 2024
@SmiteDeluxe
Copy link
Contributor Author

Does this PR add new features or is it "only" to refactor? Just asking because of the PR title.

Oops sorry, not intended. Yes only refactor, changed that title.

Copy link
Member

@lars-reimann lars-reimann left a comment

Choose a reason for hiding this comment

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

I've found no regressions and appreciate the reduced nesting. Thank you.

@lars-reimann lars-reimann merged commit a07e893 into main May 16, 2024
5 checks passed
@lars-reimann lars-reimann deleted the 1169-improve-eda-state branch May 16, 2024 13:47
@lars-reimann
Copy link
Member

🎉 This PR is included in version 0.16.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup 🧹 Refactorings and other tasks that improve the code performance 🏃 Speed things up released Included in a release vscode 🔨 Issues regarding tools like the VS Code extension
Projects
Status: ✔️ Done
Development

Successfully merging this pull request may close these issues.

Improve EDA state
2 participants