Open marekhrabe opened 4 years ago
Thanks for the solid overview Marek.
Other Notices
Are you able to share the location for these components?
Can we maybe think of iframing this section and injecting it in wp-admin?
In an attempt to address this I have drafted https://github.com/Automattic/wp-calypso/pull/45780. Let's discuss whether it is feasible or we should go another way.
Other Notices
Are you able to share the location for these components?
@getdave It branches from here. https://github.com/Automattic/wp-calypso/blob/master/client/my-sites/current-site/notice.jsx
I have edited the main post to include more links to code, including this one
A little update on this one — we have implemented a "Switch Site" link into wp-admin (which opens https://wordpress.com/home), as well as a simplified "Site Card" (for now without any error/warning states it can have).
Everything else needs a better plan before proceeding. Some discussions in paYJgx-10T-p2
@marekhrabe What are the next steps on this one (if any)?
For the first release, remaining nudges and notices were put out of scope for the wp-admin implementation
Re-opening now that v1 has shipped and porting notices and nudges might become more relevant again
All nudges and notices are concentrated in the
CurrentSite
component. This component controls everything that shows above the standard nav links in Calypso sidebar.✅ Implemented — The Site Switcher link
setLayoutFocus( 'sites' )
which controls the "sidebar routing" and makes it show and focus the site list✅ Implemented simplified version — Site card
✅ implemented Domain Credit
UpsellNudge
componentstate/sites/plans
✅ implemented Domain Upsell
UpsellNudge
component✅ implemented JITM (Just In Time Messages) for wp-admin
/jetpack/v4/jitm
API that returns messages and determines when to show themUpsellNudge
💡 Needs plan & implmentation — Nudges and Notices of different kinds
Domain Warnings
Stale Cart
state/notices
to add a notice to a list of those to displayOther Notices
Site Redirect Notice
Notice
componentActive Discount Notice
UpsellNudge
with data from the discount definitionConclusion
This was just a first pass over the existing nudges and it turns out this is a pretty complicated chunk of code which uses different store types (Redux, Flux) and several different API types for feeding the data
It relies on entities like user, site, domain, store, cart, plan and has no central logic that does all the checks. The eligibility logic is scattered across many different components and their methods. Should we want to achieve 1:1 copy in wp-admin, it will require a huge rewrite of the code. Copying the full logic in wp-admin will be an extreme project too.