mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +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 ) => {
|
const handleClick = async ( feature ) => {
|
||||||
if ( feature.action?.type === 'tab' ) {
|
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() ];
|
const tabId = TAB_IDS[ feature.action.tab.toUpperCase() ];
|
||||||
await selectTab( tabId, feature.action.section, highlight );
|
await selectTab( tabId, feature.action.section, highlight );
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,11 +150,10 @@ class FeaturesDefinition {
|
||||||
'type' => 'secondary',
|
'type' => 'secondary',
|
||||||
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
||||||
'action' => array(
|
'action' => array(
|
||||||
'type' => 'tab',
|
'type' => 'tab',
|
||||||
'tab' => 'payment_methods',
|
'tab' => 'payment_methods',
|
||||||
'section' => 'ppcp-credit-card-gateway',
|
'section' => 'ppcp-credit-card-gateway',
|
||||||
'highlight' => 'ppcp-credit-card-gateway',
|
'modal' => 'ppcp-credit-card-gateway',
|
||||||
'modal' => 'ppcp-credit-card-gateway',
|
|
||||||
),
|
),
|
||||||
'showWhen' => 'enabled',
|
'showWhen' => 'enabled',
|
||||||
'class' => 'small-button',
|
'class' => 'small-button',
|
||||||
|
@ -189,7 +188,7 @@ class FeaturesDefinition {
|
||||||
'type' => 'tab',
|
'type' => 'tab',
|
||||||
'tab' => 'payment_methods',
|
'tab' => 'payment_methods',
|
||||||
'section' => 'ppcp-alternative-payments-card',
|
'section' => 'ppcp-alternative-payments-card',
|
||||||
'highlight' => 'ppcp-alternative-payments-card',
|
'highlight' => false,
|
||||||
),
|
),
|
||||||
'showWhen' => 'enabled',
|
'showWhen' => 'enabled',
|
||||||
'class' => 'small-button',
|
'class' => 'small-button',
|
||||||
|
@ -218,11 +217,10 @@ class FeaturesDefinition {
|
||||||
'type' => 'secondary',
|
'type' => 'secondary',
|
||||||
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
||||||
'action' => array(
|
'action' => array(
|
||||||
'type' => 'tab',
|
'type' => 'tab',
|
||||||
'tab' => 'payment_methods',
|
'tab' => 'payment_methods',
|
||||||
'section' => 'ppcp-googlepay',
|
'section' => 'ppcp-googlepay',
|
||||||
'highlight' => 'ppcp-googlepay',
|
'modal' => 'ppcp-googlepay',
|
||||||
'modal' => 'ppcp-googlepay',
|
|
||||||
),
|
),
|
||||||
'showWhen' => 'enabled',
|
'showWhen' => 'enabled',
|
||||||
'class' => 'small-button',
|
'class' => 'small-button',
|
||||||
|
@ -257,11 +255,10 @@ class FeaturesDefinition {
|
||||||
'type' => 'secondary',
|
'type' => 'secondary',
|
||||||
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
'text' => __( 'Configure', 'woocommerce-paypal-payments' ),
|
||||||
'action' => array(
|
'action' => array(
|
||||||
'type' => 'tab',
|
'type' => 'tab',
|
||||||
'tab' => 'payment_methods',
|
'tab' => 'payment_methods',
|
||||||
'section' => 'ppcp-card-payments-card',
|
'section' => 'ppcp-applepay',
|
||||||
'highlight' => 'ppcp-applepay',
|
'modal' => 'ppcp-applepay',
|
||||||
'modal' => 'ppcp-applepay',
|
|
||||||
),
|
),
|
||||||
'showWhen' => 'enabled',
|
'showWhen' => 'enabled',
|
||||||
'class' => 'small-button',
|
'class' => 'small-button',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue