Notifications v2 (part 1) #93
No reviewers
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
dependencies
Epic
good first issue
hacktoberfest
help wanted
icebox
Invalid
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-redux#93
Loading…
Reference in a new issue
No description provided.
Delete branch "notifications"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Notes
lbry-android
should be straight forward and should only require a few variable name changes,lbry-desktop
will be more work since it is using modals.types/notification
for the complete notification reducer types (and let me know if I missed anything. This was based on previous conversations)Changes
doNotify({ ... displayType: ["toast"] })
becomesdoToast({ ... })
selectNotification()
becomesselectToast()
Minor comments with the exception of the routine with the circular reference (if it weren't for my lack of understanding I'd sign off)
parens:
Why the circular reference?
I don't entirely understand this routine.
@ -31,0 +18,4 @@
if (state.errors.length) {
const { error } = state.errors[0];
return {
error,
Could be
state.toasts.length !== 0
, I'm mostly indifferent - style vs speedThat was just a typo. Fixed
@ -19,0 +23,4 @@
};
export type DoToast = {
type: ACTIONS.CREATE_TOAST,
Any particular reason for renaming to toasts? All toasts are notifications, but not all notifications are toasts.
EDIT: Just saw that there are three types of notifications, toasts, events and errors. I don't feel too strongly about this, but I think we could use a better name instead of events.
Just to add to this, I'm wary of using
Event
because we already have events in Javascript, so it may lead to some confusion for new code contributors not familiar with the codebase.