Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import { __ } from '@wordpress/i18n';
import TemplatedString from '../../../elements/TemplatedString.svelte';
import { isModuleAvailableStore, modules } from '../../../stores/modules';
import { modules } from '../../../stores/modules';
import {
requestCloudCss,
pollCloudCssStatus,
Expand All @@ -23,7 +23,7 @@

// svelte-ignore unused-export-let - Ignored values supplied by svelte-navigator.
export let location, navigate;
const isImageGuideActive = isModuleAvailableStore( 'image-guide' );

$: cloudCssAvailable = !! $modules[ 'cloud-css' ];
</script>

Expand Down Expand Up @@ -107,23 +107,22 @@
</p>
</Module>

{#if $isImageGuideActive}
<div class="settings">
<Module slug={'image-guide'}>
<h3 slot="title">{__( 'Image Guide', 'jetpack-boost' )}<span class="beta">Beta</span></h3>
<p slot="description">
{__(
`This feature helps you discover the images are too large. When you browse your site, the image guide will show you an overlay with information about each image's size.`,
'jetpack-boost'
)}
</p>
<!-- svelte-ignore missing-declaration -->
{#if false === Jetpack_Boost.site.canResizeImages}
<ResizingUnavailable />
{/if}
</Module>
</div>
{/if}
<div class="settings">
<Module slug={'image-guide'}>
<h3 slot="title">{__( 'Image Guide', 'jetpack-boost' )}<span class="beta">Beta</span></h3>
<p slot="description">
{__(
`This feature helps you discover the images are too large. When you browse your site, the image guide will show you an overlay with information about each image's size.`,
'jetpack-boost'
)}
</p>
<!-- svelte-ignore missing-declaration -->
{#if false === Jetpack_Boost.site.canResizeImages}
<ResizingUnavailable />
{/if}
</Module>
</div>

<SuperCacheInfo />
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Remove leftovers from the image-guide feature gate


16 changes: 6 additions & 10 deletions projects/plugins/boost/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ if ( ! production ) {
}

const GUIDE_PATH = `app/features/image-guide`;
/**
* Replace the variable with `production` when publishing.
*/
const imageGuideProduction = false;

export default [
/**
Expand Down Expand Up @@ -215,7 +211,7 @@ export default [
{
input: `${ GUIDE_PATH }/src/index.ts`,
output: {
sourcemap: ! imageGuideProduction,
sourcemap: ! production,
format: 'iife',
name: 'app',
file: `${ GUIDE_PATH }/dist/guide.js`,
Expand Down Expand Up @@ -251,21 +247,21 @@ export default [
postcss( {
extensions: [ '.css', '.sss', '.pcss', '.sass', '.scss' ],
extract: path.resolve( `${ GUIDE_PATH }/dist/guide.css` ),
minimize: imageGuideProduction,
minimize: production,
} ),

svelteSVG(),
svelte( {
preprocess: sveltePreprocess( { sourceMap: ! imageGuideProduction } ),
preprocess: sveltePreprocess( { sourceMap: ! production } ),
compilerOptions: {
// enable run-time checks when not in production
dev: ! imageGuideProduction,
dev: ! production,
},
} ),

typescript( {
sourceMap: ! imageGuideProduction,
inlineSources: ! imageGuideProduction,
sourceMap: ! production,
inlineSources: ! production,
// In order to let @rollup/plugin-typescript hanlde TS files from js-packages
// we need to include those here and pass the custom tsconfig as well
include: tsconfig.include,
Expand Down