Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Remove the -mb-8 on ul and the comment mt-8 margin, this causes unintended vertical scoller if the comment section is hidden
Tianzhou Chene36220e3e90f
diff --git a/frontend/src/views/TaskActivityPanel.vue b/frontend/src/views/TaskActivityPanel.vueindex bf9b0c9fcd..506f3313bf 100644--- a/frontend/src/views/TaskActivityPanel.vue+++ b/frontend/src/views/TaskActivityPanel.vue@@ -8,218 +8,214 @@</div><div class="pt-6"><!-- Activity feed-->- <div class="flow-root">- <ul class="-mb-8">- <li v-for="(activity, index) in activityList" :key="index">- <div :id="'activity' + (index + 1)" class="relative pb-6">- <span- v-if="index != activityList.length - 1"- class="absolute left-4 -ml-px h-full w-0.5 bg-block-border"- aria-hidden="true"- ></span>- <div class="relative flex items-start">- <template- v-if="- activity.attributes.actionType == 'bytebase.task.create'- "- >- <div>- <div class="relative pl-0.5">- <div- class="bg-control-bg rounded-full ring-8 ring-white flex items-center justify-center"+ <ul>+ <li v-for="(activity, index) in activityList" :key="index">+ <div :id="'activity' + (index + 1)" class="relative pb-6">+ <span+ v-if="index != activityList.length - 1"+ class="absolute left-4 -ml-px h-full w-0.5 bg-block-border"+ aria-hidden="true"+ ></span>+ <div class="relative flex items-start">+ <template+ v-if="+ activity.attributes.actionType == 'bytebase.task.create'+ "+ >+ <div>+ <div class="relative pl-0.5">+ <div+ class="bg-control-bg rounded-full ring-8 ring-white flex items-center justify-center"+ >+ <svg+ class="w-7 h-7 text-control"+ fill="currentColor"+ viewBox="0 0 20 20"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ fill-rule="evenodd"+ d="M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z"+ clip-rule="evenodd"+ ></path>+ </svg>+ </div>+ </div>+ </div>+ </template>+ <template+ v-else-if="+ activity.attributes.actionType ==+ 'bytebase.task.comment.create'+ "+ >+ <div class="relative">+ <BBAvatar+ class="rounded-full ring-8 ring-white"+ :username="currentUser.attributes.name"+ >+ </BBAvatar>+ </div>+ </template>+ <div class="ml-3 min-w-0 flex-1">+ <div class="min-w-0 flex-1 pt-1 flex justify-between">+ <div class="text-sm text-control-light">+ <span class="font-medium text-main">{{+ activity.attributes.creator.name+ }}</span>+ <a+ :href="'#activity' + (index + 1)"+ class="ml-1 anchor-link whitespace-nowrap"+ >+ {{ actionSentence(activity.attributes.actionType) }}+ {{ humanizeTs(activity.attributes.createdTs) }}+ <template+ v-if="+ activity.attributes.createdTs !=+ activity.attributes.lastUpdatedTs &&+ activity.attributes.actionType ==+ 'bytebase.task.comment.create'+ "+ >+ (edited+ {{ humanizeTs(activity.attributes.createdTs) }})+ </template>+ </a>+ </div>+ <div+ v-if="currentUser.id == activity.attributes.creator.id"+ class="space-x-2 text-control-light"+ >+ <template+ v-if="+ state.editCommentMode &&+ state.activeComment.id == activity.id+ "+ >+ <button+ type="button"+ class="text-control hover:bg-control-bg-hover disabled:bg-control-bg disabled:opacity-50 disabled:cursor-not-allowed px-2 text-xs leading-5 font-normal focus:ring-control focus:outline-none focus-visible:ring-2 focus:ring-offset-2"+ @click.prevent="+ {+ editComment = '';+ state.activeComment = null;+ state.editCommentMode = false;+ }+ "+ >+ Cancel+ </button>+ <button+ type="button"+ class="border border-control-border rounded-sm text-control bg-control-bg hover:bg-control-bg-hover disabled:bg-control-bg disabled:opacity-50 disabled:cursor-not-allowed px-2 text-xs leading-5 font-normal focus:ring-control focus:outline-none focus-visible:ring-2 focus:ring-offset-2"+ :disabled="+ editComment.length == 0 ||+ editComment == activity.attributes.payload.content+ "+ @click.prevent="doUpdateComment"+ >+ Save+ </button>+ </template>+ <template v-else>+ <!-- Delete Comment Button-->+ <button+ class="btn-icon"+ @click.prevent="+ {+ state.activeComment = activity;+ state.showDeleteCommentModal = true;+ }+ "><svg- class="w-7 h-7 text-control"- fill="currentColor"- viewBox="0 0 20 20"+ class="w-4 h-4"+ fill="none"+ stroke="currentColor"+ viewBox="0 0 24 24"xmlns="http://www.w3.org/2000/svg"><path- fill-rule="evenodd"- d="M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z"- clip-rule="evenodd"+ stroke-linecap="round"+ stroke-linejoin="round"+ stroke-width="2"+ d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg>- </div>- </div>+ </button>+ <!-- Edit Comment Button-->+ <button+ class="btn-icon"+ @click.prevent="onUpdateComment(activity)"+ >+ <svg+ class="w-4 h-4"+ fill="none"+ stroke="currentColor"+ viewBox="0 0 24 24"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ stroke-linecap="round"+ stroke-linejoin="round"+ stroke-width="2"+ d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"+ ></path>+ </svg>+ </button>+ </template></div>- </template>+ </div><template- v-else-if="+ v-if="activity.attributes.actionType =='bytebase.task.comment.create'">- <div class="relative">- <BBAvatar- class="rounded-full ring-8 ring-white"- :username="currentUser.attributes.name"+ <div class="mt-2 text-sm text-control whitespace-pre-wrap">+ <template+ v-if="+ state.editCommentMode &&+ state.activeComment.id == activity.id+ ">- </BBAvatar>- </div>- </template>- <div class="ml-3 min-w-0 flex-1">- <div class="min-w-0 flex-1 pt-1 flex justify-between">- <div class="text-sm text-control-light">- <span class="font-medium text-main">{{- activity.attributes.creator.name- }}</span>- <a- :href="'#activity' + (index + 1)"- class="ml-1 anchor-link whitespace-nowrap"- >- {{ actionSentence(activity.attributes.actionType) }}- {{ humanizeTs(activity.attributes.createdTs) }}- <template- v-if="- activity.attributes.createdTs !=- activity.attributes.lastUpdatedTs &&- activity.attributes.actionType ==- 'bytebase.task.comment.create'- "- >- (edited- {{ humanizeTs(activity.attributes.createdTs) }})- </template>- </a>- </div>- <div- v-if="currentUser.id == activity.attributes.creator.id"- class="space-x-2 text-control-light"- >- <template- v-if="- state.editCommentMode &&- state.activeComment.id == activity.id- "- >- <button- type="button"- class="text-control hover:bg-control-bg-hover disabled:bg-control-bg disabled:opacity-50 disabled:cursor-not-allowed px-2 text-xs leading-5 font-normal focus:ring-control focus:outline-none focus-visible:ring-2 focus:ring-offset-2"- @click.prevent="- {- editComment = '';- state.activeComment = null;- state.editCommentMode = false;- }- "- >- Cancel- </button>- <button- type="button"- class="border border-control-border rounded-sm text-control bg-control-bg hover:bg-control-bg-hover disabled:bg-control-bg disabled:opacity-50 disabled:cursor-not-allowed px-2 text-xs leading-5 font-normal focus:ring-control focus:outline-none focus-visible:ring-2 focus:ring-offset-2"- :disabled="- editComment.length == 0 ||- editComment == activity.attributes.payload.content- "- @click.prevent="doUpdateComment"- >- Save- </button>- </template>- <template v-else>- <!-- Delete Comment Button-->- <button- class="btn-icon"- @click.prevent="- {- state.activeComment = activity;- state.showDeleteCommentModal = true;- }- "- >- <svg- class="w-4 h-4"- fill="none"- stroke="currentColor"- viewBox="0 0 24 24"- xmlns="http://www.w3.org/2000/svg"+ <BBAutoResize>+ <template v-slot:main="{ resize }">+ <label for="comment" class="sr-only"+ >Edit Comment</label>- <path- stroke-linecap="round"- stroke-linejoin="round"- stroke-width="2"- d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"- ></path>- </svg>- </button>- <!-- Edit Comment Button-->- <button- class="btn-icon"- @click.prevent="onUpdateComment(activity)"- >- <svg- class="w-4 h-4"- fill="none"- stroke="currentColor"- viewBox="0 0 24 24"- xmlns="http://www.w3.org/2000/svg"- >- <path- stroke-linecap="round"- stroke-linejoin="round"- stroke-width="2"- d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"- ></path>- </svg>- </button>- </template>- </div>+ <textarea+ ref="editCommentTextArea"+ rows="3"+ class="textarea block w-full resize-none"+ placeholder="Leave a comment..."+ v-model="editComment"+ @input="+ (e) => {+ resize(e.target);+ }+ "+ @focus="+ (e) => {+ resize(e.target);+ }+ "+ ></textarea>+ </template>+ </BBAutoResize>+ </template>+ <template v-else>+ {{ activity.attributes.payload.content }}+ </template></div>- <template- v-if="- activity.attributes.actionType ==- 'bytebase.task.comment.create'- "- >- <div- class="mt-2 text-sm text-control whitespace-pre-wrap"- >- <template- v-if="- state.editCommentMode &&- state.activeComment.id == activity.id- "- >- <BBAutoResize>- <template v-slot:main="{ resize }">- <label for="comment" class="sr-only"- >Edit Comment</label- >- <textarea- ref="editCommentTextArea"- rows="3"- class="textarea block w-full resize-none"- placeholder="Leave a comment..."- v-model="editComment"- @input="- (e) => {- resize(e.target);- }- "- @focus="- (e) => {- resize(e.target);- }- "- ></textarea>- </template>- </BBAutoResize>- </template>- <template v-else>- {{ activity.attributes.payload.content }}- </template>- </div>- </template>- </div>+ </template></div></div>- </li>- </ul>- </div>+ </div>+ </li>+ </ul>- <div v-if="!state.editCommentMode" class="mt-8">+ <div v-if="!state.editCommentMode"><div class="flex"><div class="flex-shrink-0"><div class="relative">