forked from maybe-finance/maybe
-
Notifications
You must be signed in to change notification settings - Fork 122
Transactions & Activities pages improvements #452
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
Open
alessiocappa
wants to merge
25
commits into
we-promise:main
Choose a base branch
from
alessiocappa:FT-TransactionsPageImprovements
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
4a39f65
feat: Add toggle on mobile to show/hide checkboxes in transaction page
alessiocappa 2cfd431
fix: Add multi-select toggle also in activities page. Make JS control…
alessiocappa 36bec8e
feat: Add category in mobile view
alessiocappa 48a2e47
feat: Add mobile layout for transaction categories
alessiocappa b170d4f
feat: Add margin for pagination on mobile
alessiocappa 804ff1f
fix: Ensure category exists when displaying the name
alessiocappa 5dfd172
fix: Adjust mobile paddings
alessiocappa 025afc0
fix: Display "uncategorized" label if no category is set
alessiocappa b794ef8
fix: Expand transaction name/subtitle
alessiocappa 82c28b1
feat: Add merchant name on desktop view
alessiocappa 64c2871
feat: Move merchant name before account name
alessiocappa bdcf985
fix: Add class to hide merchant on mobile
alessiocappa 8eebe9d
feat: Add merchant logo on mobile
alessiocappa 22a444d
fix: add pointer-events-none to merchant image on mobile view
alessiocappa 7fa99cd
feat: toggle header checkbox in transaction page when button is clicked
alessiocappa ad90345
Remove unnecessary CSS class
alessiocappa 11b451c
Remove duplicate CSS class
alessiocappa 47ced2f
Remove wrong Enable Banking logo URL
alessiocappa 9766c50
Update app/views/transactions/_transaction.html.erb
alessiocappa de36292
Revert "Update app/views/transactions/_transaction.html.erb"
alessiocappa b006d21
Add translation for Loan Payment/Transfer
alessiocappa ba549c9
Apply review comments
alessiocappa de24ced
Add accessible name for toggle based on review comments
alessiocappa 7b61e2f
Use border instead of border-1 class
alessiocappa 9f54836
Apply review comments
alessiocappa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import { Controller } from "@hotwired/stimulus" | ||
|
|
||
| export default class extends Controller { | ||
| static targets = ["selectionEntry", "toggleButton"] | ||
|
|
||
| toggle() { | ||
| if (this.selectionEntryTargets.length === 0) return | ||
|
|
||
| const shouldShow = this.selectionEntryTargets[0].classList.contains("hidden") | ||
|
|
||
| this.selectionEntryTargets.forEach((el) => { | ||
| if (shouldShow) { | ||
| el.classList.remove("hidden") | ||
| } else { | ||
| el.classList.add("hidden") | ||
| } | ||
| }) | ||
|
|
||
| if (!shouldShow) { | ||
| const bulkSelectElement = | ||
| this.element.querySelector("[data-controller~='bulk-select']") || | ||
| this.element.closest("[data-controller~='bulk-select']") || | ||
| document.querySelector("[data-controller~='bulk-select']") | ||
| if (bulkSelectElement) { | ||
| const bulkSelectController = this.application.getControllerForElementAndIdentifier( | ||
| bulkSelectElement, | ||
| "bulk-select" | ||
| ) | ||
| if (bulkSelectController) { | ||
| bulkSelectController.deselectAll() | ||
| } | ||
| } | ||
| } | ||
|
|
||
| if (this.hasToggleButtonTarget) { | ||
| this.toggleButtonTarget.classList.toggle("bg-surface", shouldShow) | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <%# locals: (category:) %> | ||
| <% category ||= Category.uncategorized %> | ||
|
|
||
| <div> | ||
| <span class="flex lg:hidden items-center gap-1 text-sm font-medium rounded-full px-1.5 py-1 border truncate focus-visible:outline-none focus-visible:ring-0 w-8 h-8 justify-center" | ||
| style=" | ||
| background-color: color-mix(in oklab, <%= category.color %> 10%, transparent); | ||
| border-color: color-mix(in oklab, <%= category.color %> 10%, transparent); | ||
| color: <%= category.color %>;"> | ||
| <% if category.lucide_icon.present? %> | ||
| <%= icon category.lucide_icon, size: "sm", color: "current" %> | ||
| <% end %> | ||
| </span> | ||
| </div> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <span id="category_name_mobile_<%= transaction.id %>" class="text-secondary lg:hidden"> | ||
| <% if transaction.transfer&.categorizable? || transaction.transfer.nil? %> | ||
| <%= transaction.category&.name || Category.uncategorized.name %> | ||
| <% else %> | ||
| <%= transaction.transfer&.payment? ? payment_category.name : transfer_category.name %> | ||
| <% end %> | ||
| </span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| <%# locals: (classes: nil) %> | ||
| <hr class="border-divider <%= classes || "mx-4" %>"> | ||
| <hr class="border-divider <%= classes || "mx-3 lg:mx-4" %>"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.