-
Notifications
You must be signed in to change notification settings - Fork 99
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
Type Sidebar #206
Conversation
{{!-- <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> --}} | ||
|
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
web/app/types/document.d.ts
Outdated
appCreated?: boolean; | ||
contributors?: HermesUser[]; | ||
approvers?: HermesUser[]; | ||
changesRequestedBy?: unknown[]; // TODO: Define this |
There was a problem hiding this comment.
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[]
There was a problem hiding this comment.
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
);
}
* Type sidebar file * Update document.d.ts
Adds types to the Sidebar component.