mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Removed search labs flag
- the search helper was promoted to GA and we no longer need the feature flag
This commit is contained in:
parent
abe9811c6c
commit
f31a50270d
4 changed files with 1 additions and 33 deletions
|
@ -62,7 +62,6 @@ export default class FeatureService extends Service {
|
|||
@feature('freeTrial') freeTrial;
|
||||
@feature('compExpiring') compExpiring;
|
||||
@feature('memberAttribution') memberAttribution;
|
||||
@feature('searchHelper') searchHelper;
|
||||
@feature('emailAlerts') emailAlerts;
|
||||
@feature('emailClicks') emailClicks;
|
||||
@feature('sourceAttribution') sourceAttribution;
|
||||
|
|
|
@ -239,19 +239,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gh-expandable-block">
|
||||
<div class="gh-expandable-header">
|
||||
<div>
|
||||
<h4 class="gh-expandable-title">Search helper</h4>
|
||||
<p class="gh-expandable-description">
|
||||
Enable the <code>{{search}}</code> handlebars helper.
|
||||
</p>
|
||||
</div>
|
||||
<div class="for-switch">
|
||||
<GhFeatureFlag @flag="searchHelper" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gh-expandable-block">
|
||||
<div class="gh-expandable-header">
|
||||
<div>
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// # search helper
|
||||
|
||||
const {SafeString} = require('../services/handlebars');
|
||||
const {labs} = require('../services/proxy');
|
||||
|
||||
function search() {
|
||||
module.exports = function search() {
|
||||
// We want this to output as one line, but splitting for readability
|
||||
const svg = '<button class="gh-search-icon" aria-label="search" data-ghost-search '
|
||||
+ 'style="display: inline-flex; justify-content: center; align-items: center; width: 32px; height: 32px; padding: 0; border: 0; color: inherit; background-color: transparent; cursor: pointer; outline: none;">'
|
||||
|
@ -11,17 +10,4 @@ function search() {
|
|||
+ '<path d="M10 3a7 7 0 1 0 0 14 7 7 0 0 0 0-14Zm-9 7a9 9 0 1 1 18 0 9 9 0 0 1-18 0Z" fill="currentColor"/></svg></button>';
|
||||
|
||||
return new SafeString(svg);
|
||||
}
|
||||
|
||||
module.exports = function searchLabsWrapper() {
|
||||
let self = this;
|
||||
let args = arguments;
|
||||
|
||||
return labs.enabledHelper({
|
||||
flagKey: 'searchHelper',
|
||||
flagName: 'Search helper',
|
||||
helperName: 'search'
|
||||
}, () => {
|
||||
return search.apply(self, args); // eslint-disable-line camelcase
|
||||
});
|
||||
};
|
||||
|
|
|
@ -9,10 +9,6 @@ describe('Search helper', function () {
|
|||
handlebars.registerHelper('search', searchHelper);
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
sinon.stub(labs, 'isSet').returns(true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
sinon.restore();
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue