mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 09:08:09 +08:00
Merge pull request #3240 from woocommerce/PCP-4393-minor-features-related-scrolling-and-highlighting-fixes
Settings UI: Add Minor Features scrolling/highlight fixes (4393)
This commit is contained in:
commit
93aa4b73f4
2 changed files with 17 additions and 17 deletions
|
@ -32,7 +32,10 @@ const FeatureItem = ( {
|
|||
);
|
||||
const handleClick = async ( feature ) => {
|
||||
if ( feature.action?.type === 'tab' ) {
|
||||
const highlight = Boolean( feature.action?.highlight );
|
||||
const highlight =
|
||||
feature.action?.highlight === undefined
|
||||
? true
|
||||
: Boolean( feature.action.highlight );
|
||||
const tabId = TAB_IDS[ feature.action.tab.toUpperCase() ];
|
||||
await selectTab( tabId, feature.action.section, highlight );
|
||||
}
|
||||
|
|
|
@ -150,11 +150,10 @@ class FeaturesDefinition {
|
|||
'type' => 'secondary',
|
||||
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
||||
'action' => array(
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-credit-card-gateway',
|
||||
'highlight' => 'ppcp-credit-card-gateway',
|
||||
'modal' => 'ppcp-credit-card-gateway',
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-credit-card-gateway',
|
||||
'modal' => 'ppcp-credit-card-gateway',
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
'class' => 'small-button',
|
||||
|
@ -189,7 +188,7 @@ class FeaturesDefinition {
|
|||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-alternative-payments-card',
|
||||
'highlight' => 'ppcp-alternative-payments-card',
|
||||
'highlight' => false,
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
'class' => 'small-button',
|
||||
|
@ -218,11 +217,10 @@ class FeaturesDefinition {
|
|||
'type' => 'secondary',
|
||||
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
||||
'action' => array(
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-googlepay',
|
||||
'highlight' => 'ppcp-googlepay',
|
||||
'modal' => 'ppcp-googlepay',
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-googlepay',
|
||||
'modal' => 'ppcp-googlepay',
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
'class' => 'small-button',
|
||||
|
@ -257,11 +255,10 @@ class FeaturesDefinition {
|
|||
'type' => 'secondary',
|
||||
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
||||
'action' => array(
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-card-payments-card',
|
||||
'highlight' => 'ppcp-applepay',
|
||||
'modal' => 'ppcp-applepay',
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-applepay',
|
||||
'modal' => 'ppcp-applepay',
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
'class' => 'small-button',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue