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: download Button name and tooltip added #1441

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion src/components/DownloadButton.vue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Download Transaction History is long : we should replace it by Download.
  • Download Transaction History is fine for title attribute but cannot be hard-coded because DownloadButton is re-used in other views and different contexts
    • so title / tooltip must be parameterized by adding a new prop to DownloadButton (eg buttonTitle)
    • some tooltip text must be defined for other DownloadButton usage ; your proposals are welcome
  • when window width is small, we should hide Downloadand keep the icon only (as it is today)
    • Footer view (line 40) shows how to do that

Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@

<button
class="button is-small has-text-white ml-2"
title="Download Transaction History"
data-cy="downloadButton"
style="background-color: #202532; width: 26px; height: 26px; border:1px solid white; border-radius: 0">
style="background-color: #202532; border:1px solid white; border-radius: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; height: 26px;">
<span style="margin-right: 8px;"> Download Transaction History</span>
<i class="fas fa-download"></i>
</button>

Expand Down
3 changes: 2 additions & 1 deletion src/components/download/DownloadDialog.vue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is useful for record keeping and tax reporting. is a bit too much specific : remove it.

Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@

<template v-slot:dialogInputButtons>
<DialogButton :controller="controller">CANCEL</DialogButton>
<CommitButton :controller="controller" :enabled="downloadEnabled" @action="handleDownload">DOWNLOAD</CommitButton>
<CommitButton title=" Download the transaction history of account exported as a CSV file. This is useful for record keeping and tax reporting."
:controller="controller" :enabled="downloadEnabled" @action="handleDownload">DOWNLOAD</CommitButton>
</template>


Expand Down
18 changes: 17 additions & 1 deletion src/components/download/TransactionDownloadDialog.vue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • dialog titles are left-aligned everywhere so keep it left-aligned
  • inline help text should be left-aligned too (we have other dialogs like this)
  • remove This is useful …
  • when possible we try to avoid specific CSS definitions and prefer to use Bulma style classes
    • here you can probably achieve the same visual with has-text-grey and mt-x classes
    • and remove dialog-title-container and dialog-subtitle

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@

<!-- title -->
<template v-slot:dialogTitle>
<DialogTitle>{{ dialogTitle }}</DialogTitle>
<div class="dialog-title-container">
<DialogTitle>{{ dialogTitle }}</DialogTitle>
<span class="dialog-subtitle">
Download the transaction history of the account exported as a CSV file. <br />This is useful for record keeping and tax reporting.
</span>
</div>
</template>

<!-- input -->
Expand Down Expand Up @@ -298,6 +303,16 @@ export default defineComponent({
<!-- --------------------------------------------------------------------------------------------------------------- -->

<style>
.dialog-title-container {
text-align: center;
}
.dialog-subtitle {
display: block;
text-align: center;
font-size: 0.9rem;
color: #666;
margin-top: 0.5rem;
}
.dp__theme_dark {
--dp-background-color: var(--h-theme-box-background-color);
--dp-primary-color: #575757;
Expand All @@ -312,4 +327,5 @@ export default defineComponent({
--dp-font-size: 11px;
--dp-input-padding: 3.5px 30px 3.5px 12px
}

</style>
Loading