-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
@@ -97,7 +98,9 @@ | |||
</svelte:fragment> | |||
|
|||
{#if withoutActivity} | |||
<slot /> | |||
<div class="popupPanel-body__main-content py-10 clear-mins"> |
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.
Why we need this one by default?
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.
Removed.
} | ||
</script> | ||
|
||
{#if direction === 'column'} |
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.
I suppose for now we have only column direction always.
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.
Removed.
}} | ||
/> | ||
{/if} | ||
{#if isTitle} |
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.
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.
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.
Done.
Conclusion:
|
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
Also remove "preview issue" dialog Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
{/if} | ||
|
||
<div class="mt-6" on:click={(ev) => isDescriptionEmpty && edit(ev)}> | ||
<StyledTextBox |
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.
Please use StyledTextBox in case of editing and MessageViewer if not
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.
Done.
<Button disabled={!canSave} label={presentation.string.Save} on:click={save} /> | ||
{:else} | ||
<Button icon={IconEdit} kind="transparent" size="medium" on:click={edit} /> | ||
<Button icon={IconMoreH} kind="transparent" size="medium" /> |
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.
Please do not add useless components for now.
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.
Removed.
@@ -0,0 +1,133 @@ | |||
<!-- |
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.
Why not use DocAttributeBar?
@@ -13,6 +13,10 @@ | |||
export let emphasized = false | |||
export let alwaysEdit = false | |||
export let showButtons = true | |||
export let isEditable = true |
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.
Why we need this style?
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.
Removed.
@@ -13,6 +13,10 @@ | |||
export let emphasized = false | |||
export let alwaysEdit = false | |||
export let showButtons = true | |||
export let isEditable = true | |||
export let isEmpty = false | |||
export let isScrollable = true |
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.
TextBox doesn't assume scrolling. Please make something like StyledTextArea.
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.
Done.
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com> # Conflicts: # plugins/tracker-assets/lang/en.json # plugins/tracker-resources/src/components/issues/EditIssue.svelte # plugins/tracker-resources/src/components/issues/PriorityEditor.svelte # plugins/tracker-resources/src/components/issues/StatusEditor.svelte
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
|
||
const handlePriorityChanged = async (newPriority: IssuePriority | undefined) => { | ||
if (!isEditable || newPriority === undefined || value.priority === newPriority) { | ||
return | ||
} | ||
|
||
await client.update(value, { priority: newPriority }) | ||
dispatch('change', newPriority) |
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.
I suppose we discussed to always update from this kind of editors?
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
refs #1272