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

feat: Added Plugin Slot wrapping UpgradeNotification in NotificationTray #1367

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

rijuma
Copy link
Member

@rijuma rijuma commented Apr 22, 2024

Description

Ticket: COSMO-246 🔒

In my previous PR #1366 I forgot to add an extra slot in the NotificationsTry wrapping the UpgradeNotifications component.

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (feat/upgrade-plugin-slots@d3ef306). Click here to learn what that means.

Additional details and impacted files
@@                     Coverage Diff                      @@
##             feat/upgrade-plugin-slots    #1367   +/-   ##
============================================================
  Coverage                             ?   88.28%           
============================================================
  Files                                ?      293           
  Lines                                ?     5010           
  Branches                             ?     1237           
============================================================
  Hits                                 ?     4423           
  Misses                               ?      571           
  Partials                             ?       16           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rijuma rijuma marked this pull request as ready for review April 22, 2024 18:58
@rijuma rijuma merged commit 1b5337a into feat/upgrade-plugin-slots Apr 22, 2024
7 checks passed
@rijuma rijuma deleted the rijuma/adding-plugin-slots-v2 branch April 22, 2024 19:09
Copy link

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

This is a good step in the right direction, but there's more we'll have to do.

pluginProps={{ upgradeNotificationProps }}
testId="notification-tray-slot"
>
<UpgradeNotification {...upgradeNotificationProps} />

Choose a reason for hiding this comment

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

A few things:

  • The verifiedMode check should be removed, and instead delegated to pluginProps
  • The UpgradeNotification component should not be present by default
  • If there are no other uses of UpgradeNotification, the component itself should be removed from the codebase
  • The props are far too feature-specific; we should probably rely on global context in the future

Copy link
Contributor

Choose a reason for hiding this comment

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

@arbrandes can we move this conversation to open PR into main here since this was just a subset of the work? #1368

Choose a reason for hiding this comment

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

Of course! I didn't realize this was a PR into a feature branch. :)

schenedx pushed a commit that referenced this pull request May 13, 2024
* feat: add plugin slot for fbe lock paywall (#1347)

* feat: Added PluginSlot wrapping UpgradeNotification components (#1366)

* chore: Updated PluginSlot mock to support children and test ids

* chore: Updated mocked PluginSlot

* chore: Added unit test for MockedPluginSlot

* fix: Updated slot name ids

* feat: Added Plugin Slot wrapping UpgradeNotification in NotificationTray (#1367)

* fix: Removed PluginSlot prop scoping for UpgradeNotification (#1369)

* feat: generic sidebar notification plugin (#1379)

* feat: make notification plugin api generic

* feat: include new sidebar and tests

* feat: tweak sidebar toggle

* style: fix extra space from merge

* feat: rename plugin slots

---------

Co-authored-by: Alison Langston <46360176+alangsto@users.noreply.github.com>
Co-authored-by: Zachary Hancock <zhancock@edx.org>
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.

3 participants