From 8e27b449d355bb1a1a6ab8fd80b96c0b7b54190b Mon Sep 17 00:00:00 2001 From: Michael Chadwick Date: Fri, 9 Aug 2024 16:52:33 -0700 Subject: [PATCH 1/4] removed render-modifiers and updated title functions --- .../app/components/curriculum-inventory/report-header.hbs | 2 -- .../app/components/curriculum-inventory/report-header.js | 7 +++---- .../frontend/app/components/instructor-group/header.hbs | 2 -- .../frontend/app/components/instructor-group/header.js | 7 +++---- packages/frontend/app/components/learner-group/header.hbs | 2 -- packages/frontend/app/components/learner-group/header.js | 7 +++---- packages/frontend/app/components/program/header.hbs | 2 -- packages/frontend/app/components/program/header.js | 8 +++----- 8 files changed, 12 insertions(+), 25 deletions(-) diff --git a/packages/frontend/app/components/curriculum-inventory/report-header.hbs b/packages/frontend/app/components/curriculum-inventory/report-header.hbs index 24ff8baeb9..03f716e870 100644 --- a/packages/frontend/app/components/curriculum-inventory/report-header.hbs +++ b/packages/frontend/app/components/curriculum-inventory/report-header.hbs @@ -1,7 +1,5 @@
diff --git a/packages/frontend/app/components/curriculum-inventory/report-header.js b/packages/frontend/app/components/curriculum-inventory/report-header.js index 4bdadc80b5..8355e68926 100644 --- a/packages/frontend/app/components/curriculum-inventory/report-header.js +++ b/packages/frontend/app/components/curriculum-inventory/report-header.js @@ -6,11 +6,10 @@ import { restartableTask } from 'ember-concurrency'; @validatable export default class CurriculumInventoryReportHeaderComponent extends Component { - @NotBlank() @Length(3, 200) @tracked name; + @NotBlank() @Length(3, 200) @tracked name = this.getName(); - @action - load(element, [report]) { - this.name = report?.name; + getName() { + return this.args.report.name; } saveName = restartableTask(async () => { diff --git a/packages/frontend/app/components/instructor-group/header.hbs b/packages/frontend/app/components/instructor-group/header.hbs index c3dc61c780..a2d8aca04d 100644 --- a/packages/frontend/app/components/instructor-group/header.hbs +++ b/packages/frontend/app/components/instructor-group/header.hbs @@ -1,8 +1,6 @@
{{! template-lint-disable no-bare-strings }} diff --git a/packages/frontend/app/components/instructor-group/header.js b/packages/frontend/app/components/instructor-group/header.js index 09f6775f0b..50ffc44d6a 100644 --- a/packages/frontend/app/components/instructor-group/header.js +++ b/packages/frontend/app/components/instructor-group/header.js @@ -8,11 +8,10 @@ import { dropTask } from 'ember-concurrency'; @validatable export default class InstructorGroupHeaderComponent extends Component { @service store; - @tracked @NotBlank() @Length(3, 60) title; + @tracked @NotBlank() @Length(3, 60) title = this.getTitle(); - @action - load() { - this.title = this.args.instructorGroup.title; + getTitle() { + return this.args.instructorGroup.title; } changeTitle = dropTask(async () => { diff --git a/packages/frontend/app/components/learner-group/header.hbs b/packages/frontend/app/components/learner-group/header.hbs index 37d8b129c6..62f30dfec9 100644 --- a/packages/frontend/app/components/learner-group/header.hbs +++ b/packages/frontend/app/components/learner-group/header.hbs @@ -1,8 +1,6 @@
diff --git a/packages/frontend/app/components/learner-group/header.js b/packages/frontend/app/components/learner-group/header.js index d756db6ddb..30b1c8d465 100644 --- a/packages/frontend/app/components/learner-group/header.js +++ b/packages/frontend/app/components/learner-group/header.js @@ -7,7 +7,7 @@ import { TrackedAsyncData } from 'ember-async-data'; @validatable export default class LearnerGroupHeaderComponent extends Component { - @tracked @NotBlank() @Length(3, 60) title; + @tracked @NotBlank() @Length(3, 60) title = this.getTitle(); @cached get upstreamRelationshipsData() { @@ -45,9 +45,8 @@ export default class LearnerGroupHeaderComponent extends Component { return { cohort, programYear, program, school }; } - @action - load() { - this.title = this.args.learnerGroup.title; + getTitle() { + return this.args.learnerGroup.title; } @action diff --git a/packages/frontend/app/components/program/header.hbs b/packages/frontend/app/components/program/header.hbs index 736698abd6..864f49bba3 100644 --- a/packages/frontend/app/components/program/header.hbs +++ b/packages/frontend/app/components/program/header.hbs @@ -1,8 +1,6 @@ {{#let (unique-id) as |id|}}
diff --git a/packages/frontend/app/components/program/header.js b/packages/frontend/app/components/program/header.js index 467e665588..d1d0696707 100644 --- a/packages/frontend/app/components/program/header.js +++ b/packages/frontend/app/components/program/header.js @@ -1,16 +1,14 @@ import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; -import { action } from '@ember/object'; import { validatable, Length, NotBlank } from 'ilios-common/decorators/validation'; import { dropTask } from 'ember-concurrency'; @validatable export default class ProgramHeaderComponent extends Component { - @NotBlank() @Length(3, 200) @tracked title; + @NotBlank() @Length(3, 200) @tracked title = this.getTitle(); - @action - load() { - this.title = this.args.program.title; + getTitle() { + return this.args.program.title; } changeTitle = dropTask(async () => { From cde9fede17f4f752f2e1b328113c01cb09f3cc23 Mon Sep 17 00:00:00 2001 From: Michael Chadwick Date: Fri, 9 Aug 2024 16:53:00 -0700 Subject: [PATCH 2/4] updated lint-todo --- packages/frontend/.lint-todo | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/frontend/.lint-todo b/packages/frontend/.lint-todo index bcb9df80ea..403afc4980 100644 --- a/packages/frontend/.lint-todo +++ b/packages/frontend/.lint-todo @@ -71,3 +71,11 @@ add|ember-template-lint|no-at-ember-render-modifiers|10|6|10|6|d919d2af254f782c0 add|ember-template-lint|no-at-ember-render-modifiers|11|6|11|6|940005188b476a060b0e5d3f05baea24ba178878|1722902400000|1730682000000|1754006400000|app/components/reports/subject/new/session-type.hbs add|ember-template-lint|no-at-ember-render-modifiers|10|6|10|6|d919d2af254f782c01fe2ba15416673e52e91124|1722902400000|1730682000000|1754006400000|app/components/reports/subject/new/term.hbs add|ember-template-lint|no-at-ember-render-modifiers|11|6|11|6|940005188b476a060b0e5d3f05baea24ba178878|1722902400000|1730682000000|1754006400000|app/components/reports/subject/new/term.hbs +remove|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|ec3a02c7de9a846320bb33eb702a742de00e56bd|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/report-header.hbs +remove|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|708f3a1a4359e7d1bd669262535d882c49469947|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/report-header.hbs +remove|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|7312526529ca39ed820819d1478d8e1b8f555279|1722902400000|1730682000000|1754006400000|app/components/instructor-group/header.hbs +remove|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|10c85f1f7f9cf2d05a7f36c4618679ea04c51154|1722902400000|1730682000000|1754006400000|app/components/instructor-group/header.hbs +remove|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|7312526529ca39ed820819d1478d8e1b8f555279|1722902400000|1730682000000|1754006400000|app/components/learner-group/header.hbs +remove|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|c33c821719fcbe918954f20b45e0959a3a40c62b|1722902400000|1730682000000|1754006400000|app/components/learner-group/header.hbs +remove|ember-template-lint|no-at-ember-render-modifiers|4|4|4|4|66fe3cf991d61995cda5f5935874230700b5e21f|1722902400000|1730682000000|1754006400000|app/components/program/header.hbs +remove|ember-template-lint|no-at-ember-render-modifiers|5|4|5|4|0bcfaa7865c6a954a5b5226ffe44ddc6c63945ba|1722902400000|1730682000000|1754006400000|app/components/program/header.hbs From 13ffe8e0de8dc6d1691fa691f7592a85944f807e Mon Sep 17 00:00:00 2001 From: Michael Chadwick Date: Mon, 12 Aug 2024 08:56:42 -0700 Subject: [PATCH 3/4] title now updated using constructor() method --- .../components/curriculum-inventory/report-header.js | 7 ++++--- .../app/components/instructor-group/header.js | 7 ++++--- .../frontend/app/components/learner-group/header.js | 11 ++++++----- packages/frontend/app/components/program/header.js | 7 ++++--- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/packages/frontend/app/components/curriculum-inventory/report-header.js b/packages/frontend/app/components/curriculum-inventory/report-header.js index 8355e68926..2a3f0b1953 100644 --- a/packages/frontend/app/components/curriculum-inventory/report-header.js +++ b/packages/frontend/app/components/curriculum-inventory/report-header.js @@ -6,10 +6,11 @@ import { restartableTask } from 'ember-concurrency'; @validatable export default class CurriculumInventoryReportHeaderComponent extends Component { - @NotBlank() @Length(3, 200) @tracked name = this.getName(); + @NotBlank() @Length(3, 200) @tracked name; - getName() { - return this.args.report.name; + constructor() { + super(...arguments); + this.name = this.args.report.name; } saveName = restartableTask(async () => { diff --git a/packages/frontend/app/components/instructor-group/header.js b/packages/frontend/app/components/instructor-group/header.js index 50ffc44d6a..4a2afa4882 100644 --- a/packages/frontend/app/components/instructor-group/header.js +++ b/packages/frontend/app/components/instructor-group/header.js @@ -8,10 +8,11 @@ import { dropTask } from 'ember-concurrency'; @validatable export default class InstructorGroupHeaderComponent extends Component { @service store; - @tracked @NotBlank() @Length(3, 60) title = this.getTitle(); + @tracked @NotBlank() @Length(3, 60) title; - getTitle() { - return this.args.instructorGroup.title; + constructor() { + super(...arguments); + this.title = this.args.instructorGroup.title; } changeTitle = dropTask(async () => { diff --git a/packages/frontend/app/components/learner-group/header.js b/packages/frontend/app/components/learner-group/header.js index 30b1c8d465..4b20419681 100644 --- a/packages/frontend/app/components/learner-group/header.js +++ b/packages/frontend/app/components/learner-group/header.js @@ -7,7 +7,12 @@ import { TrackedAsyncData } from 'ember-async-data'; @validatable export default class LearnerGroupHeaderComponent extends Component { - @tracked @NotBlank() @Length(3, 60) title = this.getTitle(); + @tracked @NotBlank() @Length(3, 60) title; + + constructor() { + super(...arguments); + this.title = this.args.learnerGroup.title; + } @cached get upstreamRelationshipsData() { @@ -45,10 +50,6 @@ export default class LearnerGroupHeaderComponent extends Component { return { cohort, programYear, program, school }; } - getTitle() { - return this.args.learnerGroup.title; - } - @action revertTitleChanges() { this.title = this.args.learnerGroup.title; diff --git a/packages/frontend/app/components/program/header.js b/packages/frontend/app/components/program/header.js index d1d0696707..8c7faa64a7 100644 --- a/packages/frontend/app/components/program/header.js +++ b/packages/frontend/app/components/program/header.js @@ -5,10 +5,11 @@ import { dropTask } from 'ember-concurrency'; @validatable export default class ProgramHeaderComponent extends Component { - @NotBlank() @Length(3, 200) @tracked title = this.getTitle(); + @NotBlank() @Length(3, 200) @tracked title; - getTitle() { - return this.args.program.title; + constructor() { + super(...arguments); + this.title = this.args.program.title; } changeTitle = dropTask(async () => { From 07239864bb4b0d89102e16f7cb9f163ae19c7e63 Mon Sep 17 00:00:00 2001 From: Michael Chadwick Date: Mon, 12 Aug 2024 08:58:17 -0700 Subject: [PATCH 4/4] removed todos --- packages/frontend/.lint-todo | 16 ---------------- packages/lti-course-manager/.lint-todo | 1 + packages/lti-dashboard/.lint-todo | 1 + packages/test-app/.lint-todo | 1 + 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/packages/frontend/.lint-todo b/packages/frontend/.lint-todo index 403afc4980..6b41a792cf 100644 --- a/packages/frontend/.lint-todo +++ b/packages/frontend/.lint-todo @@ -12,8 +12,6 @@ add|ember-template-lint|no-at-ember-render-modifiers|4|4|4|4|23cd787c79c34a628da add|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|23cd787c79c34a628dadb6e96dd4004d42eebb79|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/new-report.hbs add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|23cd787c79c34a628dadb6e96dd4004d42eebb79|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/new-sequence-block.hbs add|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|77e3831e4ae1b00caee1f808711f2e26ab452a23|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/new-sequence-block.hbs -add|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|ec3a02c7de9a846320bb33eb702a742de00e56bd|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/report-header.hbs -add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|708f3a1a4359e7d1bd669262535d882c49469947|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/report-header.hbs add|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|23cd787c79c34a628dadb6e96dd4004d42eebb79|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/report-overview.hbs add|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|23cd787c79c34a628dadb6e96dd4004d42eebb79|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/report-rollover.hbs add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|5e634ade97cc174a33ee6f2fdce6c42465ec31e3|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/report-rollover.hbs @@ -37,16 +35,10 @@ add|ember-template-lint|no-at-ember-render-modifiers|111|6|111|6|b432d5e6ea21f6b add|ember-template-lint|no-at-ember-render-modifiers|122|6|122|6|7888b1986f039c99dbc62e306f5d5bc34c90ae39|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/verification-preview.hbs add|ember-template-lint|no-at-ember-render-modifiers|133|6|133|6|4d6c3374c9f845e60bda3b640ec49a3be3ee6fbb|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/verification-preview.hbs add|ember-template-lint|no-at-ember-render-modifiers|144|6|144|6|e49fa902e44c371593d62096c490244ec75a9083|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/verification-preview.hbs -add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|7312526529ca39ed820819d1478d8e1b8f555279|1722902400000|1730682000000|1754006400000|app/components/instructor-group/header.hbs -add|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|10c85f1f7f9cf2d05a7f36c4618679ea04c51154|1722902400000|1730682000000|1754006400000|app/components/instructor-group/header.hbs -add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|7312526529ca39ed820819d1478d8e1b8f555279|1722902400000|1730682000000|1754006400000|app/components/learner-group/header.hbs -add|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|c33c821719fcbe918954f20b45e0959a3a40c62b|1722902400000|1730682000000|1754006400000|app/components/learner-group/header.hbs add|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|cb6d7acb9879902b89ad1575846d290a564ffbae|1722902400000|1730682000000|1754006400000|app/components/learner-group/instructor-manager.hbs add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|2bdc98d02ac5ea2a4bd5bac6a0f9e880abafdcbe|1722902400000|1730682000000|1754006400000|app/components/learner-group/instructor-manager.hbs add|ember-template-lint|no-at-ember-render-modifiers|4|4|4|4|170987df2d1e4c134a0ac459fc0bdd8dd91b9929|1722902400000|1730682000000|1754006400000|app/components/learner-group/root.hbs add|ember-template-lint|no-at-ember-render-modifiers|5|4|5|4|7c59a55b95fd159dd99afa6b20e5f05b5b68def0|1722902400000|1730682000000|1754006400000|app/components/learner-group/root.hbs -add|ember-template-lint|no-at-ember-render-modifiers|4|4|4|4|66fe3cf991d61995cda5f5935874230700b5e21f|1722902400000|1730682000000|1754006400000|app/components/program/header.hbs -add|ember-template-lint|no-at-ember-render-modifiers|5|4|5|4|0bcfaa7865c6a954a5b5226ffe44ddc6c63945ba|1722902400000|1730682000000|1754006400000|app/components/program/header.hbs add|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|66fe3cf991d61995cda5f5935874230700b5e21f|1722902400000|1730682000000|1754006400000|app/components/program/overview.hbs add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|0bcfaa7865c6a954a5b5226ffe44ddc6c63945ba|1722902400000|1730682000000|1754006400000|app/components/program/overview.hbs add|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|12f77ac1f8c43640397b771ba2c9830dd2041f23|1722902400000|1730682000000|1754006400000|app/components/program-year/collapsed-objectives.hbs @@ -71,11 +63,3 @@ add|ember-template-lint|no-at-ember-render-modifiers|10|6|10|6|d919d2af254f782c0 add|ember-template-lint|no-at-ember-render-modifiers|11|6|11|6|940005188b476a060b0e5d3f05baea24ba178878|1722902400000|1730682000000|1754006400000|app/components/reports/subject/new/session-type.hbs add|ember-template-lint|no-at-ember-render-modifiers|10|6|10|6|d919d2af254f782c01fe2ba15416673e52e91124|1722902400000|1730682000000|1754006400000|app/components/reports/subject/new/term.hbs add|ember-template-lint|no-at-ember-render-modifiers|11|6|11|6|940005188b476a060b0e5d3f05baea24ba178878|1722902400000|1730682000000|1754006400000|app/components/reports/subject/new/term.hbs -remove|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|ec3a02c7de9a846320bb33eb702a742de00e56bd|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/report-header.hbs -remove|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|708f3a1a4359e7d1bd669262535d882c49469947|1722902400000|1730682000000|1754006400000|app/components/curriculum-inventory/report-header.hbs -remove|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|7312526529ca39ed820819d1478d8e1b8f555279|1722902400000|1730682000000|1754006400000|app/components/instructor-group/header.hbs -remove|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|10c85f1f7f9cf2d05a7f36c4618679ea04c51154|1722902400000|1730682000000|1754006400000|app/components/instructor-group/header.hbs -remove|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|7312526529ca39ed820819d1478d8e1b8f555279|1722902400000|1730682000000|1754006400000|app/components/learner-group/header.hbs -remove|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|c33c821719fcbe918954f20b45e0959a3a40c62b|1722902400000|1730682000000|1754006400000|app/components/learner-group/header.hbs -remove|ember-template-lint|no-at-ember-render-modifiers|4|4|4|4|66fe3cf991d61995cda5f5935874230700b5e21f|1722902400000|1730682000000|1754006400000|app/components/program/header.hbs -remove|ember-template-lint|no-at-ember-render-modifiers|5|4|5|4|0bcfaa7865c6a954a5b5226ffe44ddc6c63945ba|1722902400000|1730682000000|1754006400000|app/components/program/header.hbs diff --git a/packages/lti-course-manager/.lint-todo b/packages/lti-course-manager/.lint-todo index e69de29bb2..8b13789179 100644 --- a/packages/lti-course-manager/.lint-todo +++ b/packages/lti-course-manager/.lint-todo @@ -0,0 +1 @@ + diff --git a/packages/lti-dashboard/.lint-todo b/packages/lti-dashboard/.lint-todo index e69de29bb2..8b13789179 100644 --- a/packages/lti-dashboard/.lint-todo +++ b/packages/lti-dashboard/.lint-todo @@ -0,0 +1 @@ + diff --git a/packages/test-app/.lint-todo b/packages/test-app/.lint-todo index e69de29bb2..8b13789179 100644 --- a/packages/test-app/.lint-todo +++ b/packages/test-app/.lint-todo @@ -0,0 +1 @@ +