Skip to content

Commit

Permalink
fix(nc-gui): some pr review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshmane7218 committed May 10, 2024
1 parent 1b3a643 commit 8580205
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 25 deletions.
15 changes: 4 additions & 11 deletions packages/nc-gui/components/smartsheet/expanded-form/Comments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const isCommentMode = ref(false)
const showCommentInputBoxShadow = ref(false)
const focusCommentInput: VNodeRef = (el) => {
if (el) {
if (parseInt((el.$el as HTMLTextAreaElement)?.style?.height ?? '') > 82) {
Expand Down Expand Up @@ -186,7 +187,7 @@ watch(commentsWrapperEl, () => {
{{ log.display_name?.trim() || log.user || 'Shared source' }}
</template>
<span
class="text-ellipsis overflow-hidden font-bold text-gray-800"
class="text-ellipsis overflow-hidden text-gray-700"
:style="{
wordBreak: 'keep-all',
whiteSpace: 'nowrap',
Expand Down Expand Up @@ -271,11 +272,7 @@ watch(commentsWrapperEl, () => {
@keydown.stop
@keydown.enter.exact.prevent="saveComment"
/>
<div
v-if="showCommentInputBoxShadow"
class="expanded-form-comment-input-shadow"
:class="`valju-${comment?.split('\n').length}`"
></div>
<div v-if="showCommentInputBoxShadow" class="expanded-form-comment-input-shadow"></div>
</div>
<NcButton
v-e="['a:row-expand:comment:save']"
Expand Down Expand Up @@ -434,12 +431,8 @@ watch(commentsWrapperEl, () => {

.expanded-form-comment-input-shadow {
@apply absolute top-1px left-1px h-3 w-[98%] z-0 rounded-t-lg pointer-events-none;
}

&:focus-within {
.expanded-form-comment-input-shadow {
box-shadow: 0px 12px 12px 0px rgba(255, 255, 255, 0.65) inset;
}
box-shadow: 0px 12px 12px 0px rgba(255, 255, 255, 0.65) inset;
}
}
:deep(.expanded-form-comment-input) {
Expand Down
28 changes: 14 additions & 14 deletions packages/nc-gui/components/smartsheet/expanded-form/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -619,19 +619,6 @@ export default {
</div>
</div>
<div class="flex gap-2">
<NcButton
v-if="!isMobileMode"
v-e="['c:row-expand:save']"
:disabled="changedColumns.size === 0 && !isUnsavedFormExist"
:loading="isSaving"
class="nc-expand-form-save-btn !xs:(text-base) !h-7 !px-2"
data-testid="nc-expanded-form-save"
type="primary"
size="xsmall"
@click="save"
>
<div class="xs:px-1">{{ newRecordSubmitBtnText ?? 'Save Record' }}</div>
</NcButton>
<NcButton
v-if="!isNew && rowId && !isMobileMode"
:disabled="isLoading"
Expand All @@ -650,6 +637,19 @@ export default {
{{ isRecordLinkCopied ? $t('labels.copiedRecordURL') : $t('labels.copyRecordURL') }}
</div>
</NcButton>
<NcButton
v-if="!isMobileMode"
v-e="['c:row-expand:save']"
:disabled="changedColumns.size === 0 && !isUnsavedFormExist"
:loading="isSaving"
class="nc-expand-form-save-btn !xs:(text-base) !h-7 !px-2"
data-testid="nc-expanded-form-save"
type="primary"
size="xsmall"
@click="save"
>
<div class="xs:px-1">{{ newRecordSubmitBtnText ?? 'Save Record' }}</div>
</NcButton>
<NcDropdown v-if="!isNew && rowId && !isMobileMode" placement="bottomRight">
<NcButton type="text" size="xsmall" class="nc-expand-form-more-actions !w-7 !h-7" :disabled="isLoading">
<GeneralIcon icon="threeDotVertical" class="text-md" :class="isLoading ? 'text-gray-300' : 'text-gray-700'" />
Expand Down Expand Up @@ -786,7 +786,7 @@ export default {
<div class="flex-grow h-px mr-1 bg-gray-100"></div>
<NcButton
:size="isMobileMode ? 'medium' : 'small'"
class="flex-shrink !text-sm overflow-hidden"
class="flex-shrink !text-sm overflow-hidden !text-gray-500 !font-weight-500"
type="secondary"
@click="toggleHiddenFields"
>
Expand Down

0 comments on commit 8580205

Please sign in to comment.