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

introduce 'config' Pinia store with other Vuex modules - drop the usage of 'config' Vuex module #8

Merged
merged 8 commits into from
May 31, 2024

Conversation

orlinmalkja
Copy link
Contributor

@orlinmalkja orlinmalkja commented May 27, 2024

This MR addresses the following:

  • create a 'config' Pinia store
  • change other components to now use the 'config' Pinia store, instead of 'config' Vuex module
  • remove unused code mainly in 'contents' Vuex module
  • at the end of this MR: we will have a mixture of ['contents', 'annotations'] Vuex modules and 'config' pinia store

package.json Outdated Show resolved Hide resolved
src/App.vue Outdated Show resolved Hide resolved
src/types.d.ts Outdated
options?: Option_1_ConnectorViewPanel | Option_2_ConnectorViewPanel | Option_3_ConnectorViewPanel
}

type Option_1_ConnectorViewPanel = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should refine this a bit more. The types for different connector options should be more specific. A connector is in fact a real existing component that sits inside of a view (tab). For the sake of modularity we should push towards well-defined APIs (props/events) for each component. This means that we should define specifc types and interfaces for those views. For example a MetadataView component should be configured by a MetadataViewConfigOptions interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have worked in my previous two commits to address the refinement of Config interface.

Copy link
Collaborator

Choose a reason for hiding this comment

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

As discussed, please remove all non TextAPI Types and Interfaces for now and focus just on refactoring to Pinia store. We will deal with the correct typing of configs and their dependencies later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@paulpestov yes, I just did it in my last commit:
Additionally in my last commit I did the following:

  • removed the Config Vuex Module folder
  • used Config Pinia Store in some other components
  • used only 'TextAPI' types in 'Config' Pinia store
  • removed unused code

src/types.d.ts Outdated Show resolved Hide resolved
@orlinmalkja orlinmalkja merged commit 44f535f into develop May 31, 2024
2 checks passed
@orlinmalkja orlinmalkja deleted the omalkja/use-pinia-config-store branch June 6, 2024 08:05
@orlinmalkja orlinmalkja self-assigned this Oct 16, 2024
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