woocommerce/plugins/woocommerce-admin/client/payments-welcome/incentive.svg

1 line
5.2 KiB
XML
Raw Normal View History

Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
<svg xmlns="http://www.w3.org/2000/svg" width="217" height="158" fill="none" viewBox="0 0 217 158"><rect width="114" height="61" x="54" y="43" fill="#F6F7F7" rx="10"/><g filter="url(#a)"><rect width="83.7" height="60.32" x="101.3" y="65.68" fill="#fff" rx="12"/></g><path fill="#674399" d="M119.03 97.92a2.78 2.78 0 1 1 5.56 0v2.78a2.78 2.78 0 0 1-5.56 0v-2.78Z"/><rect width="5.56" height="12.51" x="130.15" y="90.97" fill="#AF7DD1" rx="2.78"/><rect width="5.56" height="16.68" x="141.27" y="86.81" fill="#674399" rx="2.78"/><rect width="5.56" height="20.85" x="152.39" y="82.63" fill="#AF7DD1" rx="2.78"/><rect width="5.56" height="25.01" x="163.5" y="78.47" fill="#674399" rx="2.78"/><path fill="#F6F7F7" d="M119.03 110.47a2.9 2.9 0 1 1 5.82 0 2.9 2.9 0 0 1-5.82 0Z"/><rect width="5.82" height="5.82" x="130.15" y="107.56" fill="#F6F7F7" rx="2.91"/><rect width="5.82" height="5.82" x="141.27" y="107.56" fill="#F6F7F7" rx="2.91"/><rect width="5.82" height="5.82" x="152.39" y="107.56" fill="#F6F7F7" rx="2.91"/><rect width="5.82" height="5.82" x="163.51" y="107.56" fill="#F6F7F7" rx="2.91"/><g filter="url(#b)"><rect width="74.65" height="59.57" x="47.77" y="32.5" fill="#fff" rx="12"/></g><rect width="14.33" height="9.8" x="63.6" y="43.06" fill="#F7EDF7" rx="2"/><path fill="#674399" d="M70.52 53.76v-.8c-1.38-.08-2.37-.78-2.41-2h1.3c.09.5.44.83 1.1.9V50.1l-.32-.08c-1.28-.29-1.97-.86-1.97-1.9v-.02c0-1.16.95-1.9 2.3-1.97v-.82h.56v.82c1.35.1 2.23.87 2.28 2.02l-1.3.01v-.01c-.07-.52-.44-.83-.98-.92v1.7l.34.07c1.34.3 2.03.84 2.03 1.91v.01c0 1.22-.99 1.94-2.37 2.03v.8h-.56ZM69.58 48c0 .38.28.62.94.8v-1.57c-.62.07-.94.37-.94.76V48Zm2.51 3.06c0-.42-.26-.64-1.01-.83v1.63c.68-.07 1.01-.35 1.01-.79v-.01Z"/><rect width="12.06" height="3.12" x="85.47" y="46.08" fill="#DCDCDE" rx="1.56"/><rect width="14.33" height="9.8" x="63.6" y="55.88" fill="#F7EDF7" rx="2"/><path fill="#674399" d="M68.05 65.73v-1.1c.86-.18 1.35-.68 1.35-1.44 0-.17-.03-.33-.07-.5h-1.28v-.72h1.06c-.1-.31-.2-.64-.2-1 0-1.26 1.01-2.04 2.67-2.04.61 0 1.22.1 1.58.26v1.13a3.77 3.77 0 0 0-1.37-.24c-.92 0-1.45.38-1.45 1.07 0 .3.08.56.18.82h2.17v.73h-1.96c.03.13.05.27.05.43 0 .6-.27 1.06-.8 1.37v.05h3.48v1.18h-5.41Z"/><rect width="18.85" height="3.02" x="85.47" y="59.64" fill="#DCDCDE" rx="1.51"/><rect width="14.33" height="9.8" x="63.6" y="68.69" fill="#F7EDF7" rx="2"/><path fill="#674399" d="M68.38 77.4v-.57h1.67v-.7h-1.67v-.56h1.39l-2.1-3.78h1.56l1.51 3.02h.07l1.51-3.02h1.53l-2.1 3.78h1.4v.56h-1.67v.7h1.66v.56h-1.66v1.15h-1.43V77.4h-1.67Z"/><rect width="13.57" height="3.02" x="85.47" y="72.46" fill="#DCDCDE" rx="1.51"/><g filter="url(#c)"><path fill="#7F54B3" fill-rule="evenodd" d="M38.69 83.02a6 6 0 0 0-6 6v18.8a6 6 0 0 0 6 6h36.4a8 8 0 0 0 5.96-2.65l7.85-8.74a6 6 0 0 0 0-8.02l-7.85-8.74a8 8 0 0 0-5.95-2.65H38.69Zm41.88 18.85a3.4 3.4 0 1 0 0-6.79 3.4 3.4 0 0 0 0 6.79Z" clip-rule="evenodd"/></g><circle cx="44" cy="92.82" r="3.2" stroke="#F7EDF7" stroke-width="3" transform="rotate(45 44 92.82)"/><circle cx="54.57" cy="103.37" r="3.2" stroke="#F7EDF7" stroke-width="3" transform="rotate(45 54.57 103.37)"/><line x1="54.08" x2="43.44" y1="93.02" y2="103.66" stroke="#F7EDF7" stroke-linecap="round" stroke-width="3"/><path fill="#C792E0" d="M85.33 99.46a2 2 0 1 0-3.55-1.84l3.55 1.84Zm8.04 5.62.76 1.85-.76-1.85Zm-11.6-7.46a6.84 6.84 0 0 0 1.76 8.47c2.48 2.09 6.31 2.6 10.6.84l-1.52-3.7c-3.27 1.34-5.44.7-6.51-.2a2.85 2.85 0 0 1-.77-3.57l-3.55-1.84Zm12.36 9.3C101.86 103.76 103 96.05 103 92h-4c0 3.66-1.04 9.03-6.4 11.23l1.53 3.7Z"/><defs><filter id="a" width="147.7" height="124.32" x="69.3" y="33.68" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset/><feGaussianBlur stdDeviation="16"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_39_8367"/><feBlend in="SourceGraphic" in2="effect1_dropShadow_39_