Skip to content

Commit

Permalink
Removed Collections code from Admin
Browse files Browse the repository at this point in the history
ref https://linear.app/ghost/issue/ENG-1805/remove-collections-code

- we're removing this feature as it's not finished to the degree we
  would like, so this commit removes all references to it from Admin in
  order to keep things clean
  • Loading branch information
daniellockyer committed Dec 4, 2024
1 parent ed6c57e commit 4c13f18
Show file tree
Hide file tree
Showing 22 changed files with 1 addition and 613 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ const features = [{
title: 'Email customization',
description: 'Adding more control over the newsletter template',
flag: 'emailCustomization'
},{
title: 'Collections',
description: 'Enables Collections 2.0',
flag: 'collections'
},{
title: 'Collections Card',
description: 'Enables the Collections Card for pages - requires Collections and the beta Editor to be enabled',
Expand Down
90 changes: 0 additions & 90 deletions ghost/admin/app/components/collections/collection-form.hbs

This file was deleted.

65 changes: 0 additions & 65 deletions ghost/admin/app/components/collections/collection-form.js

This file was deleted.

19 changes: 0 additions & 19 deletions ghost/admin/app/components/collections/delete-collection-modal.hbs

This file was deleted.

29 changes: 0 additions & 29 deletions ghost/admin/app/components/collections/delete-collection-modal.js

This file was deleted.

32 changes: 0 additions & 32 deletions ghost/admin/app/components/collections/list-item.hbs

This file was deleted.

21 changes: 0 additions & 21 deletions ghost/admin/app/components/koenig-lexical-editor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as Sentry from '@sentry/ember';
import Component from '@glimmer/component';
import React, {Suspense} from 'react';
import fetch from 'fetch';
import ghostPaths from 'ghost-admin/utils/ghost-paths';
import moment from 'moment-timezone';
import {action} from '@ember/object';
Expand Down Expand Up @@ -276,24 +275,6 @@ export default class KoenigLexicalEditor extends Component {
return response;
};

const fetchCollectionPosts = async (collectionSlug) => {
if (!this.contentKey) {
const integrations = await this.store.findAll('integration');
const contentIntegration = integrations.findBy('slug', 'ghost-core-content');
this.contentKey = contentIntegration?.contentKey.secret;
}

const postsUrl = new URL(this.ghostPaths.url.admin('/api/content/posts/'), window.location.origin);
postsUrl.searchParams.append('key', this.contentKey);
postsUrl.searchParams.append('collection', collectionSlug);
postsUrl.searchParams.append('limit', 12);

const response = await fetch(postsUrl.toString());
const {posts} = await response.json();

return posts;
};

const fetchAutocompleteLinks = async () => {
const defaults = [
{label: 'Homepage', value: window.location.origin + '/'},
Expand Down Expand Up @@ -455,13 +436,11 @@ export default class KoenigLexicalEditor extends Component {
unsplash: this.settings.unsplash ? unsplashConfig.defaultHeaders : null,
tenor: this.config.tenor?.googleApiKey ? this.config.tenor : null,
fetchAutocompleteLinks,
fetchCollectionPosts,
fetchEmbed,
fetchLabels,
renderLabels: !this.session.user.isContributor,
feature: {
collectionsCard: this.feature.collectionsCard,
collections: this.feature.collections,
contentVisibility: this.feature.contentVisibility
},
deprecated: { // todo fix typo
Expand Down
43 changes: 0 additions & 43 deletions ghost/admin/app/controllers/collection.js

This file was deleted.

38 changes: 0 additions & 38 deletions ghost/admin/app/controllers/collections.js

This file was deleted.

Loading

0 comments on commit 4c13f18

Please sign in to comment.