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

Type Sidebar #206

Merged
merged 2 commits into from
Jun 9, 2023
Merged

Type Sidebar #206

merged 2 commits into from
Jun 9, 2023

Conversation

jeffdaley
Copy link
Contributor

@jeffdaley jeffdaley commented Jun 8, 2023

Adds types to the Sidebar component.

Comment on lines -316 to -368
{{!-- <div class="flex flex-col items-start space-y-2 px-3">
<small class="hds-typography-body-100 hds-foreground-faint">Tags</small>
{{#if this.isOwner}}
<EditableField
@value={{this.tags}}
@onChange={{perform this.save "tags"}}
@loading={{this.save.isRunning}}
>
<:default>
{{#if this.tags.length}}
<ol>
{{#each this.tags as |tag|}}
<li>
<FlightIcon
@name="tag"
@color="var(--token-color-palette-neutral-500)"
/>
{{tag}}
</li>
{{/each}}
</ol>
{{else}}
<em>No tags</em>
{{/if}}
</:default>
<:editing as |F|>
<Inputs::TagSelect
class="multiselect--narrow"
@selected={{this.tags}}
@onChange={{this.updateTags}}
{{click-outside (fn F.update this.tags)}}
/>
</:editing>
</EditableField>
{{else}}
{{#if this.tags.length}}
<ol>
{{#each this.tags as |tag|}}
<li>
<FlightIcon
@name="tag"
@color="var(--token-color-palette-neutral-500)"
/>
{{tag}}
</li>
{{/each}}
</ol>
{{else}}
<em>No tags</em>
{{/if}}
{{/if}}
</div> --}}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's time. (Nothing here we can't easily replicate later if we want to implement tags.)

@jeffdaley jeffdaley marked this pull request as ready for review June 8, 2023 00:59
@jeffdaley jeffdaley requested a review from a team as a code owner June 8, 2023 00:59
Copy link
Collaborator

@jfreda jfreda left a comment

Choose a reason for hiding this comment

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

🙌

appCreated?: boolean;
contributors?: HermesUser[];
approvers?: HermesUser[];
changesRequestedBy?: unknown[]; // TODO: Define this
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should also be HermesUser[]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I'm inferring that it's a string[] like approvedBy:

  get hasRequestedChanges() {
    return this.args.document.changesRequestedBy?.includes(
      this.args.profile.email
    );
  }

@jeffdaley jeffdaley merged commit d5d0d96 into main Jun 9, 2023
@jeffdaley jeffdaley deleted the jeffdaley/type-sidebar branch June 9, 2023 13:55
anuragprafulla pushed a commit to razorpay/hermes that referenced this pull request Jun 27, 2023
* Type sidebar file

* Update document.d.ts
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.

2 participants