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

Add messages context in the app side nav #23

Merged
merged 4 commits into from
Apr 30, 2024
Merged

Conversation

wpalani
Copy link
Member

@wpalani wpalani commented Apr 26, 2024

Proposed changes

Add a new container()->plugin()->id . '-app-nav' context to the module API, this context can be used by the brand plugins to retrieve notifications that can be displayed in the app nav.

** Tests might be failing now as this change requires an update in the brand plugin's app to render the messages in this context in the side nav.

This PR addresses this internal ticket: https://jira.newfold.com/browse/PRESS0-1151

Demo

nav-message-demo.mp4

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

return (
<div className={methods.classnames('newfold-notifications-wrapper')}>
{activeNotifications.map(notification => (
if ('bluehost-app-nav' === constants.context && activeNotifications.length > 0) {
Copy link
Member

Choose a reason for hiding this comment

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

Should this be container()->plugin()->id . '-app-nav'?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! fixed.

@wpscholar
Copy link
Member

@wpalani It looks like all the tests are failing due to a failing site gen test. I think we'd be fine to merge, but if there is an issue with the site gen tests, we should have the appropriate team look into why those are failing.

@wpalani wpalani merged commit 2e0474d into main Apr 30, 2024
1 of 6 checks passed
@wpalani wpalani deleted the add/app-nav-notifications branch April 30, 2024 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants