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

[meta] stop slicing ember-data model collections #5660

Closed
stopfstedt opened this issue Aug 20, 2024 · 14 comments
Closed

[meta] stop slicing ember-data model collections #5660

stopfstedt opened this issue Aug 20, 2024 · 14 comments
Assignees

Comments

@stopfstedt
Copy link
Member

this was a kludge we used to convert these to arrays on the cheap for further processing.

that's no longer necessary.

remove all invocations of Array::slice() where they are no longer needed.

for reference, see ilios/frontend#7946 (review)

@stopfstedt stopfstedt self-assigned this Aug 20, 2024
@stopfstedt
Copy link
Member Author

ballpark:

stefan@nichtsnutz: ~/dev/projects/frontend on frontend_5660_slice_me_nice[$]
$ grep -lr '\.slice()' packages/ | egrep -v '(dist|node_modules)' | sort
packages/frontend/app/components/bulk-new-users.js
packages/frontend/app/components/courses/root.js
packages/frontend/app/components/curriculum-inventory/new-sequence-block.js
packages/frontend/app/components/curriculum-inventory/report-rollover.js
packages/frontend/app/components/curriculum-inventory/reports.js
packages/frontend/app/components/curriculum-inventory/sequence-block-overview.js
packages/frontend/app/components/curriculum-inventory/sequence-block-session-manager.js
packages/frontend/app/components/global-search-box.js
packages/frontend/app/components/global-search.js
packages/frontend/app/components/instructor-groups/list.js
packages/frontend/app/components/instructor-groups/root.js
packages/frontend/app/components/instructor-group/users.js
packages/frontend/app/components/learner-group/bulk-assignment.js
packages/frontend/app/components/learner-group/calendar.js
packages/frontend/app/components/learner-group/instructor-manager.js
packages/frontend/app/components/learner-group/list-item.js
packages/frontend/app/components/learner-group/root.js
packages/frontend/app/components/learner-groups/root.js
packages/frontend/app/components/learner-group/upload-data.js
packages/frontend/app/components/new-directory-user.js
packages/frontend/app/components/new-user.js
packages/frontend/app/components/pending-updates-summary.js
packages/frontend/app/components/program-year/competencies.js
packages/frontend/app/components/program-year/list.js
packages/frontend/app/components/program-year/managed-competency-list-item.js
packages/frontend/app/components/program-year/new.js
packages/frontend/app/components/program-year/objective-list-item-expanded.js
packages/frontend/app/components/program-year/objective-list-item.js
packages/frontend/app/components/program-year/objective-list.js
packages/frontend/app/components/program-year/objectives.js
packages/frontend/app/components/reports/new-subject.js
packages/frontend/app/components/reports/subject/new/course.js
packages/frontend/app/components/reports/subject/new/session.js
packages/frontend/app/components/school-competencies-list-item-pcrs.js
packages/frontend/app/components/school-competencies-manager.js
packages/frontend/app/components/school-new-vocabulary-form.js
packages/frontend/app/components/school/visualizer-session-type-vocabularies.js
packages/frontend/app/components/school/visualizer-session-type-vocabulary.js
packages/frontend/app/components/school-vocabularies-list.js
packages/frontend/app/components/school-vocabulary-manager.js
packages/frontend/app/components/school-vocabulary-new-term.js
packages/frontend/app/components/school-vocabulary-term-manager.js
packages/frontend/app/components/user-profile-permissions.js
packages/frontend/app/components/user-profile-roles.js
packages/frontend/app/components/visualizer-program-year-objectives.js
packages/frontend/app/controllers/curriculum-inventory-report/index.js
packages/frontend/app/controllers/pending-user-updates.js
packages/frontend/app/controllers/user.js
packages/frontend/app/routes/admin-dashboard.js
packages/frontend/app/routes/pending-user-updates.js
packages/frontend/app/services/reporting.js
packages/frontend/app/utils/clone-learner-group.js
packages/frontend/tests/integration/components/new-user-test.js
packages/frontend/tests/integration/components/program-year/list-test.js
packages/frontend/tests/integration/components/school-list-test.js
packages/frontend/tests/integration/components/school-new-vocabulary-form-test.js
packages/ilios-common/addon/classes/events-base.js
packages/ilios-common/addon/components/course/collapsed-objectives.js
packages/ilios-common/addon/components/course/objective-list-item.js
packages/ilios-common/addon/components/course/objective-list.js
packages/ilios-common/addon/components/course/visualize-instructor.js
packages/ilios-common/addon/components/course/visualize-instructor-session-type-graph.js
packages/ilios-common/addon/components/course/visualize-instructors-graph.js
packages/ilios-common/addon/components/course/visualize-instructor-term-graph.js
packages/ilios-common/addon/components/course/visualize-objectives-graph.js
packages/ilios-common/addon/components/course/visualize-session-type-graph.js
packages/ilios-common/addon/components/course/visualize-session-types-graph.js
packages/ilios-common/addon/components/course/visualize-vocabularies-graph.js
packages/ilios-common/addon/components/course/visualize-vocabulary-graph.js
packages/ilios-common/addon/components/dashboard/calendar-filters.js
packages/ilios-common/addon/components/dashboard/calendar.js
packages/ilios-common/addon/components/dashboard/courses-calendar-filter.js
packages/ilios-common/addon/components/dashboard/selected-term-tree.js
packages/ilios-common/addon/components/detail-cohort-list.js
packages/ilios-common/addon/components/detail-cohort-manager.js
packages/ilios-common/addon/components/detail-cohorts.js
packages/ilios-common/addon/components/detail-instructors.js
packages/ilios-common/addon/components/detail-learnergroups-list.js
packages/ilios-common/addon/components/detail-learners-and-learner-groups.js
packages/ilios-common/addon/components/detail-learning-materials-item.js
packages/ilios-common/addon/components/detail-learning-materials.js
packages/ilios-common/addon/components/detail-mesh.js
packages/ilios-common/addon/components/detail-taxonomies.js
packages/ilios-common/addon/components/learnergroup-tree.js
packages/ilios-common/addon/components/learningmaterial-manager.js
packages/ilios-common/addon/components/learningmaterial-search.js
packages/ilios-common/addon/components/learning-materials-sort-manager.js
packages/ilios-common/addon/components/mesh-descriptor-last-tree-number.js
packages/ilios-common/addon/components/mesh-manager.js
packages/ilios-common/addon/components/objective-sort-manager.js
packages/ilios-common/addon/components/offering-calendar.js
packages/ilios-common/addon/components/offering-form.js
packages/ilios-common/addon/components/offering-manager.js
packages/ilios-common/addon/components/print-course.js
packages/ilios-common/addon/components/selectable-terms-list.js
packages/ilios-common/addon/components/session-copy.js
packages/ilios-common/addon/components/session/objective-list-item.js
packages/ilios-common/addon/components/session-offerings-list.js
packages/ilios-common/addon/components/session-offerings-time-block-offerings.js
packages/ilios-common/addon/components/session-overview.js
packages/ilios-common/addon/components/sessions-grid.js
packages/ilios-common/addon/components/sessions-grid-offering-table.js
packages/ilios-common/addon/components/sessions-grid-offering-table-offerings.js
packages/ilios-common/addon/helpers/sort-by.js
packages/ilios-common/addon/helpers/sort-by-position.js
packages/ilios-common/addon/models/course.js
packages/ilios-common/addon/models/course-objective.js
packages/ilios-common/addon/models/curriculum-inventory-report.js
packages/ilios-common/addon/models/curriculum-inventory-sequence-block.js
packages/ilios-common/addon/models/ilm-session.js
packages/ilios-common/addon/models/learner-group.js
packages/ilios-common/addon/models/offering.js
packages/ilios-common/addon/models/program-year.js
packages/ilios-common/addon/models/session.js
packages/ilios-common/addon/models/term.js
packages/ilios-common/addon/models/user.js
packages/ilios-common/addon/models/vocabulary.js
packages/ilios-common/addon/routes/course-visualize-instructor.js
packages/ilios-common/addon/routes/course-visualize-instructors.js
packages/ilios-common/addon/routes/course-visualize-objectives.js
packages/ilios-common/addon/routes/course-visualize-session-type.js
packages/ilios-common/addon/routes/course-visualize-session-types.js
packages/ilios-common/addon/routes/course-visualize-term.js
packages/ilios-common/addon/routes/course-visualize-vocabularies.js
packages/ilios-common/addon/routes/course-visualize-vocabulary.js
packages/ilios-common/addon/utils/array-helpers.js
packages/test-app/tests/integration/components/dashboard/week-test.js
packages/test-app/tests/integration/components/leadership-manager-test.js
packages/test-app/tests/integration/components/user-search-test.js
packages/test-app/tests/integration/components/week-glance-test.js
packages/test-app/tests/unit/models/curriculum-inventory-sequence-block-test.js

@michaelchadwick
Copy link
Contributor

This looks like something I can help out on, so I will start attacking a chunk here or there.

@michaelchadwick michaelchadwick self-assigned this Aug 20, 2024
@stopfstedt stopfstedt changed the title stop slicing ember-data model collections [meta] stop slicing ember-data model collections Aug 20, 2024
@michaelchadwick
Copy link
Contributor

FYI, I'm working on a PR that would remove all the pertinent .slice()s from any root-level components (i.e. not in components/**) in packages/frontend.

@stopfstedt
Copy link
Member Author

and i'm de-slicing our models.

@michaelchadwick
Copy link
Contributor

michaelchadwick commented Aug 23, 2024

131 -> 104:

packages/frontend/app/components/courses/root.js
packages/frontend/app/components/curriculum-inventory/new-sequence-block.js
packages/frontend/app/components/curriculum-inventory/report-rollover.js
packages/frontend/app/components/curriculum-inventory/reports.js
packages/frontend/app/components/curriculum-inventory/sequence-block-overview.js
packages/frontend/app/components/curriculum-inventory/sequence-block-session-manager.js
packages/frontend/app/components/global-search-box.js
packages/frontend/app/components/instructor-group/users.js
packages/frontend/app/components/instructor-groups/list.js
packages/frontend/app/components/instructor-groups/root.js
packages/frontend/app/components/learner-group/bulk-assignment.js
packages/frontend/app/components/learner-group/calendar.js
packages/frontend/app/components/learner-group/instructor-manager.js
packages/frontend/app/components/learner-group/list-item.js
packages/frontend/app/components/learner-group/root.js
packages/frontend/app/components/learner-group/upload-data.js
packages/frontend/app/components/learner-groups/root.js
packages/frontend/app/components/new-directory-user.js
packages/frontend/app/components/program-year/competencies.js
packages/frontend/app/components/program-year/list.js
packages/frontend/app/components/program-year/managed-competency-list-item.js
packages/frontend/app/components/program-year/new.js
packages/frontend/app/components/program-year/objective-list-item-expanded.js
packages/frontend/app/components/program-year/objective-list-item.js
packages/frontend/app/components/program-year/objective-list.js
packages/frontend/app/components/program-year/objectives.js
packages/frontend/app/components/reports/new-subject.js
packages/frontend/app/components/reports/subject/new/course.js
packages/frontend/app/components/reports/subject/new/session.js
packages/frontend/app/components/school/visualizer-session-type-vocabularies.js
packages/frontend/app/components/school/visualizer-session-type-vocabulary.js
packages/frontend/app/controllers/curriculum-inventory-report/index.js
packages/frontend/app/controllers/pending-user-updates.js
packages/frontend/app/controllers/user.js
packages/frontend/app/routes/admin-dashboard.js
packages/frontend/app/routes/pending-user-updates.js
packages/frontend/app/services/reporting.js
packages/frontend/app/utils/clone-learner-group.js
packages/frontend/tests/integration/components/program-year/list-test.js
packages/frontend/tests/integration/components/school-list-test.js
packages/ilios-common/addon/classes/events-base.js
packages/ilios-common/addon/components/course/collapsed-objectives.js
packages/ilios-common/addon/components/course/objective-list-item.js
packages/ilios-common/addon/components/course/objective-list.js
packages/ilios-common/addon/components/course/visualize-instructor-session-type-graph.js
packages/ilios-common/addon/components/course/visualize-instructor.js
packages/ilios-common/addon/components/course/visualize-objectives-graph.js
packages/ilios-common/addon/components/course/visualize-vocabulary-graph.js
packages/ilios-common/addon/components/dashboard/calendar-filters.js
packages/ilios-common/addon/components/dashboard/calendar.js
packages/ilios-common/addon/components/dashboard/courses-calendar-filter.js
packages/ilios-common/addon/components/dashboard/selected-term-tree.js
packages/ilios-common/addon/components/detail-cohort-list.js
packages/ilios-common/addon/components/detail-cohort-manager.js
packages/ilios-common/addon/components/detail-cohorts.js
packages/ilios-common/addon/components/detail-instructors.js
packages/ilios-common/addon/components/detail-learnergroups-list.js
packages/ilios-common/addon/components/detail-learners-and-learner-groups.js
packages/ilios-common/addon/components/detail-learning-materials-item.js
packages/ilios-common/addon/components/detail-learning-materials.js
packages/ilios-common/addon/components/detail-mesh.js
packages/ilios-common/addon/components/detail-taxonomies.js
packages/ilios-common/addon/components/learning-materials-sort-manager.js
packages/ilios-common/addon/components/learningmaterial-manager.js
packages/ilios-common/addon/components/learningmaterial-search.js
packages/ilios-common/addon/components/mesh-descriptor-last-tree-number.js
packages/ilios-common/addon/components/mesh-manager.js
packages/ilios-common/addon/components/objective-sort-manager.js
packages/ilios-common/addon/components/offering-calendar.js
packages/ilios-common/addon/components/offering-form.js
packages/ilios-common/addon/components/offering-manager.js
packages/ilios-common/addon/components/print-course.js
packages/ilios-common/addon/components/selectable-terms-list.js
packages/ilios-common/addon/components/session-copy.js
packages/ilios-common/addon/components/session-offerings-list.js
packages/ilios-common/addon/components/session-offerings-time-block-offerings.js
packages/ilios-common/addon/components/session-overview.js
packages/ilios-common/addon/components/session/objective-list-item.js
packages/ilios-common/addon/components/sessions-grid-offering-table-offerings.js
packages/ilios-common/addon/components/sessions-grid-offering-table.js
packages/ilios-common/addon/components/sessions-grid.js
packages/ilios-common/addon/helpers/sort-by-position.js
packages/ilios-common/addon/helpers/sort-by.js
packages/ilios-common/addon/models/course-objective.js
packages/ilios-common/addon/models/course.js
packages/ilios-common/addon/models/curriculum-inventory-report.js
packages/ilios-common/addon/models/curriculum-inventory-sequence-block.js
packages/ilios-common/addon/models/learner-group.js
packages/ilios-common/addon/models/offering.js
packages/ilios-common/addon/models/session.js
packages/ilios-common/addon/routes/course-visualize-instructor.js
packages/ilios-common/addon/routes/course-visualize-instructors.js
packages/ilios-common/addon/routes/course-visualize-objectives.js
packages/ilios-common/addon/routes/course-visualize-session-type.js
packages/ilios-common/addon/routes/course-visualize-session-types.js
packages/ilios-common/addon/routes/course-visualize-term.js
packages/ilios-common/addon/routes/course-visualize-vocabularies.js
packages/ilios-common/addon/routes/course-visualize-vocabulary.js
packages/ilios-common/addon/utils/array-helpers.js
packages/test-app/tests/integration/components/dashboard/week-test.js
packages/test-app/tests/integration/components/leadership-manager-test.js
packages/test-app/tests/integration/components/user-search-test.js
packages/test-app/tests/integration/components/week-glance-test.js
packages/test-app/tests/unit/models/curriculum-inventory-sequence-block-test.js

@michaelchadwick
Copy link
Contributor

@stopfstedt I'm going to try tackling the frontend component that are in subdirs next.

@michaelchadwick
Copy link
Contributor

michaelchadwick commented Sep 3, 2024

104 -> 79:

packages/frontend/app/components/courses/root.js
packages/frontend/app/components/global-search-box.js
packages/frontend/app/components/instructor-groups/list.js
packages/frontend/app/components/new-directory-user.js
packages/frontend/app/components/program-year/objective-list.js
packages/frontend/app/components/reports/subject/new/course.js
packages/frontend/app/components/reports/subject/new/session.js
packages/frontend/app/controllers/curriculum-inventory-report/index.js
packages/frontend/app/controllers/pending-user-updates.js
packages/frontend/app/controllers/user.js
packages/frontend/app/routes/admin-dashboard.js
packages/frontend/app/routes/pending-user-updates.js
packages/frontend/app/services/reporting.js
packages/frontend/app/utils/clone-learner-group.js
packages/frontend/tests/integration/components/program-year/list-test.js
packages/ilios-common/addon/classes/events-base.js
packages/ilios-common/addon/components/course/collapsed-objectives.js
packages/ilios-common/addon/components/course/objective-list-item.js
packages/ilios-common/addon/components/course/objective-list.js
packages/ilios-common/addon/components/course/visualize-instructor-session-type-graph.js
packages/ilios-common/addon/components/course/visualize-instructor.js
packages/ilios-common/addon/components/course/visualize-objectives-graph.js
packages/ilios-common/addon/components/course/visualize-vocabulary-graph.js
packages/ilios-common/addon/components/dashboard/calendar-filters.js
packages/ilios-common/addon/components/dashboard/calendar.js
packages/ilios-common/addon/components/dashboard/courses-calendar-filter.js
packages/ilios-common/addon/components/dashboard/selected-term-tree.js
packages/ilios-common/addon/components/detail-cohort-list.js
packages/ilios-common/addon/components/detail-cohort-manager.js
packages/ilios-common/addon/components/detail-cohorts.js
packages/ilios-common/addon/components/detail-instructors.js
packages/ilios-common/addon/components/detail-learnergroups-list.js
packages/ilios-common/addon/components/detail-learners-and-learner-groups.js
packages/ilios-common/addon/components/detail-learning-materials-item.js
packages/ilios-common/addon/components/detail-learning-materials.js
packages/ilios-common/addon/components/detail-mesh.js
packages/ilios-common/addon/components/detail-taxonomies.js
packages/ilios-common/addon/components/learning-materials-sort-manager.js
packages/ilios-common/addon/components/learningmaterial-manager.js
packages/ilios-common/addon/components/learningmaterial-search.js
packages/ilios-common/addon/components/mesh-descriptor-last-tree-number.js
packages/ilios-common/addon/components/mesh-manager.js
packages/ilios-common/addon/components/objective-sort-manager.js
packages/ilios-common/addon/components/offering-calendar.js
packages/ilios-common/addon/components/offering-form.js
packages/ilios-common/addon/components/offering-manager.js
packages/ilios-common/addon/components/print-course.js
packages/ilios-common/addon/components/selectable-terms-list.js
packages/ilios-common/addon/components/session-copy.js
packages/ilios-common/addon/components/session-offerings-list.js
packages/ilios-common/addon/components/session-offerings-time-block-offerings.js
packages/ilios-common/addon/components/session-overview.js
packages/ilios-common/addon/components/session/objective-list-item.js
packages/ilios-common/addon/components/sessions-grid-offering-table-offerings.js
packages/ilios-common/addon/components/sessions-grid-offering-table.js
packages/ilios-common/addon/components/sessions-grid.js
packages/ilios-common/addon/helpers/sort-by-position.js
packages/ilios-common/addon/helpers/sort-by.js
packages/ilios-common/addon/models/course-objective.js
packages/ilios-common/addon/models/course.js
packages/ilios-common/addon/models/curriculum-inventory-report.js
packages/ilios-common/addon/models/curriculum-inventory-sequence-block.js
packages/ilios-common/addon/models/learner-group.js
packages/ilios-common/addon/models/offering.js
packages/ilios-common/addon/models/session.js
packages/ilios-common/addon/routes/course-visualize-instructor.js
packages/ilios-common/addon/routes/course-visualize-instructors.js
packages/ilios-common/addon/routes/course-visualize-objectives.js
packages/ilios-common/addon/routes/course-visualize-session-type.js
packages/ilios-common/addon/routes/course-visualize-session-types.js
packages/ilios-common/addon/routes/course-visualize-term.js
packages/ilios-common/addon/routes/course-visualize-vocabularies.js
packages/ilios-common/addon/routes/course-visualize-vocabulary.js
packages/ilios-common/addon/utils/array-helpers.js
packages/test-app/tests/integration/components/dashboard/week-test.js
packages/test-app/tests/integration/components/leadership-manager-test.js
packages/test-app/tests/integration/components/user-search-test.js
packages/test-app/tests/integration/components/week-glance-test.js
packages/test-app/tests/unit/models/curriculum-inventory-sequence-block-test.js

@michaelchadwick
Copy link
Contributor

79 -> 37:

packages/frontend/app/components/courses/root.js
packages/frontend/app/components/global-search-box.js
packages/frontend/app/components/instructor-groups/list.js
packages/frontend/app/components/new-directory-user.js
packages/frontend/app/components/program-year/objective-list.js
packages/frontend/app/components/reports/subject/new/course.js
packages/frontend/app/components/reports/subject/new/session.js
packages/frontend/app/controllers/curriculum-inventory-report/index.js
packages/frontend/app/controllers/pending-user-updates.js
packages/frontend/app/controllers/user.js
packages/frontend/app/routes/admin-dashboard.js
packages/frontend/app/routes/pending-user-updates.js
packages/frontend/app/services/reporting.js
packages/frontend/app/utils/clone-learner-group.js
packages/frontend/tests/integration/components/program-year/list-test.js
packages/ilios-common/addon/components/course/objective-list.js
packages/ilios-common/addon/components/detail-learning-materials.js
packages/ilios-common/addon/components/learning-materials-sort-manager.js
packages/ilios-common/addon/components/mesh-descriptor-last-tree-number.js
packages/ilios-common/addon/components/mesh-manager.js
packages/ilios-common/addon/components/objective-sort-manager.js
packages/ilios-common/addon/components/offering-manager.js
packages/ilios-common/addon/components/print-course.js
packages/ilios-common/addon/components/session-copy.js
packages/ilios-common/addon/components/session-offerings-time-block-offerings.js
packages/ilios-common/addon/components/sessions-grid-offering-table-offerings.js
packages/ilios-common/addon/helpers/sort-by-position.js
packages/ilios-common/addon/helpers/sort-by.js
packages/ilios-common/addon/models/course-objective.js
packages/ilios-common/addon/models/course.js
packages/ilios-common/addon/models/session.js
packages/ilios-common/addon/utils/array-helpers.js
packages/test-app/tests/integration/components/dashboard/week-test.js
packages/test-app/tests/integration/components/leadership-manager-test.js
packages/test-app/tests/integration/components/user-search-test.js
packages/test-app/tests/integration/components/week-glance-test.js
packages/test-app/tests/unit/models/curriculum-inventory-sequence-block-test.js

@michaelchadwick
Copy link
Contributor

37 -> 29:

packages/frontend/app/components/courses/root.js
packages/frontend/app/components/global-search-box.js
packages/frontend/app/components/instructor-groups/list.js
packages/frontend/app/components/new-directory-user.js
packages/frontend/app/components/program-year/objective-list.js
packages/frontend/app/components/reports/subject/new/course.js
packages/frontend/app/components/reports/subject/new/session.js
packages/frontend/app/components/reports/subject/session.js
packages/frontend/app/controllers/curriculum-inventory-report/index.js
packages/frontend/tests/integration/components/program-year/list-test.js
packages/ilios-common/addon/components/course/objective-list.js
packages/ilios-common/addon/components/detail-learning-materials.js
packages/ilios-common/addon/components/learning-materials-sort-manager.js
packages/ilios-common/addon/components/learningmaterial-search.js
packages/ilios-common/addon/components/mesh-descriptor-last-tree-number.js
packages/ilios-common/addon/components/mesh-manager.js
packages/ilios-common/addon/components/objective-sort-manager.js
packages/ilios-common/addon/components/offering-manager.js
packages/ilios-common/addon/components/print-course.js
packages/ilios-common/addon/components/session-copy.js
packages/ilios-common/addon/components/session-offerings-time-block-offerings.js
packages/ilios-common/addon/components/sessions-grid-offering-table-offerings.js
packages/ilios-common/addon/helpers/sort-by-position.js
packages/ilios-common/addon/helpers/sort-by.js
packages/ilios-common/addon/models/course-objective.js
packages/ilios-common/addon/models/course.js
packages/ilios-common/addon/models/session.js
packages/ilios-common/addon/utils/array-helpers.js
packages/test-app/tests/integration/components/user-search-test.js

@michaelchadwick
Copy link
Contributor

@stopfstedt not sure if the rest of these can/should be removed. Will need to do more investigation.

@stopfstedt
Copy link
Member Author

@stopfstedt not sure if the rest of these can/should be removed. Will need to do more investigation.

below 30! nice. i'll make a pass over the remainder tomorrow and see if/where slicing is actually still needed. will report back here.

@michaelchadwick
Copy link
Contributor

@stopfstedt is this issue resolved?

@stopfstedt
Copy link
Member Author

@michaelchadwick i think we're almost there.

current state of affairs

$  grep -lr '\.slice()' packages/ | egrep -v '(dist|node_modules|coverage)' | sort
packages/frontend/app/components/courses/root.js
packages/frontend/app/components/global-search-box.js
packages/frontend/app/components/instructor-groups/list.js
packages/frontend/app/components/new-directory-user.js
packages/frontend/app/components/program-year/objective-list.js
packages/frontend/app/components/reports/subject/new/course.js
packages/frontend/app/components/reports/subject/new/session.js
packages/frontend/tests/integration/components/program-year/list-test.js
packages/ilios-common/addon/components/course/objective-list.js
packages/ilios-common/addon/components/detail-learning-materials.js
packages/ilios-common/addon/components/learningmaterial-search.js
packages/ilios-common/addon/components/learning-materials-sort-manager.js
packages/ilios-common/addon/components/mesh-descriptor-last-tree-number.js
packages/ilios-common/addon/components/mesh-manager.js
packages/ilios-common/addon/components/objective-sort-manager.js
packages/ilios-common/addon/components/offering-manager.js
packages/ilios-common/addon/components/print-course.js
packages/ilios-common/addon/components/session-copy.js
packages/ilios-common/addon/components/session-offerings-time-block-offerings.js
packages/ilios-common/addon/components/sessions-grid-offering-table-offerings.js
packages/ilios-common/addon/helpers/sort-by.js
packages/ilios-common/addon/helpers/sort-by-position.js
packages/ilios-common/addon/models/course.js
packages/ilios-common/addon/models/course-objective.js
packages/ilios-common/addon/models/session.js
packages/ilios-common/addon/utils/array-helpers.js
packages/test-app/tests/integration/components/user-search-test.js

just de-sliced packages/test-app/tests/integration/components/user-search-test.js, that's the last one i can see that needs treatment here.

@stopfstedt
Copy link
Member Author

and we're done with this, for now.

final list of calls to slice() remaining

stefan@nichtsnutz: ~/dev/projects/frontend on master[$]
$ grep -lr '\.slice()' packages/ | egrep -v '(dist|node_modules|coverage)' | sort
packages/frontend/app/components/courses/root.js
packages/frontend/app/components/global-search-box.js
packages/frontend/app/components/instructor-groups/list.js
packages/frontend/app/components/new-directory-user.js
packages/frontend/app/components/program-year/objective-list.js
packages/frontend/app/components/reports/subject/new/course.js
packages/frontend/app/components/reports/subject/new/session.js
packages/frontend/tests/integration/components/program-year/list-test.js
packages/ilios-common/addon/components/course/objective-list.js
packages/ilios-common/addon/components/detail-learning-materials.js
packages/ilios-common/addon/components/learningmaterial-search.js
packages/ilios-common/addon/components/learning-materials-sort-manager.js
packages/ilios-common/addon/components/mesh-descriptor-last-tree-number.js
packages/ilios-common/addon/components/mesh-manager.js
packages/ilios-common/addon/components/objective-sort-manager.js
packages/ilios-common/addon/components/offering-manager.js
packages/ilios-common/addon/components/print-course.js
packages/ilios-common/addon/components/session-copy.js
packages/ilios-common/addon/components/session-offerings-time-block-offerings.js
packages/ilios-common/addon/components/sessions-grid-offering-table-offerings.js
packages/ilios-common/addon/helpers/sort-by.js
packages/ilios-common/addon/helpers/sort-by-position.js
packages/ilios-common/addon/models/course.js
packages/ilios-common/addon/models/course-objective.js
packages/ilios-common/addon/models/session.js
packages/ilios-common/addon/utils/array-helpers.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants