Skip to content

DEV: Clean up after #677 #694

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

Merged
merged 1 commit into from
Jun 27, 2024
Merged

DEV: Clean up after #677 #694

merged 1 commit into from
Jun 27, 2024

Conversation

CvX
Copy link
Contributor

@CvX CvX commented Jun 27, 2024

Follow up to b863ddc

Ruby:

  • Validate summary (the column is not null)
  • Fix name validation (the column has max_length 100)
  • Fix table annotations
  • Accept missing parameter attributes (required, enum, enum_values`)

JS:

  • Use native classes
  • Don't use ember's array extensions
  • Add explicit service injections
  • Correct class names
  • Use ||= operator
  • Use store service to create records
  • Remove unused service injections
  • Extract consts
  • Group actions together
  • Use async/await
  • Use withEventValue
  • Sort html attributes
  • Use DButtons @label arg
  • Use input elements instead of Ember's Input component (same w/ textarea)
  • Remove btn-default class (automatically applied by DButton)
  • Don't mix I18n.t and i18n in the same template
  • Don't track props that aren't used in a template
  • Correct invalid target.value code
  • Remove unused/invalid this.parameter/onChange code
  • Whitespace
  • Use the new service import inject as service -> service
  • Use Object.entries()
  • Add missing i18n strings
  • Fix an error in addEnumValue (calling pushObject on undefined)
  • Use TrackedArray/TrackedObject
  • Transform tool parameters keys (enumValues -> enum_values)

Follow up to b863ddc

Ruby:
* Validate `summary` (the column is `not null`)
* Fix `name` validation (the column has `max_length` 100)
* Fix table annotations
* Accept missing `parameter` attributes (`required, `enum`, `enum_values`)

JS:
* Use native classes
* Don't use ember's array extensions
* Add explicit service injections
* Correct class names
* Use `||=` operator
* Use `store` service to create records
* Remove unused service injections
* Extract consts
* Group actions together
* Use `async`/`await`
* Use `withEventValue`
* Sort html attributes
* Use DButtons `@label` arg
* Use `input` elements instead of Ember's `Input` component (same w/ textarea)
* Remove `btn-default` class (automatically applied by DButton)
* Don't mix `I18n.t` and `i18n` in the same template
* Don't track props that aren't used in a template
* Correct invalid `target.value` code
* Remove unused/invalid `this.parameter`/`onChange` code
* Whitespace
* Use the new service import `inject as service` -> `service`
* Use `Object.entries()`
* Add missing i18n strings
* Fix an error in `addEnumValue` (calling `pushObject` on `undefined`)
* Use `TrackedArray`/`TrackedObject`
* Transform tool `parameters` keys (`enumValues` -> `enum_values`)
@CvX CvX marked this pull request as ready for review June 27, 2024 17:44
@CvX CvX requested review from SamSaffron and martin-brennan June 27, 2024 17:44

setupController(controller, model) {
this._super(controller, model);
return allTools.find((tool) => tool.id === id);
Copy link
Member

Choose a reason for hiding this comment

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

@martin-brennan and you need to have a chat :) he keeps pushing me to use findBy ... I don't really care, I do get that find is a fraction of a micro second faster.

@SamSaffron SamSaffron merged commit a5a39dd into main Jun 27, 2024
5 checks passed
@SamSaffron SamSaffron deleted the 0-clean branch June 27, 2024 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants