Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Make "Quote" action available from everywhere #1080

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

bfollington
Copy link
Collaborator

@bfollington bfollington commented Jan 26, 2024

Add a .contextMenu to all the major views to allow Quoting from everywhere.

image image image

@bfollington bfollington marked this pull request as ready for review January 26, 2024 06:41
Copy link
Collaborator

@gordonbrander gordonbrander left a comment

Choose a reason for hiding this comment

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

LGTM!!!

@@ -14,6 +14,7 @@ struct EntryListView: View {
var onEntryDelete: (Slashlink) -> Void
var onRefresh: () -> Void
var onLink: (EntryLink) -> Void
var onQuote: (Slashlink) -> Void
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you have a procedure with ten parameters, you probably missed some. (Alan Perlis https://www.cs.yale.edu/homes/perlis-alan/quotes.html)

Noting for future: if we feel tempted to additional callbacks > 5, perhaps we should switch to domain-specific actions and use a ViewStore.

No action requested. Doing the minimal thing is the right thing for this PR. Just noting for future.

var onSwipeAbandoned: () -> Void
var onCardTapped: (CardModel) -> Void
var onLink: (EntryLink) -> Void
var notify: (CardNotification) -> Void
Copy link
Collaborator

Choose a reason for hiding this comment

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

😚 👌

@gordonbrander gordonbrander merged commit 8b5a643 into main Jan 26, 2024
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants