-
-
Notifications
You must be signed in to change notification settings - Fork 842
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
Extract NotificationList state #2185
Conversation
Why are we passing the app global? I don't understand the purpose of this. If it is to allow for extensibility, wouldn't that require the extension developer to create their own whole Application class anyway with the data that this state requires? |
@datitisev As per the discussion in #2150 (comment) |
Hm I see. It doesn't seem right to me. |
@datitisev Would you prefer to see the actual dependencies (e.g. the |
I think so, yeah. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see, this one is a bit different than other "state" PRs. The notification state does not seem to affect (or be relevant to) other parts of our application, so I do not see a reason to move it up to the application.
Instead, moving it from the NotificationList
to the NotificationsDropdown
would be enough - the dropdown component is the "highest" component that needs this data (no siblings or parents need it), and it could pass relevant data down to children (the NotificationList
component) as props where they need it.
What do you think? Am I missing something?
I would agree with this. |
Actually, scratch that: NotificationsPage also uses it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved in a three-people call 😃
Breaking changes:
|
Needed for pusher extension. Refs #2185.
Refs #1821 #2144
Changes proposed in this pull request:
Reviewers should focus on:
Confirmed
composer test
).