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

[C2] Remove vuex from some components #5384

Merged
merged 15 commits into from Apr 23, 2024

Conversation

daniboygg
Copy link
Contributor

Remove vuex from components where is imported but not used

#5377

@daniboygg daniboygg changed the title Remove vuex from simple components [C2] Remove vuex from simple components Apr 17, 2024
@daniboygg daniboygg changed the title [C2] Remove vuex from simple components [C2] Remove vuex from some components Apr 17, 2024
Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.32%. Comparing base (f9eb947) to head (f065cc8).
Report is 56 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5384      +/-   ##
============================================
- Coverage     40.77%   39.32%   -1.46%     
- Complexity    10214    10275      +61     
============================================
  Files           807      814       +7     
  Lines         42433    43543    +1110     
============================================
- Hits          17304    17125     -179     
- Misses        25129    26418    +1289     

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

Copy link

codeclimate bot commented Apr 17, 2024

An error occurred when fetching issues.

View more on Code Climate.

@ywarnier
Copy link
Member

@daniboygg there's a small conflict now and I'm not clear whether these 2 lines should remain or not.
One (const { isAdmin } = useSecurityStore()) was added by you in a more recent PR, so I suppose it has to stay, and the other (const store = useStore()) was added by Christian 2 months ago to recover some features in the social network.
I'm leaving these 2 lines there, but don't hesitate to send another PR if this is introducing something you wanted to remove.

@ywarnier ywarnier merged commit 5ff28df into chamilo:master Apr 23, 2024
2 of 7 checks passed
@daniboygg
Copy link
Contributor Author

For what I can see this line const store = useStore() will fail now, because there is no import in the component that imports the function useStore here https://github.com/daniboygg/chamilo-lms/blob/046dda11a575866cbb499fd34a49e4a4433d7e72/assets/vue/components/social/UserProfileCard.vue#L112. Should I make a PR as soon as possible, addressing this? I think this change will break every page where this component is used otherwise

In this line const { isAdmin } = useSecurityStore() I used the new useSecurityStore from pinia, and it's the correct one from now on.

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.

None yet

2 participants