Skip to content

Commit

Permalink
Merge branch 'release/22.7' of github.com:Yoast/wordpress-seo into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
igorschoester committed May 7, 2024
2 parents 640f7b1 + 8dde2bd commit 74678cf
Show file tree
Hide file tree
Showing 10 changed files with 237 additions and 237 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"webpack-bundle-analyzer": "^4.9.1"
},
"yoast": {
"pluginVersion": "22.7-RC5"
"pluginVersion": "22.7-RC6"
},
"version": "0.0.0"
}
151 changes: 73 additions & 78 deletions packages/js/src/components/fills/MetaboxFill.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ import { BlackFridayPromotion } from "../BlackFridayPromotion";
import { isWooCommerceActive } from "../../helpers/isWooCommerceActive";
import { withMetaboxWarningsCheck } from "../higherorder/withMetaboxWarningsCheck";

import { MetaboxErrorFallback } from "../metabox-error-fallback";

import { ErrorBoundary } from "@yoast/ui-library";
const BlackFridayProductEditorChecklistPromotionWithMetaboxWarningsCheck = withMetaboxWarningsCheck( BlackFridayProductEditorChecklistPromotion );
const BlackFridayPromotionWithMetaboxWarningsCheck = withMetaboxWarningsCheck( BlackFridayPromotion );

Expand All @@ -52,85 +49,83 @@ export default function MetaboxFill( { settings } ) {
<>
{ isWordProofIntegrationActive() && <WordProofAuthenticationModals /> }
<Fill name="YoastMetabox">
<ErrorBoundary FallbackComponent={ MetaboxErrorFallback }>
<SidebarItem
key="warning"
renderPriority={ 1 }
>
<Warning />
</SidebarItem>
<SidebarItem
key="time-constrained-notification"
renderPriority={ 2 }
<SidebarItem
key="warning"
renderPriority={ 1 }
>
<Warning />
</SidebarItem>
<SidebarItem
key="time-constrained-notification"
renderPriority={ 2 }
>
{ shouldShowWooCommerceChecklistPromo && <BlackFridayProductEditorChecklistPromotionWithMetaboxWarningsCheck /> }
<BlackFridayPromotionWithMetaboxWarningsCheck image={ null } hasIcon={ false } location={ "metabox" } />
</SidebarItem>
{ settings.isKeywordAnalysisActive && <SidebarItem key="keyword-input" renderPriority={ 8 }>
<KeywordInput
isSEMrushIntegrationActive={ settings.isSEMrushIntegrationActive }
/>
{ ! window.wpseoScriptData.metabox.isPremium && <Fill name="YoastRelatedKeyphrases">
<SEMrushRelatedKeyphrases />
</Fill> }
</SidebarItem> }
<SidebarItem key="search-appearance" renderPriority={ 9 }>
<MetaboxCollapsible
id={ "yoast-snippet-editor-metabox" }
title={ __( "Search appearance", "wordpress-seo" ) } initialIsOpen={ true }
>
{ shouldShowWooCommerceChecklistPromo && <BlackFridayProductEditorChecklistPromotionWithMetaboxWarningsCheck /> }
<BlackFridayPromotionWithMetaboxWarningsCheck image={ null } hasIcon={ false } location={ "metabox" } />
</SidebarItem>
{ settings.isKeywordAnalysisActive && <SidebarItem key="keyword-input" renderPriority={ 8 }>
<KeywordInput
isSEMrushIntegrationActive={ settings.isSEMrushIntegrationActive }
/>
{ ! window.wpseoScriptData.metabox.isPremium && <Fill name="YoastRelatedKeyphrases">
<SEMrushRelatedKeyphrases />
</Fill> }
</SidebarItem> }
<SidebarItem key="search-appearance" renderPriority={ 9 }>
<MetaboxCollapsible
id={ "yoast-snippet-editor-metabox" }
title={ __( "Search appearance", "wordpress-seo" ) } initialIsOpen={ true }
>
<SnippetEditor hasPaperStyle={ false } />
</MetaboxCollapsible>
</SidebarItem>
{ settings.isContentAnalysisActive && <SidebarItem key="readability-analysis" renderPriority={ 10 }>
<ReadabilityAnalysis
<SnippetEditor hasPaperStyle={ false } />
</MetaboxCollapsible>
</SidebarItem>
{ settings.isContentAnalysisActive && <SidebarItem key="readability-analysis" renderPriority={ 10 }>
<ReadabilityAnalysis
shouldUpsell={ settings.shouldUpsell }
/>
</SidebarItem> }
{ settings.isKeywordAnalysisActive && <SidebarItem key="seo-analysis" renderPriority={ 20 }>
<Fragment>
<SeoAnalysis
shouldUpsell={ settings.shouldUpsell }
shouldUpsellWordFormRecognition={ settings.isWordFormRecognitionActive }
/>
</SidebarItem> }
{ settings.isKeywordAnalysisActive && <SidebarItem key="seo-analysis" renderPriority={ 20 }>
<Fragment>
<SeoAnalysis
shouldUpsell={ settings.shouldUpsell }
shouldUpsellWordFormRecognition={ settings.isWordFormRecognitionActive }
/>
{ settings.shouldUpsell && <PremiumSEOAnalysisModal location="metabox" /> }
</Fragment>
</SidebarItem> }
{ settings.isInclusiveLanguageAnalysisActive && <SidebarItem key="inclusive-language-analysis" renderPriority={ 21 }>
<InclusiveLanguageAnalysis />
</SidebarItem> }
{ settings.isKeywordAnalysisActive && <SidebarItem key="additional-keywords-upsell" renderPriority={ 22 }>
{ settings.shouldUpsell && <KeywordUpsell /> }
</SidebarItem> }
{ settings.isKeywordAnalysisActive && settings.isWincherIntegrationActive &&
<SidebarItem key="wincher-seo-performance" renderPriority={ 23 }>
<WincherSEOPerformanceModal location="metabox" />
</SidebarItem>
}
{ settings.shouldUpsell && ! isTerm && <SidebarItem key="internal-linking-suggestions-upsell" renderPriority={ 25 }>
<InternalLinkingSuggestionsUpsell />
</SidebarItem> }
{ settings.isCornerstoneActive && <SidebarItem key="cornerstone" renderPriority={ 30 }>
<CollapsibleCornerstone />
</SidebarItem> }
{ settings.displayAdvancedTab && <SidebarItem key="advanced" renderPriority={ 40 }>
<MetaboxCollapsible id={ "collapsible-advanced-settings" } title={ __( "Advanced", "wordpress-seo" ) }>
<AdvancedSettings />
</MetaboxCollapsible>
</SidebarItem> }
{ settings.displaySchemaSettings && <SidebarItem key="schema" renderPriority={ 50 }>
<SchemaTabContainer />
</SidebarItem> }
<SidebarItem
key="social"
renderPriority={ -1 }
>
<SocialMetadataPortal target="wpseo-section-social" />
{ settings.shouldUpsell && <PremiumSEOAnalysisModal location="metabox" /> }
</Fragment>
</SidebarItem> }
{ settings.isInclusiveLanguageAnalysisActive && <SidebarItem key="inclusive-language-analysis" renderPriority={ 21 }>
<InclusiveLanguageAnalysis />
</SidebarItem> }
{ settings.isKeywordAnalysisActive && <SidebarItem key="additional-keywords-upsell" renderPriority={ 22 }>
{ settings.shouldUpsell && <KeywordUpsell /> }
</SidebarItem> }
{ settings.isKeywordAnalysisActive && settings.isWincherIntegrationActive &&
<SidebarItem key="wincher-seo-performance" renderPriority={ 23 }>
<WincherSEOPerformanceModal location="metabox" />
</SidebarItem>
{ settings.isInsightsEnabled && <SidebarItem key="insights" renderPriority={ 52 }>
<InsightsCollapsible location="metabox" />
</SidebarItem> }
</ErrorBoundary>
}
{ settings.shouldUpsell && ! isTerm && <SidebarItem key="internal-linking-suggestions-upsell" renderPriority={ 25 }>
<InternalLinkingSuggestionsUpsell />
</SidebarItem> }
{ settings.isCornerstoneActive && <SidebarItem key="cornerstone" renderPriority={ 30 }>
<CollapsibleCornerstone />
</SidebarItem> }
{ settings.displayAdvancedTab && <SidebarItem key="advanced" renderPriority={ 40 }>
<MetaboxCollapsible id={ "collapsible-advanced-settings" } title={ __( "Advanced", "wordpress-seo" ) }>
<AdvancedSettings />
</MetaboxCollapsible>
</SidebarItem> }
{ settings.displaySchemaSettings && <SidebarItem key="schema" renderPriority={ 50 }>
<SchemaTabContainer />
</SidebarItem> }
<SidebarItem
key="social"
renderPriority={ -1 }
>
<SocialMetadataPortal target="wpseo-section-social" />
</SidebarItem>
{ settings.isInsightsEnabled && <SidebarItem key="insights" renderPriority={ 52 }>
<InsightsCollapsible location="metabox" />
</SidebarItem> }
</Fill>
</>
);
Expand Down
136 changes: 66 additions & 70 deletions packages/js/src/components/fills/SidebarFill.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import SidebarCollapsible from "../SidebarCollapsible";
import AdvancedSettings from "../../containers/AdvancedSettings";
import WincherSEOPerformanceModal from "../../containers/WincherSEOPerformanceModal";
import KeywordUpsell from "../modals/KeywordUpsell";
import { ErrorBoundary } from "@yoast/ui-library";
import { SidebarErrorFallback } from "../sidebar-error-fallback";

/* eslint-disable complexity */
/**
Expand All @@ -43,76 +41,74 @@ export default function SidebarFill( { settings } ) {
return (
<Fragment>
<Fill name="YoastSidebar">
<ErrorBoundary FallbackComponent={ SidebarErrorFallback }>
<SidebarItem key="warning" renderPriority={ 1 }>
<Warning />
<div style={ { margin: "0 16px" } }>
{ FirstEligibleNotification && <FirstEligibleNotification /> }
</div>
</SidebarItem>
{ settings.isKeywordAnalysisActive && <SidebarItem key="keyword-input" renderPriority={ 8 }>
<KeywordInput
isSEMrushIntegrationActive={ settings.isSEMrushIntegrationActive }
/>
</SidebarItem> }
{ settings.isKeywordAnalysisActive && <SidebarItem key="seo" renderPriority={ 10 }>
<Fragment>
<SeoAnalysis
shouldUpsell={ settings.shouldUpsell }
shouldUpsellWordFormRecognition={ settings.isWordFormRecognitionActive }
/>
{ settings.shouldUpsell && <PremiumSEOAnalysisModal location="sidebar" /> }
</Fragment>
</SidebarItem> }
{ settings.isContentAnalysisActive && <SidebarItem key="readability" renderPriority={ 20 }>
<ReadabilityAnalysis
<SidebarItem key="warning" renderPriority={ 1 }>
<Warning />
<div style={ { margin: "0 16px" } }>
{ FirstEligibleNotification && <FirstEligibleNotification /> }
</div>
</SidebarItem>
{ settings.isKeywordAnalysisActive && <SidebarItem key="keyword-input" renderPriority={ 8 }>
<KeywordInput
isSEMrushIntegrationActive={ settings.isSEMrushIntegrationActive }
/>
</SidebarItem> }
{ settings.isKeywordAnalysisActive && <SidebarItem key="seo" renderPriority={ 10 }>
<Fragment>
<SeoAnalysis
shouldUpsell={ settings.shouldUpsell }
shouldUpsellWordFormRecognition={ settings.isWordFormRecognitionActive }
/>
</SidebarItem> }
{ settings.isInclusiveLanguageAnalysisActive && <SidebarItem key="inclusive-language-analysis" renderPriority={ 21 }>
<InclusiveLanguageAnalysis />
</SidebarItem> }
{ settings.isKeywordAnalysisActive && <SidebarItem key="additional-keywords-upsell" renderPriority={ 22 }>
{ settings.shouldUpsell && <KeywordUpsell /> }
</SidebarItem> }
{ settings.isKeywordAnalysisActive && settings.isWincherIntegrationActive && <SidebarItem renderPriority={ 23 }>
<WincherSEOPerformanceModal
location="sidebar"
/>
</SidebarItem> }
{ settings.shouldUpsell && <SidebarItem key="internal-linking-suggestions-upsell" renderPriority={ 25 }>
<InternalLinkingSuggestionsUpsell />
</SidebarItem> }
<SidebarItem key="search-appearance" renderPriority={ 26 }>
<SearchAppearanceModal />
</SidebarItem>
{ ( settings.useOpenGraphData || settings.useTwitterData ) && <SidebarItem key="social-appearance" renderPriority={ 27 }>
<SocialAppearanceModal
useOpenGraphData={ settings.useOpenGraphData }
useTwitterData={ settings.useTwitterData }
/>
</SidebarItem> }
{ settings.displaySchemaSettings && <SidebarItem key="schema" renderPriority={ 28 }>
<SidebarCollapsible
title={ __( "Schema", "wordpress-seo" ) }
>
<SchemaTabContainer />
</SidebarCollapsible>
</SidebarItem> }
{ settings.displayAdvancedTab && <SidebarItem key="advanced" renderPriority={ 29 }>
<SidebarCollapsible
title={ __( "Advanced", "wordpress-seo" ) }
>
<AdvancedSettings />
</SidebarCollapsible>
</SidebarItem> }
{ settings.isCornerstoneActive && <SidebarItem key="cornerstone" renderPriority={ 30 }>
<CollapsibleCornerstone />
</SidebarItem> }
{ settings.isInsightsEnabled && <SidebarItem renderPriority={ 32 }>
<InsightsModal location="sidebar" />
</SidebarItem> }
</ErrorBoundary>
{ settings.shouldUpsell && <PremiumSEOAnalysisModal location="sidebar" /> }
</Fragment>
</SidebarItem> }
{ settings.isContentAnalysisActive && <SidebarItem key="readability" renderPriority={ 20 }>
<ReadabilityAnalysis
shouldUpsell={ settings.shouldUpsell }
/>
</SidebarItem> }
{ settings.isInclusiveLanguageAnalysisActive && <SidebarItem key="inclusive-language-analysis" renderPriority={ 21 }>
<InclusiveLanguageAnalysis />
</SidebarItem> }
{ settings.isKeywordAnalysisActive && <SidebarItem key="additional-keywords-upsell" renderPriority={ 22 }>
{ settings.shouldUpsell && <KeywordUpsell /> }
</SidebarItem> }
{ settings.isKeywordAnalysisActive && settings.isWincherIntegrationActive && <SidebarItem renderPriority={ 23 }>
<WincherSEOPerformanceModal
location="sidebar"
/>
</SidebarItem> }
{ settings.shouldUpsell && <SidebarItem key="internal-linking-suggestions-upsell" renderPriority={ 25 }>
<InternalLinkingSuggestionsUpsell />
</SidebarItem> }
<SidebarItem key="search-appearance" renderPriority={ 26 }>
<SearchAppearanceModal />
</SidebarItem>
{ ( settings.useOpenGraphData || settings.useTwitterData ) && <SidebarItem key="social-appearance" renderPriority={ 27 }>
<SocialAppearanceModal
useOpenGraphData={ settings.useOpenGraphData }
useTwitterData={ settings.useTwitterData }
/>
</SidebarItem> }
{ settings.displaySchemaSettings && <SidebarItem key="schema" renderPriority={ 28 }>
<SidebarCollapsible
title={ __( "Schema", "wordpress-seo" ) }
>
<SchemaTabContainer />
</SidebarCollapsible>
</SidebarItem> }
{ settings.displayAdvancedTab && <SidebarItem key="advanced" renderPriority={ 29 }>
<SidebarCollapsible
title={ __( "Advanced", "wordpress-seo" ) }
>
<AdvancedSettings />
</SidebarCollapsible>
</SidebarItem> }
{ settings.isCornerstoneActive && <SidebarItem key="cornerstone" renderPriority={ 30 }>
<CollapsibleCornerstone />
</SidebarItem> }
{ settings.isInsightsEnabled && <SidebarItem renderPriority={ 32 }>
<InsightsModal location="sidebar" />
</SidebarItem> }
</Fill>
</Fragment>
);
Expand Down
14 changes: 9 additions & 5 deletions packages/js/src/components/slots/MetaboxSlot.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Slot } from "@wordpress/components";
import sortComponentsByRenderPriority from "../../helpers/sortComponentsByRenderPriority";
import TopLevelProviders from "../TopLevelProviders";
import { ErrorBoundary } from "@yoast/ui-library";
import { MetaboxErrorFallback } from "../metabox-error-fallback";

/**
* Renders the metabox portal.
Expand All @@ -16,11 +18,13 @@ export default function MetaboxSlot( { theme } ) {
theme={ theme }
location={ "metabox" }
>
<Slot name="YoastMetabox">
{ ( fills ) => {
return sortComponentsByRenderPriority( fills );
} }
</Slot>
<ErrorBoundary FallbackComponent={ MetaboxErrorFallback }>
<Slot name="YoastMetabox">
{ ( fills ) => {
return sortComponentsByRenderPriority( fills );
} }
</Slot>
</ErrorBoundary>
</TopLevelProviders>
);
}
14 changes: 9 additions & 5 deletions packages/js/src/components/slots/SidebarSlot.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Slot } from "@wordpress/components";
import sortComponentsByRenderPriority from "../../helpers/sortComponentsByRenderPriority";
import TopLevelProviders from "../TopLevelProviders";
import { ErrorBoundary } from "@yoast/ui-library";
import { SidebarErrorFallback } from "../sidebar-error-fallback";

/**
* Renders the Sidebar slot.
Expand All @@ -16,11 +18,13 @@ export default function SidebarSlot( { theme } ) {
theme={ theme }
location={ "sidebar" }
>
<Slot name="YoastSidebar">
{ ( fills ) => {
return sortComponentsByRenderPriority( fills );
} }
</Slot>
<ErrorBoundary FallbackComponent={ SidebarErrorFallback }>
<Slot name="YoastSidebar">
{ ( fills ) => {
return sortComponentsByRenderPriority( fills );
} }
</Slot>
</ErrorBoundary>
</TopLevelProviders>
);
}
Loading

0 comments on commit 74678cf

Please sign in to comment.