Skip to content

Commit

Permalink
Fix tooltips are not shown on disabled buttons (#7376)
Browse files Browse the repository at this point in the history
Fix tooltips not shown on disabled buttons
  • Loading branch information
Jan authored Aug 1, 2022
1 parent 8ebb563 commit 934a9e8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Tooltips not shown on disabled create and upload button

We've fixed a bug where tooltips that contain important information for example quota exceeded message weren't
shown on hovering over the create or upload button.

https://github.com/owncloud/web/pull/7376
https://github.com/owncloud/web/issues/5937
65 changes: 34 additions & 31 deletions packages/web-app-files/src/components/AppBar/CreateAndUpload.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<template>
<div v-if="showActions" class="oc-flex-inline oc-width-1-1" style="gap: 15px">
<template v-if="createFileActionsAvailable">
<oc-button
id="new-file-menu-btn"
key="new-file-menu-btn-enabled"
v-oc-tooltip="newButtonTooltip"
:aria-label="newButtonAriaLabel"
appearance="filled"
variation="primary"
:disabled="uploadOrFileCreationBlocked"
>
<oc-icon name="add" />
<translate>New</translate>
</oc-button>
<span v-oc-tooltip="newButtonTooltip">
<oc-button
id="new-file-menu-btn"
key="new-file-menu-btn-enabled"
:aria-label="newButtonAriaLabel"
appearance="filled"
variation="primary"
:disabled="uploadOrFileCreationBlocked"
>
<oc-icon name="add" />
<translate>New</translate>
</oc-button>
</span>
<oc-drop
drop-id="new-file-menu-drop"
toggle="#new-file-menu-btn"
Expand Down Expand Up @@ -67,29 +68,31 @@
</oc-drop>
</template>
<template v-else>
<span v-oc-tooltip="newButtonTooltip">
<oc-button
id="new-folder-btn"
appearance="filled"
variation="primary"
:aria-label="newButtonAriaLabel"
:disabled="uploadOrFileCreationBlocked"
@click="showCreateResourceModal"
>
<oc-icon name="resource-type-folder" />
<translate>New folder</translate>
</oc-button>
</span>
</template>
<span v-oc-tooltip="uploadButtonTooltip">
<oc-button
id="new-folder-btn"
v-oc-tooltip="newButtonAriaLabel"
appearance="filled"
variation="primary"
:aria-label="newButtonAriaLabel"
id="upload-menu-btn"
key="upload-menu-btn-enabled"
:aria-label="uploadButtonAriaLabel"
:disabled="uploadOrFileCreationBlocked"
@click="showCreateResourceModal"
>
<oc-icon name="resource-type-folder" />
<translate>New folder</translate>
<oc-icon name="upload" fill-type="line" />
<translate>Upload</translate>
</oc-button>
</template>
<oc-button
id="upload-menu-btn"
key="upload-menu-btn-enabled"
v-oc-tooltip="uploadButtonTooltip"
:aria-label="uploadButtonAriaLabel"
:disabled="uploadOrFileCreationBlocked"
>
<oc-icon name="upload" fill-type="line" />
<translate>Upload</translate>
</oc-button>
</span>
<oc-drop
drop-id="upload-menu-drop"
toggle="#upload-menu-btn"
Expand Down

0 comments on commit 934a9e8

Please sign in to comment.