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] Delete some components that are not used #5385

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

daniboygg
Copy link
Contributor

This will remove components that are not in use in Vue application. This will delete some unneeded vuex dependencies.

#5377

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.19%. Comparing base (f9eb947) to head (0790826).
Report is 223 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5385      +/-   ##
============================================
- Coverage     40.77%   40.19%   -0.59%     
- Complexity    10214    10337     +123     
============================================
  Files           807      818      +11     
  Lines         42433    43470    +1037     
============================================
+ Hits          17304    17473     +169     
- Misses        25129    25997     +868     

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

@ywarnier ywarnier requested a review from AngelFQC April 23, 2024 09:13
@ywarnier
Copy link
Member

I'm not able to review this one, in particular because of the assets/vue/router/course.js removal. I think maybe the corresponding views are a work in progress to be used later. @AngelFQC if these are not works in progress, can we remove them and implement them correctly later on, or should we keep them there to hold the place for the file to be used later?

@daniboygg
Copy link
Contributor Author

To clarify my decision, I deleted the file course.js because there was no reference in the code to the routes created in /resources/courses/xxx. The components inside these routes were made with old libraries and didn't work at all.

Because of the routes in https://github.com/chamilo/chamilo-lms/blob/master/assets/vue/router/index.js#L94 I may incorrectly guess that these were the correct ones (/courses , /course/:id/home).

Comment on lines 13 to 17
{
name: 'CourseCreate',
path: 'new',
component: () => import('../views/course/Create.vue')
},
Copy link
Member

Choose a reason for hiding this comment

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

CourseCreate is currently in use

Copy link
Member

Choose a reason for hiding this comment

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

This page is used to allow teachers to create their courses (from the orange button on the /courses page)

@daniboygg daniboygg marked this pull request as draft April 24, 2024 11:51
@daniboygg
Copy link
Contributor Author

I reverted the changes. So, do we need the components CourseList, CourseUpdate and CourseShow. All of them are using vuex, but when I visit the route I see nothing.
I think we should fix these components before remove vuex, otherwise it will be difficult to ensure the behavior is consistent with the old one.

const violations = computed(() => store.getters['course/getField']('violations'))
const courseData = ref({})
const isLoading = ref(false)
const violations = ref(null)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reference violations is used in the component CourseForm but this component has no property errors...

<CourseForm
      ref="createForm"
      :errors="violations"
      :values="item"
      @submit="submitCourse"
    />

Copy link

codeclimate bot commented Apr 24, 2024

An error occurred when fetching issues.

View more on Code Climate.

@daniboygg daniboygg marked this pull request as ready for review April 25, 2024 14:10
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

3 participants