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

Tracker: split "edit issue" dialog to preview / edit #1731

Merged
merged 19 commits into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/panel/src/components/Panel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@
export let object: Doc
export let panelWidth: number = 0
export let innerWidth: number = 0
export let isTitle: boolean = true
export let isHeader: boolean = true
export let isSub: boolean = true
export let isAside: boolean = true
export let isCustomAttr: boolean = true
</script>

<Panel bind:isAside isHeader={$$slots.header || isHeader} bind:panelWidth bind:innerWidth on:close>
<Panel bind:isAside {isTitle} isHeader={$$slots.header || isHeader} bind:panelWidth bind:innerWidth on:close>
<svelte:fragment slot="title">
<div class="popupPanel-title__content-container antiTitle">
{#if $$slots.navigator}
Expand Down Expand Up @@ -97,7 +98,9 @@
</svelte:fragment>

{#if withoutActivity}
<slot />
<div class="popupPanel-body__main-content py-10 clear-mins">
Copy link
Member

Choose a reason for hiding this comment

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

Why we need this one by default?

Copy link
Author

Choose a reason for hiding this comment

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

Removed.

<slot />
</div>
{:else}
<Scroller>
<div class="popupPanel-body__main-content py-10 clear-mins">
Expand Down
53 changes: 28 additions & 25 deletions packages/ui/src/components/Panel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

export let innerWidth: number = 0
export let panelWidth: number = 0
export let isTitle: boolean = true
export let isHeader: boolean = true
export let isAside: boolean = true

Expand All @@ -33,32 +34,34 @@
</script>

<div class="popupPanel" bind:clientWidth={panelWidth}>
<div class="popupPanel-title">
<Button
icon={IconClose}
kind={'transparent'}
size={'medium'}
on:click={() => {
dispatch('close')
}}
/>
<div class="popupPanel-title__content"><slot name="title" /></div>
<div class="buttons-group xsmall-gap">
<slot name="utils" />
{#if asideFloat && $$slots.aside && isAside}
{#if $$slots.utils}<div class="buttons-divider" />{/if}
<Button
icon={IconDetails}
kind={'transparent'}
size={'medium'}
selected={asideShown}
on:click={() => {
asideShown = !asideShown
}}
/>
{/if}
{#if isTitle}
Copy link
Member

Choose a reason for hiding this comment

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

I personally think we should have same header for both modes. So edit mode for us should just switch between title/description editor and not touch right part with status components.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

<div class="popupPanel-title">
<Button
icon={IconClose}
kind={'transparent'}
size={'medium'}
on:click={() => {
dispatch('close')
}}
/>
<div class="popupPanel-title__content"><slot name="title" /></div>
<div class="buttons-group xsmall-gap">
<slot name="utils" />
{#if asideFloat && $$slots.aside && isAside}
{#if $$slots.utils}<div class="buttons-divider" />{/if}
<Button
icon={IconDetails}
kind={'transparent'}
size={'medium'}
selected={asideShown}
on:click={() => {
asideShown = !asideShown
}}
/>
{/if}
</div>
</div>
</div>
{/if}
<div class="popupPanel-body" class:asideShown>
<div class="popupPanel-body__main" bind:clientWidth={innerWidth}>
{#if $$slots.header && isHeader}
Expand Down
5 changes: 4 additions & 1 deletion plugins/tracker-assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"PastMonth": "Past month",
"CopyIssueUrl": "Copy Issue URL to clipboard",
"CopyIssueId": "Copy Issue ID to clipboard",
"CopyIssueBranch": "Copy Git branch name to clipboard",

"GotoIssues": "Go to issues",
"GotoActive": "Go to active issues",
Expand All @@ -109,7 +110,9 @@
"FilterIs": "is",
"FilterIsNot": "is not",
"FilterIsEither": "is either of",
"FilterStatesCount": "{value, plural, =1 {1 state} other {# states}}"
"FilterStatesCount": "{value, plural, =1 {1 state} other {# states}}",

"EditIssue": "Edit {title}"
},
"status": {}
}
4 changes: 3 additions & 1 deletion plugins/tracker-assets/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@
"GotoBacklog": "Перейти к пулу задач",
"GotoBoard": "Перейти к канбану",
"GotoProjects": "Перейти к проекту",
"GotoTrackerApplication": "Перейти к приложению Трекер"
"GotoTrackerApplication": "Перейти к приложению Трекер",

"EditIssue": "Редактирование {title}"
},
"status": {}
}
3 changes: 2 additions & 1 deletion plugins/tracker-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@anticrm/view-resources": "~0.6.0",
"@anticrm/text-editor": "~0.6.0",
"@anticrm/panel": "~0.6.0",
"@anticrm/kanban": "~0.6.0"
"@anticrm/kanban": "~0.6.0",
"@anticrm/attachment-resources": "~0.6.0"
}
}
Loading