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

Fix tooltips are not shown on disabled buttons #7376

Merged
merged 3 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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