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

WIP: Make Add Category more visible (#1123) #1130

Closed
Closed
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
22 changes: 17 additions & 5 deletions packages/desktop-client/src/components/budget/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import * as monthUtils from 'loot-core/src/shared/months';

import useResizeObserver from '../../hooks/useResizeObserver';
import ExpandArrow from '../../icons/v0/ExpandArrow';
import SvgAdd from '../../icons/v1/Add';
import ArrowThinLeft from '../../icons/v1/ArrowThinLeft';
import ArrowThinRight from '../../icons/v1/ArrowThinRight';
import CheveronDown from '../../icons/v1/CheveronDown';
Expand Down Expand Up @@ -513,7 +514,7 @@ export function SidebarGroup({
}}
/>
)}
<div
<View
style={{
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
Expand All @@ -523,7 +524,7 @@ export function SidebarGroup({
>
{dragPreview && <Text style={{ fontWeight: 500 }}>Group: </Text>}
{group.name}
</div>
</View>
{!dragPreview && (
<>
<View style={{ marginLeft: 5, flexShrink: 0 }}>
Expand All @@ -548,8 +549,6 @@ export function SidebarGroup({
onMenuSelect={type => {
if (type === 'rename') {
onEdit(group.id);
} else if (type === 'add-category') {
onShowNewCategory(group.id);
} else if (type === 'delete') {
onDelete(group.id);
} else if (type === 'toggleVisibility') {
Expand All @@ -558,7 +557,6 @@ export function SidebarGroup({
setMenuOpen(false);
}}
items={[
{ name: 'add-category', text: 'Add category' },
{
name: 'toggleVisibility',
text: group.hidden ? 'Show' : 'Hide',
Expand All @@ -574,6 +572,20 @@ export function SidebarGroup({
<NotesButton id={group.id} />
</>
)}
{!dragPreview && (
<View style={{ flexShrink: 0 }}>
<Button
bare
onClick={e => {
e.stopPropagation();
onShowNewCategory(group.id);
}}
style={{ display: 'flex !important' }}
>
<SvgAdd width={12} height={12} />
</Button>
</View>
)}
</View>
);

Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/1130.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [joel-jeremy]
---

Make the Add Category button more visible by putting it beside the group name.