Skip to content

Commit

Permalink
Prevent rename button from getting covered
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed May 25, 2022
1 parent 7984af8 commit 09fe750
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-rename-button-visibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Prevent rename button from getting covered

We've fixed a bug where the rename button next to the file name would get covered if there is not enough space available.

https://github.com/owncloud/web/pull/7061
https://github.com/owncloud/web/issues/7007
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
/>
</template>
<template #name="{ item }">
<div class="resource-table-resource-wrapper">
<div
class="resource-table-resource-wrapper"
:class="[{ 'resource-table-resource-wrapper-limit-max-width': hasRenameAction(item) }]"
>
<oc-resource
:key="`${item.path}-${resourceDomSelector(item)}-${item.thumbnail}`"
:resource="item"
Expand Down Expand Up @@ -770,6 +773,10 @@ export default defineComponent({
<style lang="scss">
.resource-table {
&-resource-wrapper {
&-limit-max-width {
max-width: 90%;
}
&:hover > .resource-table-edit-name {
svg {
fill: var(--oc-color-text-default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`Trashbin component when the view is not loading anymore when length of
<tr tabindex="-1" data-item-id="file-id-1234" draggable="false" class="oc-tbody-tr oc-tbody-tr-file-id-1234">
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-shrink oc-table-data-cell oc-table-data-cell-select oc-pl-m "><span><input id="resource-table-select-file-id-1234" type="checkbox" name="checkbox" class="oc-checkbox oc-rounded oc-checkbox-l" value="[object Object]"> <label for="resource-table-select-file-id-1234" class="oc-invisible-sr oc-cursor-pointer">Select folder</label></span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-expand oc-text-truncate oc-table-data-cell oc-table-data-cell-name">
<div class="resource-table-resource-wrapper">
<div class="resource-table-resource-wrapper resource-table-resource-wrapper-limit-max-width">
<div class="oc-resource oc-text-overflow"><span><span class="oc-icon oc-icon-l oc-icon-passive oc-resource-icon oc-resource-icon-file"><!----></span></span>
<div class="oc-resource-details oc-text-overflow"><span class="oc-text-overflow"><!----> <span data-test-resource-path="/file-path/1234" data-test-resource-name="file-path/file-name-1234" data-test-resource-type="folder" class="oc-resource-name"><span class="oc-text-truncate"><span class="oc-resource-basename">file-name-1234</span></span>
<!----></span></span>
Expand All @@ -37,7 +37,7 @@ exports[`Trashbin component when the view is not loading anymore when length of
<tr tabindex="-1" data-item-id="file-id-5896" draggable="false" class="oc-tbody-tr oc-tbody-tr-file-id-5896">
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-shrink oc-table-data-cell oc-table-data-cell-select oc-pl-m "><span><input id="resource-table-select-file-id-5896" type="checkbox" name="checkbox" class="oc-checkbox oc-rounded oc-checkbox-l" value="[object Object]"> <label for="resource-table-select-file-id-5896" class="oc-invisible-sr oc-cursor-pointer">Select folder</label></span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-expand oc-text-truncate oc-table-data-cell oc-table-data-cell-name">
<div class="resource-table-resource-wrapper">
<div class="resource-table-resource-wrapper resource-table-resource-wrapper-limit-max-width">
<div class="oc-resource oc-text-overflow"><span><span class="oc-icon oc-icon-l oc-icon-passive oc-resource-icon oc-resource-icon-file"><!----></span></span>
<div class="oc-resource-details oc-text-overflow"><span class="oc-text-overflow"><!----> <span data-test-resource-path="/file-path/5896" data-test-resource-name="file-path/file-name-5896" data-test-resource-type="folder" class="oc-resource-name"><span class="oc-text-truncate"><span class="oc-resource-basename">file-name-5896</span></span>
<!----></span></span>
Expand All @@ -57,7 +57,7 @@ exports[`Trashbin component when the view is not loading anymore when length of
<tr tabindex="-1" data-item-id="file-id-9856" draggable="false" class="oc-tbody-tr oc-tbody-tr-file-id-9856">
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-shrink oc-table-data-cell oc-table-data-cell-select oc-pl-m "><span><input id="resource-table-select-file-id-9856" type="checkbox" name="checkbox" class="oc-checkbox oc-rounded oc-checkbox-l" value="[object Object]"> <label for="resource-table-select-file-id-9856" class="oc-invisible-sr oc-cursor-pointer">Select folder</label></span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-expand oc-text-truncate oc-table-data-cell oc-table-data-cell-name">
<div class="resource-table-resource-wrapper">
<div class="resource-table-resource-wrapper resource-table-resource-wrapper-limit-max-width">
<div class="oc-resource oc-text-overflow"><span><span class="oc-icon oc-icon-l oc-icon-passive oc-resource-icon oc-resource-icon-file"><!----></span></span>
<div class="oc-resource-details oc-text-overflow"><span class="oc-text-overflow"><!----> <span data-test-resource-path="/file-path/9856" data-test-resource-name="file-path/file-name-9856" data-test-resource-type="folder" class="oc-resource-name"><span class="oc-text-truncate"><span class="oc-resource-basename">file-name-9856</span></span>
<!----></span></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports[`SharedWithOthers view when the wrapper is not loading anymore when leng
<oc-checkbox-stub id="resource-table-select-38" value="" option="[object Object]" label="Select folder" hidelabel="true" size="large"></oc-checkbox-stub>
</td>
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-expand oc-text-truncate oc-table-data-cell oc-table-data-cell-name">
<div class="resource-table-resource-wrapper">
<div class="resource-table-resource-wrapper resource-table-resource-wrapper-limit-max-width">
<oc-resource-stub folderlink="[object Object]" parentfolderlink="[object Object]" resource="[object Object]" parentfoldernamedefault="All files and folders" ispathdisplayed="true" isextensiondisplayed="true" isresourceclickable="true"></oc-resource-stub>
<oc-button-stub type="button" size="medium" submit="button" variation="passive" appearance="raw" justifycontent="center" gapsize="medium" class="resource-table-edit-name"><span class="oc-icon oc-icon-s oc-icon-passive"><!----></span></oc-button-stub>
</div>
Expand All @@ -50,7 +50,7 @@ exports[`SharedWithOthers view when the wrapper is not loading anymore when leng
<oc-checkbox-stub id="resource-table-select-64" value="" option="[object Object]" label="Select folder" hidelabel="true" size="large"></oc-checkbox-stub>
</td>
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-expand oc-text-truncate oc-table-data-cell oc-table-data-cell-name">
<div class="resource-table-resource-wrapper">
<div class="resource-table-resource-wrapper resource-table-resource-wrapper-limit-max-width">
<oc-resource-stub folderlink="[object Object]" parentfolderlink="[object Object]" resource="[object Object]" parentfoldernamedefault="All files and folders" ispathdisplayed="true" isextensiondisplayed="true" isresourceclickable="true"></oc-resource-stub>
<oc-button-stub type="button" size="medium" submit="button" variation="passive" appearance="raw" justifycontent="center" gapsize="medium" class="resource-table-edit-name"><span class="oc-icon oc-icon-s oc-icon-passive"><!----></span></oc-button-stub>
</div>
Expand All @@ -73,7 +73,7 @@ exports[`SharedWithOthers view when the wrapper is not loading anymore when leng
<oc-checkbox-stub id="resource-table-select-39" value="" option="[object Object]" label="Select folder" hidelabel="true" size="large"></oc-checkbox-stub>
</td>
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-expand oc-text-truncate oc-table-data-cell oc-table-data-cell-name">
<div class="resource-table-resource-wrapper">
<div class="resource-table-resource-wrapper resource-table-resource-wrapper-limit-max-width">
<oc-resource-stub folderlink="[object Object]" parentfolderlink="[object Object]" resource="[object Object]" parentfoldernamedefault="All files and folders" ispathdisplayed="true" isextensiondisplayed="true" isresourceclickable="true"></oc-resource-stub>
<oc-button-stub type="button" size="medium" submit="button" variation="passive" appearance="raw" justifycontent="center" gapsize="medium" class="resource-table-edit-name"><span class="oc-icon oc-icon-s oc-icon-passive"><!----></span></oc-button-stub>
</div>
Expand All @@ -96,7 +96,7 @@ exports[`SharedWithOthers view when the wrapper is not loading anymore when leng
<oc-checkbox-stub id="resource-table-select-30" value="" option="[object Object]" label="Select file" hidelabel="true" size="large"></oc-checkbox-stub>
</td>
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-expand oc-text-truncate oc-table-data-cell oc-table-data-cell-name">
<div class="resource-table-resource-wrapper">
<div class="resource-table-resource-wrapper resource-table-resource-wrapper-limit-max-width">
<oc-resource-stub folderlink="[object Object]" parentfolderlink="[object Object]" resource="[object Object]" parentfoldernamedefault="All files and folders" ispathdisplayed="true" isextensiondisplayed="true" isresourceclickable="true"></oc-resource-stub>
<oc-button-stub type="button" size="medium" submit="button" variation="passive" appearance="raw" justifycontent="center" gapsize="medium" class="resource-table-edit-name"><span class="oc-icon oc-icon-s oc-icon-passive"><!----></span></oc-button-stub>
</div>
Expand Down

0 comments on commit 09fe750

Please sign in to comment.