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: move app vuex store to pinia #10331

Merged
merged 2 commits into from
Jan 15, 2024
Merged

refactor: move app vuex store to pinia #10331

merged 2 commits into from
Jan 15, 2024

Conversation

JammingBen
Copy link
Collaborator

@JammingBen JammingBen commented Jan 12, 2024

Description

Removes the vuex app store module in favour of a pinia store instead.

I also tried cleaning up and improving the naming and types of app related stuff. It's not all perfect yet, but it's definitely an improvement. The most notable change here is that extensions inside the appInfo object are now of type ApplicationFileExtension[], since they have nothing to do with our extension library, but are file extensions.

Also, there is no such thing as a newFileHandler. This is basically a ApplicationFileExtension with an added newFileMenu that includes a menuTitle.

Breaking changes for developers

  • Removes the announceExtensions method inside the app's ready hook, which could be used to register file editors. Apparently it was not used by any app because there is already another way to register file editors, which is via the extensions property inside the appInfo object.
  • Removes the global $store variable. The recommended way to use the vuex store is via useStore.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

@JammingBen JammingBen self-assigned this Jan 12, 2024
@JammingBen JammingBen force-pushed the apps-to-pinia-store branch 2 times, most recently from 0e639c8 to 3d1cdeb Compare January 12, 2024 17:24
@JammingBen JammingBen mentioned this pull request Jan 13, 2024
11 tasks
@JammingBen JammingBen force-pushed the apps-to-pinia-store branch 3 times, most recently from b2b5afd to bcafac1 Compare January 15, 2024 08:28
@JammingBen JammingBen marked this pull request as ready for review January 15, 2024 08:29
Copy link
Member

@dschmidt dschmidt left a comment

Choose a reason for hiding this comment

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

😍 😍 😍

Removes the vuex app store module in favour of a pinia store instead. Also cleans up the app types a bit, although this is still a bit messy due to some weird naming choices in the past. That's something for a follow-up though.

Also removes the `announceExtensions` method inside the app's `ready` hook, which could be used to register file editors. Apparently it was not used by any app because there is already another way to register file editors, which is via the `extensions` property inside the `appInfo` object.
Copy link

sonarcloud bot commented Jan 15, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

16.9% Condition Coverage on New Code (required ≥ 50%)

See analysis details on SonarCloud

@JammingBen JammingBen merged commit c28a1ea into master Jan 15, 2024
2 of 3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the apps-to-pinia-store branch January 15, 2024 11:31
@JammingBen JammingBen mentioned this pull request Jan 19, 2024
7 tasks
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.

2 participants