mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-27 09:42:11 +00:00
Realtime Preview: remove Beta Feature and onboarding popup
Delete almost all code realting to the onboarding popup (blue pulsating dot) and Beta Feature. Leave only one line to delete any existing localStorage item that was used to remember the dismissal of the onboarding popup. Bug: T327515 Change-Id: I8d05e143858a2269dd6f3302dcc6cee6b0855ffd
This commit is contained in:
parent
45b1eb0b95
commit
56b4ba8476
|
@ -8,7 +8,6 @@ $cfg['directory_list'] = array_merge(
|
|||
'../../extensions/EventLogging',
|
||||
'../../extensions/WikimediaEvents',
|
||||
'../../extensions/ConfirmEdit',
|
||||
'../../extensions/BetaFeatures',
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -18,7 +17,6 @@ $cfg['exclude_analysis_directory_list'] = array_merge(
|
|||
'../../extensions/EventLogging',
|
||||
'../../extensions/WikimediaEvents',
|
||||
'../../extensions/ConfirmEdit',
|
||||
'../../extensions/BetaFeatures',
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -29,8 +29,7 @@
|
|||
"EditPageGetPreviewContent": "WikiEditorHooks",
|
||||
"ListDefinedTags": "WikiEditorHooks",
|
||||
"ChangeTagsListActive": "WikiEditorHooks",
|
||||
"RecentChange_save": "WikiEditorHooks",
|
||||
"GetBetaFeaturePreferences": "MediaWiki\\Extension\\WikiEditor\\Hooks::onGetBetaFeaturePreferences"
|
||||
"RecentChange_save": "WikiEditorHooks"
|
||||
},
|
||||
"HookHandlers": {
|
||||
"WikiEditorHooks": {
|
||||
|
@ -309,12 +308,6 @@
|
|||
"images": {
|
||||
"realtimepreview-error": {
|
||||
"file": "realtimepreview/error.svg"
|
||||
},
|
||||
"realtimepreview-onboarding": {
|
||||
"file": {
|
||||
"ltr": "realtimepreview/OnboardingPopup_ltr.svg",
|
||||
"rtl": "realtimepreview/OnboardingPopup_rtl.svg"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -333,10 +326,7 @@
|
|||
"wikieditor-realtimepreview-reload",
|
||||
"wikieditor-realtimepreview-reload-title",
|
||||
"accesskey-wikieditor-realtimepreview",
|
||||
"wikieditor-realtimepreview-manual",
|
||||
"wikieditor-realtimepreview-onboarding-title",
|
||||
"wikieditor-realtimepreview-onboarding-body",
|
||||
"wikieditor-realtimepreview-onboarding-button"
|
||||
"wikieditor-realtimepreview-manual"
|
||||
],
|
||||
"packageFiles": [
|
||||
"realtimepreview/init.js",
|
||||
|
@ -344,16 +334,14 @@
|
|||
"realtimepreview/ResizingDragBar.js",
|
||||
"realtimepreview/TwoPaneLayout.js",
|
||||
"realtimepreview/ErrorLayout.js",
|
||||
"realtimepreview/ManualWidget.js",
|
||||
"realtimepreview/OnboardingPopup.js"
|
||||
"realtimepreview/ManualWidget.js"
|
||||
],
|
||||
"styles": [
|
||||
"realtimepreview/RealtimePreview.less",
|
||||
"realtimepreview/ResizingDragBar.less",
|
||||
"realtimepreview/TwoPaneLayout.less",
|
||||
"realtimepreview/ErrorLayout.less",
|
||||
"realtimepreview/ManualWidget.less",
|
||||
"realtimepreview/OnboardingPopup.less"
|
||||
"realtimepreview/ManualWidget.less"
|
||||
],
|
||||
"skinStyles": {
|
||||
"monobook": [
|
||||
|
@ -452,13 +440,9 @@
|
|||
},
|
||||
"config": {
|
||||
"WikiEditorRealtimePreview": {
|
||||
"description": "Whether to enable the Realtime Preview feature. If true, the feature might still be limited to a beta feature depending on WikiEditorRealtimePreviewBeta and general beta feature availability. If false, the feature is not available in any form.",
|
||||
"description": "Whether to enable the Realtime Preview feature.",
|
||||
"value": false
|
||||
},
|
||||
"WikiEditorRealtimePreviewBeta": {
|
||||
"description": "Offer Realtime Preview as a Beta Feature (assuming the BetaFeatures extension is installed). If false, WikiEditorRealtimePreview directly controls whether the feature is enabled or not.",
|
||||
"value": true
|
||||
},
|
||||
"WikiEditorRealtimePreviewDebounce": {
|
||||
"description": "Debounce time in milliseconds for the Realtime Preview feature.",
|
||||
"value": 2500
|
||||
|
|
|
@ -18,7 +18,6 @@ use Html;
|
|||
use MediaWiki\Cache\CacheKeyHelper;
|
||||
use MediaWiki\ChangeTags\Hook\ChangeTagsListActiveHook;
|
||||
use MediaWiki\ChangeTags\Hook\ListDefinedTagsHook;
|
||||
use MediaWiki\Extension\BetaFeatures\BetaFeatures;
|
||||
use MediaWiki\Extension\DiscussionTools\Hooks as DiscussionToolsHooks;
|
||||
use MediaWiki\Extension\EventLogging\EventLogging;
|
||||
use MediaWiki\Hook\EditPage__attemptSave_afterHook;
|
||||
|
@ -247,15 +246,7 @@ class Hooks implements
|
|||
if ( $this->userOptionsLookup->getBoolOption( $user, 'usebetatoolbar' ) ) {
|
||||
$outputPage->addModuleStyles( 'ext.wikiEditor.styles' );
|
||||
$outputPage->addModules( 'ext.wikiEditor' );
|
||||
// Optionally enable Realtime Preview, and behind a BetaFeature where applicable.
|
||||
$betaFeaturesInstalled = ExtensionRegistry::getInstance()->isLoaded( 'BetaFeatures' );
|
||||
$user = $article->getContext()->getUser();
|
||||
$betaFeatureEnabled = $betaFeaturesInstalled &&
|
||||
BetaFeatures::isFeatureEnabled( $user, 'wikieditor-realtime-preview' );
|
||||
$useBetaFeature = $this->config->get( 'WikiEditorRealtimePreviewBeta' );
|
||||
if ( $this->config->get( 'WikiEditorRealtimePreview' ) &&
|
||||
( $useBetaFeature && $betaFeatureEnabled || !$betaFeaturesInstalled || !$useBetaFeature )
|
||||
) {
|
||||
if ( $this->config->get( 'WikiEditorRealtimePreview' ) ) {
|
||||
$outputPage->addModules( 'ext.wikiEditor.realtimepreview' );
|
||||
}
|
||||
}
|
||||
|
@ -603,30 +594,4 @@ class Hooks implements
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
* @param array &$prefs
|
||||
* @return void
|
||||
*/
|
||||
public static function onGetBetaFeaturePreferences( $user, &$prefs ) {
|
||||
$config = MediaWikiServices::getInstance()->getMainConfig();
|
||||
if ( !$config->get( 'WikiEditorRealtimePreview' ) || !$config->get( 'WikiEditorRealtimePreviewBeta' ) ) {
|
||||
return;
|
||||
}
|
||||
$extensionAssetsPath = $config->get( 'ExtensionAssetsPath' );
|
||||
$prefs['wikieditor-realtime-preview'] = [
|
||||
'label-message' => 'wikieditor-realtimepreview-beta-label',
|
||||
'desc-message' => 'wikieditor-realtimepreview-beta-desc',
|
||||
'screenshot' => [
|
||||
'ltr' => "$extensionAssetsPath/WikiEditor/modules/images/beta-feature-ltr.svg",
|
||||
'rtl' => "$extensionAssetsPath/WikiEditor/modules/images/beta-feature-rtl.svg",
|
||||
],
|
||||
// @todo Update links once mw:Help:Extension:WikiEditor/Realtime_Preview is written.
|
||||
'info-link' => 'https://meta.wikimedia.org/wiki/Special:MyLanguage/' .
|
||||
'Community_Wishlist_Survey_2021/Real_Time_Preview_for_Wikitext',
|
||||
'discussion-link' => 'https://meta.wikimedia.org/wiki/' .
|
||||
'Talk:Community_Wishlist_Survey_2021/Real_Time_Preview_for_Wikitext',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<svg width="264" height="162" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path fill="#fff" d="M0 0h264v162H0z"/><path d="m263.5 162.25-263-.5V.5h263v161.75Z" fill="#fff"/><path d="M11 22c0-8 6-14 14-14s14 6 14 14-6 14-14 14-14-6-14-14Zm27 23v-5H13v5h25Zm0 118V58H13v106h25M233 5h26v6h-26V5Zm-24 0h22v6h-22V5Zm-24 0h22v6h-22V5Zm-23 0h13v6h-13V5Zm15 0h6v6h-6V5Zm-23 0h6v6h-6V5Zm104 11v4h-92v-4h92Zm1-1h-94v6h94v-6Z" fill="#EAECF0"/><path d="M168 17h2v2h-2v-2Zm84 145.496V29H48v133l204 .496Z" fill="#EAECF0"/><path d="M48 29h204v11H48V29Z" fill="#C8CCD1"/><path d="M51 32h24.793v5H51v-5Zm33.223 0h9.918v5h-9.918v-5Zm16.86 0H111v5h-9.917v-5Z" fill="#fff"/><path d="m71.738 78.134-1.128 1.968-4.058-2.376a11.29 11.29 0 0 1-.792-.528 3.112 3.112 0 0 1-.623-.672c.24.56.36 1.16.36 1.8v4.656h-2.28V78.35c0-.32.016-.616.048-.888a3.2 3.2 0 0 1 .264-.84 3.545 3.545 0 0 1-.6.6 6.68 6.68 0 0 1-.746.504l-4.032 2.352-1.128-1.968 4.032-2.352c.269-.151.55-.28.84-.384.272-.112.56-.184.864-.216a4.147 4.147 0 0 1-1.703-.624L57 72.158l1.13-1.968 4.056 2.376c.288.176.544.36.768.552.24.192.448.416.624.672a3.91 3.91 0 0 1-.288-.864 5.986 5.986 0 0 1-.073-.936v-4.68h2.28v4.632c0 .32-.024.632-.072.936a3.092 3.092 0 0 1-.216.84c.17-.234.373-.444.6-.624.222-.176.47-.352.742-.528l4.032-2.328 1.128 1.968-4.032 2.328c-.27.16-.543.296-.815.408a2.79 2.79 0 0 1-.816.216c.542.064 1.086.264 1.63.6l4.056 2.376M82 90h4.286v2.143h-2.143v10.714h2.143V105H82V90Zm5.358 0h4.286v2.143H89.5v10.714h2.144V105h-4.286V90Zm43.001 0h4.286l.001 15h-4.286v-2.143h2.143V92.143h-2.144V90Zm-5.358 0h4.287l-.002 15H125v-2.143h2.144V92.143h-2.143V90Zm-58.658 23.777h-3.06l-.787 3.212h3.045l.8-3.212h.002Zm5.047-1.482-.194.855a.68.68 0 0 1-.323.473c-.172.103-.437.154-.8.154h-1.652l-.8 3.212h2.195c.267 0 .456.066.568.196.12.124.15.336.09.638l-.116.649h-3.005l-1.058 4.313h-1.136c-.122 0-.237-.02-.35-.061a.798.798 0 0 1-.258-.186.845.845 0 0 1-.154-.278.659.659 0 0 1 .013-.34l.865-3.448h-3.048l-.865 3.552c-.069.274-.21.47-.426.586-.226.119-.48.18-.735.175h-1.11l1.058-4.313h-1.783c-.258 0-.448-.062-.568-.185-.121-.124-.151-.34-.09-.649l.117-.649h2.595l.789-3.212h-2.932l.181-.844c.043-.22.15-.38.323-.484.172-.102.439-.154.8-.154h1.899l.89-3.583c.05-.22.18-.39.388-.514.205-.13.46-.199.722-.196h1.136l-1.058 4.293h3.06l1.047-4.293h1.123c.275 0 .49.069.645.206.155.137.206.316.155.535l-.89 3.552h2.697M57.343 58h54v6h-54v-6Zm20 57.001H142v3H77.343v-3Zm-20 20H142v3H57.343v-3Zm0-10H120.5v3H57.343v-3Zm20-50H142v3H77.343v-3Zm-20 10H117v3H57.343v-3ZM124 96H93.5v3H124v-3Zm-48 0H57.343v3H76v-3Z" fill="#A2A9B1"/><path fill="#54595D" d="M146 40h4v122h-4z"/><path d="M245 56.001h-39v30h39v-30Zm-26.348 13.043h1.402l8.701 8.604 4.725-2.834 7.117 5.943v.025h-31.148l9.203-11.738ZM240 105h-82v3h82v-3Zm-1 10h-81v3h81v-3Zm-4 10h-77v3h77v-3Zm8 10h-85v3h85v-3Zm-55-59.999h-30v3h30v-3Zm9 10h-39v3h39v-3Zm37 10h-76v3h76v-3ZM196.748 58H158v5.999h38.748V58Z" fill="#36C"/><path d="M0-.5h-.5v163h265V-.5H0Zm240.32 150.815-.32-.267-.32.267-11.68 9.733-11.68-9.733-.32-.267-.32.267-11.68 9.733-11.68-9.733-.32-.267-.32.267-11.68 9.733-11.68-9.733-.32-.267-.32.267-11.68 9.733-11.68-9.733-.32-.267-.32.267-11.68 9.733-11.68-9.733-.32-.267-.32.267-11.68 9.733-11.68-9.733-.32-.267-.32.267L84 160.048l-11.68-9.733-.32-.267-.32.267L60 160.048l-11.68-9.733-.32-.267-.32.267L36 160.048l-11.68-9.733-.32-.267-.32.267L12 160.048l-10.5-8.751V1.5h261v149.799l-10.5 8.749-11.68-9.733Z" fill="#fff" stroke="#E6E6E6"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h264v162H0z"/></clipPath></defs></svg>
|
Before Width: | Height: | Size: 3.5 KiB |
|
@ -1 +0,0 @@
|
|||
<svg width="264" height="162" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path fill="#fff" d="M264 0H0v162h264z"/><path d="m.5 162.25 263-.5V.5H.5v161.75Z" fill="#fff"/><path d="M253 22c0-8-6-14-14-14s-14 6-14 14 6 14 14 14 14-6 14-14Zm-27 23v-5h25v5h-25ZM226 163V58h25v106h-25M31 5H5v6h26V5Zm24 0H33v6h22V5Zm24 0H57v6h22V5Zm23 0H89v6h13V5ZM87 5h-6v6h6V5Zm23 0h-6v6h6V5ZM6 16v4h92v-4H6Zm-1-1h94v6H5v-6Z" fill="#EAECF0"/><path d="M96 17h-2v2h2v-2ZM12 162.496V29h204v133l-204 .496Z" fill="#EAECF0"/><path d="M216 29H12v11h204V29Z" fill="#C8CCD1"/><path d="M213 32h-24.793v5H213v-5Zm-33.223 0h-9.917v5h9.917v-5Zm-16.86 0H153v5h9.917v-5ZM24 32h-8.5v5H24v-5Z" fill="#fff"/><path d="M46.5 32h-19v5h19v-5Z" fill="#36C"/><path d="m192.262 78.134 1.128 1.968 4.058-2.376c.271-.165.536-.341.792-.528.24-.192.45-.419.623-.672a4.52 4.52 0 0 0-.36 1.8v4.656h2.28V78.35c0-.32-.016-.616-.048-.888a3.216 3.216 0 0 0-.264-.84c.175.223.377.425.6.6.237.184.486.353.746.504l4.032 2.352 1.128-1.968-4.032-2.352a5.543 5.543 0 0 0-.84-.384 3.113 3.113 0 0 0-.864-.216 4.148 4.148 0 0 0 1.703-.624L207 72.158l-1.13-1.968-4.056 2.376c-.288.176-.544.36-.768.552-.24.192-.448.416-.624.672.129-.276.226-.566.288-.864.049-.31.073-.623.073-.936v-4.68h-2.28v4.632c0 .32.024.632.072.936.032.289.105.572.216.84a3.18 3.18 0 0 0-.6-.624 9.531 9.531 0 0 0-.742-.528l-4.032-2.328-1.128 1.968 4.032 2.328c.27.16.543.296.815.408.259.113.535.186.816.216-.542.064-1.086.264-1.63.6l-4.056 2.376M182 90h-4.286v2.143h2.143v10.714h-2.143V105H182V90Zm-5.358 0h-4.286v2.143h2.144v10.714h-2.144V105h4.286V90ZM133.641 90h-4.286l-.001 15h4.286v-2.143h-2.143V92.143h2.144V90ZM138.999 90h-4.287l.002 15H139v-2.143h-2.144V92.143h2.143V90ZM197.657 113.777h3.06l.787 3.212h-3.045l-.8-3.212h-.002Zm-5.047-1.482.194.855a.672.672 0 0 0 .323.473c.172.103.437.154.8.154h1.652l.8 3.212h-2.195c-.267 0-.456.066-.568.196-.12.124-.15.336-.09.638l.116.649h3.005l1.058 4.313h1.136c.122 0 .237-.02.35-.061a.806.806 0 0 0 .258-.186.848.848 0 0 0 .154-.278.654.654 0 0 0-.013-.34l-.865-3.448h3.048l.865 3.552c.069.274.21.47.426.586.226.119.479.18.735.175h1.11l-1.058-4.313h1.783c.258 0 .448-.062.568-.185.121-.124.151-.34.09-.649l-.117-.649h-2.595l-.789-3.212h2.932l-.181-.844a.686.686 0 0 0-.323-.484c-.172-.102-.439-.154-.8-.154h-1.899l-.89-3.583a.786.786 0 0 0-.388-.514 1.328 1.328 0 0 0-.722-.196h-1.136l1.058 4.293h-3.06l-1.047-4.293h-1.123c-.275 0-.49.069-.645.206-.155.137-.206.316-.155.535l.89 3.552h-2.697M206.657 58h-54v6h54v-6Zm-20 57.001H122v3h64.657v-3Zm20 20H122v3h84.657v-3Zm0-10H143.5v3h63.157v-3Zm-20-50H122v3h64.657v-3Zm20 10H147v3h59.657v-3ZM140 96h30.5v3H140v-3ZM188 96h18.657v3H188v-3Z" fill="#A2A9B1"/><path fill="#54595D" d="M118 40h-4v122h4z"/><path d="M19 56.001h39v30H19v-30Zm26.348 13.043h-1.402l-8.701 8.604-4.725-2.834-7.117 5.943v.025h31.148l-9.203-11.738ZM24 105h82v3H24v-3ZM25 115h81v3H25v-3ZM29 125h77v3H29v-3ZM21 135h85v3H21v-3ZM76 75.001h30v3H76v-3ZM67 85.001h39v3H67v-3ZM30 95.001h76v3H30v-3ZM67.252 58H106v5.999H67.252V58Z" fill="#36C"/><path d="M264-.5h.5v163H-.5V-.5H264ZM23.68 150.315l.32-.267.32.267L36 160.048l11.68-9.733.32-.267.32.267L60 160.048l11.68-9.733.32-.267.32.267L84 160.048l11.68-9.733.32-.267.32.267 11.68 9.733 11.68-9.733.32-.267.32.267 11.68 9.733 11.68-9.733.32-.267.32.267 11.68 9.733 11.68-9.733.32-.267.32.267 11.68 9.733 11.68-9.733.32-.267.32.267 11.68 9.733 11.68-9.733.32-.267.32.267 11.68 9.733 11.68-9.733.32-.267.32.267 11.68 9.733 10.5-8.751V1.5H1.5v149.799l10.5 8.749 11.68-9.733Z" fill="#fff" stroke="#E6E6E6"/></g><defs><clipPath id="a"><path fill="#fff" transform="matrix(-1 0 0 1 264 0)" d="M0 0h264v162H0z"/></clipPath></defs></svg>
|
Before Width: | Height: | Size: 3.6 KiB |
|
@ -1,104 +0,0 @@
|
|||
var localStorage = require( 'mediawiki.storage' ).local;
|
||||
|
||||
/**
|
||||
* The OnboardingPopup is the pulsating dot and the popup widget.
|
||||
*
|
||||
* @constructor
|
||||
* @class
|
||||
*/
|
||||
function OnboardingPopup() {
|
||||
OnboardingPopup.super.call( this, {
|
||||
classes: [ 'ext-WikiEditor-realtimepreview-onboarding' ]
|
||||
} );
|
||||
|
||||
this.localStorageName = 'WikiEditor-RealtimePreview-onboarding-dismissed';
|
||||
if ( localStorage.get( this.localStorageName ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Okay button.
|
||||
var okayButton = new OO.ui.ButtonWidget( {
|
||||
label: mw.msg( 'wikieditor-realtimepreview-onboarding-button' ),
|
||||
flags: [ 'progressive', 'primary' ]
|
||||
} );
|
||||
okayButton.connect( this, { click: 'onPopupButtonClick' } );
|
||||
|
||||
// Pulsating dot.
|
||||
var $pulsatingDot = $( '<a>' ).addClass( 'ext-WikiEditor-realtimepreview-onboarding-dot mw-pulsating-dot' );
|
||||
|
||||
// Popup.
|
||||
var $popupContent = $( '<div>' ).append(
|
||||
$( '<div>' ).addClass( 'ext-WikiEditor-image-realtimepreview-onboarding' ),
|
||||
$( '<h3>' ).text( mw.msg( 'wikieditor-realtimepreview-onboarding-title' ) ),
|
||||
$( '<p>' ).text( mw.msg( 'wikieditor-realtimepreview-onboarding-body' ) ),
|
||||
$( '<div>' ).addClass( 'ext-WikiEditor-realtimepreview-onboarding-button' )
|
||||
.append( okayButton.$element )
|
||||
);
|
||||
var popup = new OO.ui.PopupWidget( {
|
||||
classes: [ 'ext-WikiEditor-realtimepreview-onboarding-popup' ],
|
||||
$floatableContainer: $pulsatingDot,
|
||||
$content: $popupContent,
|
||||
padded: true,
|
||||
width: 300,
|
||||
align: 'backwards'
|
||||
} );
|
||||
this.popup = popup;
|
||||
|
||||
// Toggle the popup when the dot is clicked.
|
||||
$pulsatingDot.on( 'click', function () {
|
||||
popup.toggle();
|
||||
} );
|
||||
// Close the popup when clicking anywhere outside it or the dot.
|
||||
$( 'html' ).on( 'click', function ( event ) {
|
||||
var $parents = $( event.target ).closest( '.ext-WikiEditor-realtimepreview-onboarding-popup, .ext-WikiEditor-realtimepreview-onboarding-dot' );
|
||||
if ( $parents.length === 0 && popup.isVisible() ) {
|
||||
popup.toggle( false );
|
||||
}
|
||||
} );
|
||||
|
||||
// Add the dot and popup to this widget.
|
||||
this.$element.append( $pulsatingDot, popup.$element );
|
||||
}
|
||||
|
||||
OO.inheritClass( OnboardingPopup, OO.ui.Widget );
|
||||
|
||||
/**
|
||||
* @param {Function} callback
|
||||
*/
|
||||
OnboardingPopup.prototype.setNextCloseAction = function ( callback ) {
|
||||
// Only register a next-action if the onboarding popup is not currently shown.
|
||||
// For example, if someone clicks the options button, gets the onboarding popup,
|
||||
// but then clicks the toolbar button, we don't want to register another next-action.
|
||||
if ( this.popup.isVisible() ) {
|
||||
return;
|
||||
}
|
||||
this.nextCloseAction = callback;
|
||||
};
|
||||
|
||||
/**
|
||||
* When clicking the 'okay, got it' button, hide and remove the popup
|
||||
* and record the fact that it shouldn't ever open again.
|
||||
*/
|
||||
OnboardingPopup.prototype.onPopupButtonClick = function () {
|
||||
// First run any close-action that's been registered.
|
||||
if ( this.nextCloseAction instanceof Function ) {
|
||||
this.nextCloseAction.call();
|
||||
}
|
||||
// Hide the popup now and forever.
|
||||
this.$element.remove();
|
||||
this.popup.$element.remove();
|
||||
this.popup = false;
|
||||
localStorage.set( this.localStorageName, true );
|
||||
};
|
||||
|
||||
/**
|
||||
* When the Realtime Preview button is clicked, show the onboarding popup (if it's not been dismissed).
|
||||
*/
|
||||
OnboardingPopup.prototype.onPreviewButtonClick = function () {
|
||||
if ( !this.popup ) {
|
||||
return;
|
||||
}
|
||||
this.popup.toggle( true );
|
||||
};
|
||||
|
||||
module.exports = OnboardingPopup;
|
|
@ -1,22 +0,0 @@
|
|||
.ext-WikiEditor-realtimepreview-onboarding-dot {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 100%;
|
||||
cursor: pointer;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.ext-WikiEditor-realtimepreview-onboarding-popup {
|
||||
.oo-ui-popupWidget-body-padded {
|
||||
margin: 12px;
|
||||
}
|
||||
|
||||
.ext-WikiEditor-image-realtimepreview-onboarding {
|
||||
// Height to match the SVG's.
|
||||
height: 164px;
|
||||
}
|
||||
|
||||
.ext-WikiEditor-realtimepreview-onboarding-button {
|
||||
margin-top: 24px;
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="296" height="164" fill="none">
|
||||
<path fill="#fff" d="M0 0h296v164H0z"/>
|
||||
<path fill="#A2A9B1" d="M111.192 62.572H77.475c-.262 0-.475.24-.475.536 0 .296.213.536.475.536h33.717c.262 0 .475-.24.475-.536 0-.296-.213-.536-.475-.536ZM89.84 80H77.16c-.088 0-.16.224-.16.5s.072.5.16.5h12.68c.088 0 .16-.224.16-.5s-.072-.5-.16-.5Zm-4.683 10.43H77.51a.522.522 0 0 0-.51.535c0 .296.228.536.51.536h7.647c.281 0 .51-.24.51-.536a.523.523 0 0 0-.51-.536Zm0 10.713H77.51c-.282 0-.51.24-.51.536 0 .296.228.536.51.536h7.647c.281 0 .51-.24.51-.536a.523.523 0 0 0-.51-.536ZM128.49 90.43h-7.647a.523.523 0 0 0-.51.535c0 .296.229.536.51.536h7.647c.282 0 .51-.24.51-.536a.523.523 0 0 0-.51-.536Zm0 10.713h-7.647c-.281 0-.51.24-.51.536 0 .296.229.536.51.536h7.647c.282 0 .51-.24.51-.536a.523.523 0 0 0-.51-.536Zm-9.868-10.713H87.378c-.261 0-.473.239-.473.535 0 .296.212.536.473.536h31.244c.261 0 .473-.24.473-.536 0-.296-.212-.536-.473-.536Zm0 10.713H87.378c-.261 0-.473.24-.473.536 0 .296.212.536.473.536h31.244c.261 0 .473-.24.473-.536 0-.296-.212-.536-.473-.536ZM115.583 80h12.834c.322 0 .583.224.583.5s-.261.5-.583.5h-12.834c-.322 0-.583-.224-.583-.5s.261-.5.583-.5Zm13.12-4h-10.406c-.164 0-.297.224-.297.5s.133.5.297.5h10.406c.164 0 .297-.224.297-.5s-.133-.5-.297-.5Zm-40.919 0H77.216c-.12 0-.216.224-.216.5s.097.5.216.5h10.568c.12 0 .216-.224.216-.5s-.097-.5-.216-.5Zm40.735 19.787H77.481c-.265 0-.481.24-.481.535 0 .296.216.536.481.536h51.038c.265 0 .481-.24.481-.536 0-.296-.216-.535-.481-.535Zm0 10.713H77.481c-.265 0-.481.24-.481.536 0 .296.216.536.481.536h51.038c.265 0 .481-.24.481-.536 0-.296-.216-.536-.481-.536Zm0-21.428H77.481c-.265 0-.481.24-.481.536 0 .296.216.536.481.536h51.038c.265 0 .481-.24.481-.536 0-.296-.216-.536-.481-.536Zm-27.243-27.857h-23.79c-.269 0-.486.24-.486.535 0 .296.217.536.486.536h23.79c.269 0 .486-.24.486-.535 0-.296-.217-.536-.486-.536Z"/>
|
||||
<path fill="#72777D" d="m93 76.121 6.372 2.529v-1.652l-4.304-1.558v-.073l4.304-1.558v-1.652L93 74.686v1.435ZM105.323 70h-1.661l-2.986 10h1.66l2.987-10ZM113 76.121v-1.435l-6.372-2.529v1.652l4.304 1.558v.073l-4.304 1.558v1.652L113 76.121Z"/>
|
||||
<g filter="url(#filter0_d_658_7101)">
|
||||
<path fill="#000" d="m167 81.685.119-31.257a.713.713 0 0 1 .715-.713h39.39v5.876c0 .392.319.71.71.71h5.804v56.775c0 .393-.193.46-.452.167 0 0-.543-.897-1.59-.897-1.048 0-.953.825-1.878 1.083-.926.257-.928-1.083-1.919-1.083-.992 0-1.046 1.083-1.99 1.083s-.882-1.083-1.914-1.083-1.132 1.083-2.038 1.083c-.906 0-.878-1.083-1.939-1.083s-1.056 1.083-1.994 1.083-.873-1.083-1.865-1.083-.954.826-1.913 1.083c-.958.257-1.129-1.083-2.087-1.083-.958 0-1.03 1.083-1.953 1.083-.924 0-.775-1.083-1.8-1.083-1.024 0-1.139 1.083-2.096 1.083-.958 0-1.04-1.083-2.037-1.083-.997 0-.889 1.083-1.872 1.083-.983 0-1.019-1.083-1.998-1.083-.978 0-.962 1.083-1.925 1.083-.962 0-.918-1.083-1.95-1.083-1.033 0-1.072 1.083-2.039 1.083-.967 0-.882-1.083-1.728-1.083s-1.199 1.372-2.122 1.083c-.923-.289-.817-1.083-1.848-1.083-1.03 0-1.395.855-1.395.855-.219.324-.396.266-.396-.124V81.685Z"/>
|
||||
<path stroke="#72777D" stroke-width="1.082" d="M167.541 81.686v-.001l.118-31.255a.177.177 0 0 1 .174-.174h38.85v5.335c0 .69.561 1.252 1.251 1.252h5.263v55.509a2.361 2.361 0 0 0-1.501-.546c-.338 0-.618.067-.86.196-.234.124-.399.29-.52.42a4.358 4.358 0 0 0-.071.076c-.2.216-.312.337-.572.41-.093.025-.111.007-.123-.001-.052-.031-.114-.097-.243-.259l-.038-.049c-.22-.281-.621-.793-1.37-.793-.736 0-1.139.426-1.395.698l-.011.012c-.269.284-.371.372-.584.372-.197 0-.27-.068-.513-.352l-.003-.004c-.112-.131-.274-.321-.499-.468a1.586 1.586 0 0 0-.899-.258c-.754 0-1.176.423-1.451.702-.293.296-.392.38-.587.38-.176 0-.243-.061-.506-.358a2.425 2.425 0 0 0-.521-.472 1.665 1.665 0 0 0-.912-.252c-.775 0-1.178.429-1.441.715-.267.29-.351.367-.553.367-.191 0-.263-.065-.496-.346l-.007-.009c-.107-.128-.264-.317-.478-.464a1.523 1.523 0 0 0-.884-.263c-.329 0-.602.07-.839.197a2.17 2.17 0 0 0-.515.409 2.725 2.725 0 0 0-.054.055c-.218.223-.353.361-.645.439-.102.028-.151.012-.198-.014-.078-.042-.165-.121-.31-.277a2.001 2.001 0 0 1-.057-.063c-.248-.271-.682-.746-1.382-.746-.719 0-1.119.428-1.369.695l-.016.017c-.267.286-.368.37-.568.37-.11 0-.158-.027-.197-.057-.064-.049-.119-.119-.235-.271l-.002-.004c-.1-.131-.251-.329-.471-.483a1.515 1.515 0 0 0-.895-.267c-.741 0-1.165.414-1.443.687l-.009.008c-.292.286-.413.387-.644.387-.227 0-.341-.096-.618-.379l-.014-.014c-.264-.27-.674-.689-1.405-.689-.36 0-.648.101-.885.266a2.315 2.315 0 0 0-.464.46l-.012.014c-.119.146-.183.22-.256.272a.406.406 0 0 1-.255.07c-.238 0-.349-.096-.606-.371l-.021-.021c-.25-.268-.647-.69-1.371-.69-.736 0-1.12.435-1.359.707l-.015.017c-.243.276-.335.358-.551.358-.213 0-.296-.078-.543-.358l-.005-.006a2.441 2.441 0 0 0-.503-.462 1.605 1.605 0 0 0-.899-.256c-.755 0-1.163.424-1.428.701l-.006.006c-.271.282-.377.375-.605.375a.38.38 0 0 1-.244-.068 1.218 1.218 0 0 1-.235-.259 2.41 2.41 0 0 0-.033-.045c-.188-.251-.531-.71-1.216-.71-.37 0-.662.153-.882.316a4.389 4.389 0 0 0-.461.419l-.07.071c-.325.322-.423.34-.547.301l-.001-.001c-.265-.083-.379-.207-.571-.417l-.077-.084a1.915 1.915 0 0 0-.514-.414 1.763 1.763 0 0 0-.847-.191c-.54 0-.953.181-1.25.401V81.686Z"/>
|
||||
</g>
|
||||
<path fill="#fff" stroke="#72777D" stroke-linecap="round" stroke-width="1.082" d="m167 81.685.119-31.257a.713.713 0 0 1 .715-.713h39.39v5.876c0 .392.319.71.71.71h5.804v56.775c0 .393-.193.46-.452.167 0 0-.543-.897-1.59-.897-1.048 0-.953.825-1.878 1.083-.926.257-.928-1.083-1.919-1.083-.992 0-1.046 1.083-1.99 1.083s-.882-1.083-1.914-1.083-1.132 1.083-2.038 1.083c-.906 0-.878-1.083-1.939-1.083s-1.056 1.083-1.994 1.083-.873-1.083-1.865-1.083-.954.826-1.913 1.083c-.958.257-1.129-1.083-2.087-1.083-.958 0-1.03 1.083-1.953 1.083-.924 0-.775-1.083-1.8-1.083-1.024 0-1.139 1.083-2.096 1.083-.958 0-1.04-1.083-2.037-1.083-.997 0-.889 1.083-1.872 1.083-.983 0-1.019-1.083-1.998-1.083-.978 0-.962 1.083-1.925 1.083-.962 0-.918-1.083-1.95-1.083-1.033 0-1.072 1.083-2.039 1.083-.967 0-.882-1.083-1.728-1.083s-1.199 1.372-2.122 1.083c-.923-.289-.817-1.083-1.848-1.083-1.03 0-1.395.855-1.395.855-.219.324-.396.266-.396-.124V81.685v0Z"/>
|
||||
<path fill="#C8CCD1" fill-rule="evenodd" stroke="#72777D" stroke-width="1.082" d="M207.584 56.479h5.736c.027-.001.037-.002.066 0 .194 0 .356-.168.356-.383a.389.389 0 0 0-.154-.315l-.046-.04-5.711-5.919a.336.336 0 0 0-.38-.08.385.385 0 0 0-.224.355v6c0 .214.162.382.357.382Z" clip-rule="evenodd"/>
|
||||
<g opacity=".35">
|
||||
<path fill="#A2A9B1" d="M173.849 61.107c1.786 0 3.234-1.435 3.234-3.204 0-1.77-1.448-3.204-3.234-3.204s-3.234 1.434-3.234 3.204c0 1.77 1.448 3.204 3.234 3.204Z"/>
|
||||
<path fill="#A2A9B1" fill-rule="evenodd" d="M198.051 62.175s7.795 5.25 9.549 3.32c1.754-1.933 0 2.803 0 2.803h-15.391m-24.829-3.276s6.212 4.34 14.869 4.34 2.118 2.78 2.118 2.78h-16.969" clip-rule="evenodd"/>
|
||||
<path fill="#C8CCD1" fill-rule="evenodd" d="M168.366 72.184s34.027-16.222 29.763-8.057c-4.263 8.164 15.271-1.918 15.271-1.918v9.975" clip-rule="evenodd"/>
|
||||
</g>
|
||||
<path fill="#F5F5F5" fill-rule="evenodd" d="M167.38 71.787h45.96v.712h-45.96v-.712Z" clip-rule="evenodd"/>
|
||||
<path fill="#A2A9B1" d="M196.929 78.55h-25.276a.356.356 0 0 0 0 .712h25.276a.356.356 0 1 0 0-.712Zm2.848 8.544h-28.124a.356.356 0 0 0 0 .712h28.124a.356.356 0 1 0 0-.712Zm-17.444 19.224h-10.68a.357.357 0 0 0 0 .712h10.68a.356.356 0 1 0 0-.712Zm27.054 0h-25.276a.357.357 0 0 0 0 .712h25.276a.356.356 0 1 0 0-.712Zm-32.394-14.24h-5.34a.356.356 0 0 0 0 .712h5.34a.356.356 0 1 0 0-.712Zm32.396 0h-5.34a.356.356 0 1 0 0 .712h5.34a.356.356 0 0 0 0-.712Zm-7.121 0h-23.496a.356.356 0 0 0 0 .712h23.496a.356.356 0 1 0 0-.712Zm-25.275 11.748h-5.34a.357.357 0 0 0 0 .712h5.34a.356.356 0 1 0 0-.712Zm32.754 0h-12.46a.357.357 0 0 0 0 .712h12.46a.356.356 0 1 0 0-.712Zm-14.243 0h-16.732a.357.357 0 0 0 0 .712h16.732a.356.356 0 1 0 0-.712Zm6.053-16.732h7.832a.356.356 0 1 1 0 .712h-7.832a.356.356 0 0 1 0-.712Zm-1.78 12.46h-28.124a.356.356 0 0 0 0 .712h28.124a.356.356 0 1 0 0-.712Zm-4.629-14.952h-4.272a.356.356 0 0 0 0 .712h4.272a.356.356 0 1 0 0-.712Zm14.241 0h-12.46a.356.356 0 0 0 0 .712h12.46a.356.356 0 1 0 0-.712Zm-20.292 0h-17.444a.356.356 0 0 0 0 .712h17.444a.356.356 0 1 0 0-.712Zm20.292 12.46h-37.736a.356.356 0 0 0 0 .712h37.736a.356.356 0 1 0 0-.712Zm0-2.492h-37.736a.356.356 0 0 0 0 .712h37.736a.356.356 0 1 0 0-.712Zm0 14.24h-37.736a.356.356 0 0 0 0 .712h37.736a.356.356 0 0 0 0-.712Zm0-19.224h-37.736a.356.356 0 0 0 0 .712h37.736a.356.356 0 1 0 0-.712Zm-20.29-13.528h-17.444a.356.356 0 1 0 0 .712h17.444a.356.356 0 0 0 0-.712Z"/>
|
||||
<path stroke="#36C" stroke-linecap="round" stroke-width="1.071" d="M148 34v35m0 28v36"/>
|
||||
<rect width="178.929" height="115.714" x="58.536" y="24.536" stroke="#C8CCD1" stroke-width="1.071" rx="3.75"/>
|
||||
<path fill="#36C" fill-rule="evenodd" d="M147 91V75h-2v16h2Zm4 0V75h-2v16h2Zm-11-8 3-3v6l-3-3Zm16 0-3 3v-6l3 3Z" clip-rule="evenodd"/>
|
||||
<defs>
|
||||
<filter id="filter0_d_658_7101" width="51.043" height="68.059" x="164.847" y="47.562" 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="1.076"/>
|
||||
<feColorMatrix values="0 0 0 0 0.961 0 0 0 0 0.961 0 0 0 0 0.961 0 0 0 1 0"/>
|
||||
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_658_7101"/>
|
||||
<feBlend in="SourceGraphic" in2="effect1_dropShadow_658_7101" result="shape"/>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
Before Width: | Height: | Size: 9.3 KiB |
|
@ -1,33 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="296" height="164" fill="none" viewBox="0 0 296 164">
|
||||
<path fill="#fff" d="M0 0h296v164H0z"/>
|
||||
<path fill="#A2A9B1" d="M184.808 62.572h33.717c.262 0 .475.24.475.536 0 .296-.213.536-.475.536h-33.717c-.262 0-.475-.24-.475-.536 0-.296.213-.536.475-.536ZM206.16 80h12.68c.088 0 .16.224.16.5s-.072.5-.16.5h-12.68c-.088 0-.16-.224-.16-.5s.072-.5.16-.5Zm4.683 10.43h7.647c.282 0 .51.239.51.535a.523.523 0 0 1-.51.536h-7.647a.524.524 0 0 1-.51-.536c0-.296.229-.536.51-.536Zm0 10.713h7.647c.282 0 .51.24.51.536a.523.523 0 0 1-.51.536h-7.647a.524.524 0 0 1-.51-.536c0-.296.229-.536.51-.536ZM167.51 90.43h7.647c.281 0 .51.239.51.535a.524.524 0 0 1-.51.536h-7.647a.523.523 0 0 1-.51-.536c0-.296.228-.536.51-.536Zm0 10.713h7.647c.281 0 .51.24.51.536a.524.524 0 0 1-.51.536h-7.647a.523.523 0 0 1-.51-.536c0-.296.228-.536.51-.536Zm9.868-10.713h31.244c.261 0 .473.239.473.535 0 .296-.212.536-.473.536h-31.244c-.261 0-.473-.24-.473-.536 0-.296.212-.536.473-.536Zm0 10.713h31.244c.261 0 .473.24.473.536 0 .296-.212.536-.473.536h-31.244c-.261 0-.473-.24-.473-.536 0-.296.212-.536.473-.536ZM180.417 80h-12.834c-.322 0-.583.224-.583.5s.261.5.583.5h12.834c.322 0 .583-.224.583-.5s-.261-.5-.583-.5Zm-13.12-4h10.406c.164 0 .297.224.297.5s-.133.5-.297.5h-10.406c-.164 0-.297-.224-.297-.5s.133-.5.297-.5Zm40.919 0h10.568c.119 0 .216.224.216.5s-.097.5-.216.5h-10.568c-.119 0-.216-.224-.216-.5s.097-.5.216-.5Zm-40.735 19.787h51.038c.265 0 .481.24.481.535 0 .296-.216.536-.481.536h-51.038c-.265 0-.481-.24-.481-.536 0-.296.216-.535.481-.535Zm0 10.713h51.038c.265 0 .481.24.481.536 0 .296-.216.536-.481.536h-51.038c-.265 0-.481-.24-.481-.536 0-.296.216-.536.481-.536Zm0-21.428h51.038c.265 0 .481.24.481.536 0 .296-.216.536-.481.536h-51.038c-.265 0-.481-.24-.481-.536 0-.296.216-.536.481-.536Zm27.243-27.857h23.79c.269 0 .486.24.486.535 0 .296-.217.536-.486.536h-23.79c-.269 0-.486-.24-.486-.535 0-.296.217-.536.486-.536Z"/>
|
||||
<path fill="#72777D" d="m183 76.121 6.372 2.529v-1.652l-4.304-1.558v-.073l4.304-1.558v-1.652L183 74.686v1.435ZM195.323 70h-1.661l-2.986 10h1.66l2.987-10ZM203 76.121v-1.435l-6.372-2.529v1.652l4.304 1.558v.073l-4.304 1.558v1.652L203 76.121Z"/>
|
||||
<g filter="url(#filter0_d_1709_33104)">
|
||||
<path fill="#000" d="m129 81.685-.119-31.257a.713.713 0 0 0-.715-.713h-39.39v5.876a.71.71 0 0 1-.71.71h-5.804v56.775c0 .393.193.46.452.167 0 0 .543-.897 1.59-.897 1.048 0 .953.825 1.878 1.083.926.257.927-1.083 1.92-1.083.991 0 1.045 1.083 1.989 1.083.944 0 .882-1.083 1.914-1.083s1.132 1.083 2.038 1.083c.906 0 .878-1.083 1.939-1.083 1.06 0 1.056 1.083 1.994 1.083.939 0 .873-1.083 1.865-1.083s.954.826 1.913 1.083c.958.257 1.129-1.083 2.087-1.083.958 0 1.03 1.083 1.953 1.083.924 0 .775-1.083 1.8-1.083 1.024 0 1.139 1.083 2.096 1.083.958 0 1.04-1.083 2.037-1.083.997 0 .889 1.083 1.872 1.083.983 0 1.019-1.083 1.998-1.083.978 0 .962 1.083 1.925 1.083.962 0 .918-1.083 1.95-1.083 1.033 0 1.072 1.083 2.039 1.083.967 0 .882-1.083 1.728-1.083s1.199 1.372 2.122 1.083c.923-.289.817-1.083 1.848-1.083 1.03 0 1.395.855 1.395.855.219.324.396.266.396-.124V81.685Z"/>
|
||||
<path stroke="#72777D" stroke-width="1.082" d="M128.459 81.686v-.001l-.118-31.255a.177.177 0 0 0-.174-.174H89.316v5.335c0 .69-.56 1.252-1.25 1.252h-5.263v55.509c.332-.27.837-.546 1.501-.546.338 0 .618.067.86.196.234.124.399.29.52.42l.072.076c.2.216.31.337.571.41.093.025.11.007.123-.001.052-.031.114-.097.243-.259l.038-.049c.22-.281.621-.793 1.37-.793.736 0 1.139.426 1.395.698l.011.012c.269.284.37.372.584.372.197 0 .27-.068.513-.352l.003-.004c.112-.131.274-.321.499-.468a1.59 1.59 0 0 1 .899-.258c.754 0 1.176.423 1.45.702.294.296.393.38.588.38.176 0 .243-.061.506-.358.119-.135.288-.325.521-.472.248-.156.545-.252.912-.252.775 0 1.178.429 1.441.715.267.29.35.367.553.367.191 0 .263-.065.496-.346l.007-.009c.107-.128.264-.317.478-.464.237-.162.525-.263.884-.263.329 0 .602.07.839.197.227.123.392.284.515.409l.054.055c.218.223.353.361.645.439.102.028.151.012.198-.014.078-.042.165-.121.31-.277l.057-.063c.248-.271.682-.746 1.382-.746.719 0 1.119.428 1.369.695l.016.017c.267.286.368.37.568.37.11 0 .158-.027.197-.057.064-.049.119-.119.235-.271l.002-.004c.1-.131.251-.329.471-.483.24-.168.532-.267.895-.267.741 0 1.165.414 1.443.687l.009.008c.292.286.413.387.644.387.227 0 .341-.096.618-.379l.014-.014c.264-.27.674-.689 1.405-.689.36 0 .648.101.885.266.209.146.361.333.464.46l.012.014c.119.146.183.22.256.272.053.037.122.07.255.07.238 0 .349-.096.606-.371l.021-.021c.25-.268.647-.69 1.371-.69.736 0 1.12.435 1.359.707l.015.017c.243.276.335.358.551.358.213 0 .296-.078.543-.358l.005-.006c.114-.13.279-.317.503-.462.243-.158.536-.256.899-.256.755 0 1.163.424 1.428.701l.006.006c.271.282.377.375.605.375a.38.38 0 0 0 .244-.068c.067-.048.13-.121.235-.259a2.41 2.41 0 0 1 .033-.045c.188-.251.531-.71 1.216-.71.37 0 .662.153.882.316.172.129.335.292.461.419l.07.071c.325.322.423.34.547.301l.001-.001c.265-.083.379-.207.571-.417l.077-.084c.12-.129.282-.292.514-.414.239-.127.515-.191.847-.191.54 0 .953.181 1.25.401V81.686Z"/>
|
||||
</g>
|
||||
<path fill="#fff" stroke="#72777D" stroke-linecap="round" stroke-width="1.082" d="m129 81.685-.119-31.257a.713.713 0 0 0-.715-.713h-39.39v5.876a.71.71 0 0 1-.71.71h-5.804v56.775c0 .393.193.46.452.167 0 0 .543-.897 1.59-.897 1.048 0 .953.825 1.878 1.083.926.257.927-1.083 1.92-1.083.991 0 1.045 1.083 1.989 1.083.944 0 .882-1.083 1.914-1.083s1.132 1.083 2.038 1.083c.906 0 .878-1.083 1.939-1.083 1.06 0 1.056 1.083 1.994 1.083.939 0 .873-1.083 1.865-1.083s.954.826 1.913 1.083c.958.257 1.129-1.083 2.087-1.083.958 0 1.03 1.083 1.953 1.083.924 0 .775-1.083 1.8-1.083 1.024 0 1.139 1.083 2.096 1.083.958 0 1.04-1.083 2.037-1.083.997 0 .889 1.083 1.872 1.083.983 0 1.019-1.083 1.998-1.083.978 0 .962 1.083 1.925 1.083.962 0 .918-1.083 1.95-1.083 1.033 0 1.072 1.083 2.039 1.083.967 0 .882-1.083 1.728-1.083s1.199 1.372 2.122 1.083c.923-.289.817-1.083 1.848-1.083 1.03 0 1.395.855 1.395.855.219.324.396.266.396-.124V81.685v0Z"/>
|
||||
<path fill="#C8CCD1" fill-rule="evenodd" stroke="#72777D" stroke-width="1.082" d="M88.416 56.479H82.68c-.027-.001-.037-.002-.066 0-.194 0-.356-.168-.356-.383 0-.13.059-.245.154-.315l.046-.04 5.71-5.919a.339.339 0 0 1 .381-.08.384.384 0 0 1 .224.355v6c0 .214-.162.382-.357.382Z" clip-rule="evenodd"/>
|
||||
<g opacity=".35">
|
||||
<path fill="#A2A9B1" d="M122.151 61.107c-1.786 0-3.234-1.435-3.234-3.204 0-1.77 1.448-3.204 3.234-3.204s3.234 1.434 3.234 3.204c0 1.77-1.448 3.204-3.234 3.204Z"/>
|
||||
<path fill="#A2A9B1" fill-rule="evenodd" d="M97.949 62.175s-7.795 5.25-9.55 3.32c-1.753-1.933 0 2.803 0 2.803h15.392m24.829-3.276s-6.212 4.34-14.869 4.34-2.118 2.78-2.118 2.78h16.969" clip-rule="evenodd"/>
|
||||
<path fill="#C8CCD1" fill-rule="evenodd" d="M127.634 72.184s-34.027-16.222-29.763-8.057c4.263 8.164-15.271-1.918-15.271-1.918v9.975" clip-rule="evenodd"/>
|
||||
</g>
|
||||
<path fill="#F5F5F5" fill-rule="evenodd" d="M128.62 71.787H82.66v.712h45.96v-.712Z" clip-rule="evenodd"/>
|
||||
<path fill="#A2A9B1" d="M99.07 78.55h25.277a.356.356 0 0 1 0 .712H99.071a.356.356 0 1 1 0-.712Zm-2.848 8.544h28.125a.356.356 0 0 1 0 .712H96.223a.356.356 0 1 1 0-.712Zm17.445 19.224h10.68a.357.357 0 0 1 0 .712h-10.68a.356.356 0 1 1 0-.712Zm-27.054 0h25.276a.357.357 0 0 1 0 .712H86.613a.356.356 0 1 1 0-.712Zm32.394-14.24h5.34a.356.356 0 0 1 0 .712h-5.34a.356.356 0 1 1 0-.712Zm-32.395 0h5.34a.356.356 0 0 1 0 .712h-5.34a.356.356 0 0 1 0-.712Zm7.12 0h23.496a.356.356 0 0 1 0 .712H93.732a.356.356 0 1 1 0-.712Zm25.275 11.748h5.34a.357.357 0 0 1 0 .712h-5.34a.356.356 0 1 1 0-.712Zm-32.754 0h12.46a.356.356 0 0 1 0 .712h-12.46a.356.356 0 1 1 0-.712Zm14.243 0h16.732a.357.357 0 0 1 0 .712h-16.732a.356.356 0 1 1 0-.712Zm-6.053-16.732H86.61a.356.356 0 0 0 0 .712h7.832a.356.356 0 1 0 0-.712Zm1.779 12.46h28.125a.356.356 0 0 1 0 .712H96.223a.356.356 0 1 1 0-.712Zm4.63-14.952h4.272a.356.356 0 0 1 0 .712h-4.272a.356.356 0 1 1 0-.712Zm-14.242 0h12.46a.356.356 0 0 1 0 .712H86.61a.356.356 0 1 1 0-.712Zm20.293 0h17.444a.356.356 0 0 1 0 .712h-17.444a.356.356 0 1 1 0-.712ZM86.61 97.062h37.737a.356.356 0 0 1 0 .712H86.611a.356.356 0 0 1 0-.712Zm0-2.492h37.737a.356.356 0 0 1 0 .712H86.611a.356.356 0 0 1 0-.712Zm0 14.24h37.737a.356.356 0 0 1 0 .712H86.611a.356.356 0 0 1 0-.712Zm0-19.224h37.737a.356.356 0 0 1 0 .712H86.611a.356.356 0 0 1 0-.712Zm20.291-13.528h17.444a.356.356 0 1 1 0 .712h-17.444a.356.356 0 0 1 0-.712Z"/>
|
||||
<path stroke="#36C" stroke-linecap="round" stroke-width="1.071" d="M148 34v35m0 28v36"/>
|
||||
<rect width="178.929" height="115.714" x="-.536" y=".536" stroke="#C8CCD1" stroke-width="1.071" rx="3.75" transform="matrix(-1 0 0 1 236.929 24)"/>
|
||||
<path fill="#36C" fill-rule="evenodd" d="M149 91V75h2v16h-2Zm-4 0V75h2v16h-2Zm11-8-3-3v6l3-3Zm-16 0 3 3v-6l-3 3Z" clip-rule="evenodd"/>
|
||||
<defs>
|
||||
<filter id="filter0_d_1709_33104" width="51.043" height="68.059" x="80.109" y="47.562" 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="1.076"/>
|
||||
<feColorMatrix values="0 0 0 0 0.961 0 0 0 0 0.961 0 0 0 0 0.961 0 0 0 1 0"/>
|
||||
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_1709_33104"/>
|
||||
<feBlend in="SourceGraphic" in2="effect1_dropShadow_1709_33104" result="shape"/>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
Before Width: | Height: | Size: 9.2 KiB |
|
@ -2,7 +2,7 @@ var ResizingDragBar = require( './ResizingDragBar.js' );
|
|||
var TwoPaneLayout = require( './TwoPaneLayout.js' );
|
||||
var ErrorLayout = require( './ErrorLayout.js' );
|
||||
var ManualWidget = require( './ManualWidget.js' );
|
||||
var OnboardingPopup = require( './OnboardingPopup.js' );
|
||||
var localStorage = require( 'mediawiki.storage' ).local;
|
||||
|
||||
/**
|
||||
* @class
|
||||
|
@ -55,8 +55,6 @@ function RealtimePreview() {
|
|||
}.bind( this )
|
||||
} );
|
||||
|
||||
this.onboardingPopup = new OnboardingPopup();
|
||||
|
||||
// Manual mode widget.
|
||||
this.manualWidget = new ManualWidget( this, this.reloadButton );
|
||||
// Set up a property for reducedMotion — useful for customising the UI message.
|
||||
|
@ -106,16 +104,15 @@ RealtimePreview.prototype.getToolbarButton = function ( context ) {
|
|||
if ( !this.isScreenWideEnough() ) {
|
||||
this.enabled = false;
|
||||
this.button.toggle( false );
|
||||
this.onboardingPopup.toggle( false );
|
||||
}
|
||||
|
||||
// Hide or show the preview and toolbar button when the window is resized.
|
||||
$( window ).on( 'resize', this.enableFeatureWhenScreenIsWideEnough.bind( this ) );
|
||||
|
||||
// Add the onboarding popup.
|
||||
this.button.connect( this.onboardingPopup, { change: this.onboardingPopup.onPreviewButtonClick } );
|
||||
// Remove the old onboarding-status storage that was discontinued in March 2023.
|
||||
localStorage.remove( 'WikiEditor-RealtimePreview-onboarding-dismissed' );
|
||||
|
||||
return $( '<div>' ).append( this.button.$element, this.onboardingPopup.$element );
|
||||
return $( '<div>' ).append( this.button.$element );
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -256,14 +253,12 @@ RealtimePreview.prototype.enableFeatureWhenScreenIsWideEnough = function () {
|
|||
var isScreenWideEnough = this.isScreenWideEnough();
|
||||
if ( !isScreenWideEnough && previewButtonIsVisible ) {
|
||||
this.button.toggle( false );
|
||||
this.onboardingPopup.toggle( false );
|
||||
this.reloadButton.setDisabled( true );
|
||||
if ( this.enabled ) {
|
||||
this.setEnabled( false, false );
|
||||
}
|
||||
} else if ( isScreenWideEnough && !previewButtonIsVisible ) {
|
||||
this.button.toggle( true );
|
||||
this.onboardingPopup.toggle( true );
|
||||
this.reloadButton.setDisabled( false );
|
||||
// if user preference and realtime disable
|
||||
if ( !this.enabled && this.getUserPref() ) {
|
||||
|
|
Loading…
Reference in a new issue