Skip to content

Commit

Permalink
Tweak argument name
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdaley committed Oct 5, 2023
1 parent 54518d7 commit a6009d1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion web/app/components/custom-editable-field.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
@onChange={{if this.typeIsPeople this.onPeopleSelectChange}}
@onSave={{if this.typeIsPeople this.onPeopleSave @onSave}}
@isSaving={{@isSaving}}
@disabled={{@disabled}}
@isReadOnly={{@disabled}}
/>
</div>
8 changes: 4 additions & 4 deletions web/app/components/document/sidebar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
@value={{this.title}}
@onSave={{this.saveTitle}}
@isSaving={{this.saveIsRunning}}
@disabled={{not this.isOwner}}
@isReadOnly={{not this.isOwner}}
@isRequired={{true}}
@name="title"
@tag="h1"
Expand All @@ -127,7 +127,7 @@
@value={{this.summary}}
@onSave={{this.saveSummary}}
@isSaving={{this.saveIsRunning}}
@disabled={{not this.isOwner}}
@isReadOnly={{not this.isOwner}}
@name="summary"
@placeholder="Enter a summary"
/>
Expand Down Expand Up @@ -200,7 +200,7 @@
@onChange={{this.updateContributors}}
@onSave={{perform this.save "contributors"}}
@isSaving={{this.saveIsRunning}}
@disabled={{not this.isOwner}}
@isReadOnly={{not this.isOwner}}
/>
</div>
</div>
Expand All @@ -216,7 +216,7 @@
@onChange={{this.updateApprovers}}
@onSave={{perform this.save "approvers"}}
@isSaving={{this.saveIsRunning}}
@disabled={{this.editingIsDisabled}}
@isReadOnly={{this.editingIsDisabled}}
{{! Provide the document to the `has-approved-doc` helper }}
@document={{@document}}
/>
Expand Down
4 changes: 2 additions & 2 deletions web/app/components/editable-field.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<FlightIcon @name="loading" />
</div>
{{/if}}
{{#if (or @disabled @isSaving)}}
{{#if (or @isReadOnly @isSaving)}}
<div class="field-toggle">
<EditableField::ReadValue
@tag={{@tag}}
Expand All @@ -92,7 +92,7 @@
@document={{@document}}
@placeholder={{@placeholder}}
/>
{{#unless @disabled}}
{{#unless @isReadOnly}}
<span class="edit-affordance gray">
<FlightIcon @name="edit" class="text-color-foreground-faint" />
</span>
Expand Down
2 changes: 1 addition & 1 deletion web/app/components/editable-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface EditableFieldComponentSignature {
onSave: any; // TODO: type this
onChange?: (value: any) => void; // TODO: type this
isSaving?: boolean;
disabled?: boolean;
isReadOnly?: boolean;
isRequired?: boolean;
name?: string;
placeholder?: string;
Expand Down
2 changes: 1 addition & 1 deletion web/tests/integration/components/editable-field-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ module("Integration | Component | editable-field", function (hooks) {
<EditableField
@value="foo"
@onSave={{this.onCommit}}
@disabled={{this.disabled}}
@isReadOnly={{this.disabled}}
/>
`);

Expand Down
1 change: 0 additions & 1 deletion web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"tests/**/*",
"types/**/*",
"node_modules/@gavant/glint-template-types/types/ember-animated/*",
"node_modules/@gavant/glint-template-types/types/ember-click-outside/modifier.d.ts",
"node_modules/@gavant/glint-template-types/types/ember-concurrency/perform.d.ts",
"node_modules/@gavant/glint-template-types/types/ember-on-helper/on-document.d.ts",
"node_modules/@gavant/glint-template-types/types/ember-render-modifiers/*",
Expand Down
2 changes: 0 additions & 2 deletions web/types/glint/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import AnimatedValue from "ember-animated/components/animated-value";
import AnimatedOrphans from "ember-animated/components/animated-orphans";
import { AnimatedIfCurly } from "ember-animated/components/animated-if";
import { FlashMessageComponent } from "ember-cli-flash/flash-message";
import OnClickOutsideModifier from "ember-click-outside/modifiers/on-click-outside";
import { HdsFormErrorComponent } from "hds/form/error";
import PowerSelectMultiple from "ember-power-select/components/power-select-multiple";

Expand All @@ -50,7 +49,6 @@ declare module "@glint/environment-ember-loose/registry" {
"did-insert": typeof DidInsertModifier;
"will-destroy": typeof WillDestroyModifier;
"on-document": typeof OnDocumentHelper;
"click-outside": typeof OnClickOutsideModifier;
"set-body-class": typeof EmberSetBodyClassHelper;
AnimatedContainer: typeof AnimatedContainer;
AnimatedValue: typeof AnimatedValue;
Expand Down

0 comments on commit a6009d1

Please sign in to comment.