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

Conversation

ghost
Copy link

@ghost ghost commented May 12, 2022

refs #1272

Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
@ghost ghost requested a review from haiodo May 12, 2022 12:06
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">
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.

}
</script>

{#if direction === 'column'}
Copy link
Member

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.

Copy link
Author

Choose a reason for hiding this comment

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

Removed.

}}
/>
{/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.

@haiodo
Copy link
Member

haiodo commented May 12, 2022

In Short mode because of header missed button to show edit panel.

image

@haiodo
Copy link
Member

haiodo commented May 12, 2022

Conclusion:

  1. Edit mode should hide Activity and make Description with 100% height.
  2. Properties should be independent from Title/Description edit mode.

Sergei Ogorelkov added 3 commits May 13, 2022 11:25
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>
{/if}

<div class="mt-6" on:click={(ev) => isDescriptionEmpty && edit(ev)}>
<StyledTextBox
Copy link
Member

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

Copy link
Author

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" />
Copy link
Member

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.

Copy link
Author

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 @@
<!--
Copy link
Member

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
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 style?

Copy link
Author

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
Copy link
Member

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.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

Sergei Ogorelkov added 6 commits May 16, 2022 15:30
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)
Copy link
Member

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?

Sergei Ogorelkov added 2 commits May 17, 2022 17:28
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
@haiodo haiodo merged commit fb0340e into main May 18, 2022
@haiodo haiodo deleted the add-issue-preview branch May 18, 2022 04:05
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.

1 participant