Skip to content
Draft
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
5 changes: 5 additions & 0 deletions .changeset/remove-storyblok-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tokens-studio/figma-plugin": patch
---

Remove Storyblok integration and changelog dialog feature. The changelog dialog functionality has been removed and can be brought back with a different system in the future.
1 change: 0 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ Required environment variables in `.env` files:

```
MIXPANEL_ACCESS_TOKEN=
STORYBLOK_ACCESS_TOKEN=
ENVIRONMENT=development
LICENSE_API_URL=https://licence.tokens.studio
LAUNCHDARKLY_SDK_CLIENT=626fb05d52e5c715abd11b5e
Expand Down
1 change: 0 additions & 1 deletion developer-knowledgebase/creating-a-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ In order to release a new version, first make sure you have the correct `.env` v

```
MIXPANEL_ACCESS_TOKEN=INSERT_MIXPANEL_ACCESS_TOKEN
STORYBLOK_ACCESS_TOKEN=INSERT_STORYBLOK_ACCESS_TOKEN
ENVIRONMENT=production
LICENSE_API_URL=https://figmatokens-api.herokuapp.com
LAUNCHDARKLY_SDK_CLIENT=626fb05d52e5c715abd11b5e
Expand Down
1 change: 0 additions & 1 deletion packages/tokens-studio-for-figma/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
MIXPANEL_ACCESS_TOKEN=
STORYBLOK_ACCESS_TOKEN=
ENVIRONMENT=development
LICENSE_API_URL=https://licence.tokens.studio
LAUNCHDARKLY_SDK_CLIENT=626fb05d52e5c715abd11b5e
1 change: 0 additions & 1 deletion packages/tokens-studio-for-figma/.env.production.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
MIXPANEL_ACCESS_TOKEN=
STORYBLOK_ACCESS_TOKEN=
ENVIRONMENT=production
LICENSE_API_URL=https://licence.tokens.studio
LAUNCHDARKLY_SDK_CLIENT=626fb05d52e5c715abd11b5e
4 changes: 0 additions & 4 deletions packages/tokens-studio-for-figma/cypress/support/mockEnv.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ const MockEnv = () => {
success: true
}).as('mixpanel')

cy.intercept('GET', `https://api.storyblok.com/**`, {
success: true
}).as('storyblok')

cy.intercept('GET', `https://app.launchdarkly.com/**`, {
success: true
}).as('app-launchdarkly')
Expand Down
1 change: 0 additions & 1 deletion packages/tokens-studio-for-figma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@
"reselect": "^4.1.5",
"rooks": "^6.4.2",
"set-value": "^3.0.3",
"storyblok-js-client": "^3.3.1",
"use-debounce": "^6.0.1",
"uuid": "^9.0.0",
"zod": "^3.22.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import ConfirmDialog from '../ConfirmDialog';
import WindowResizer from '../WindowResizer';
import ImportedTokensDialog from '../ImportedTokensDialog';
import PushDialog from '../PushDialog';
import Changelog from '../Changelog';
import OnboardingFlow from '../OnboardingFlow';
import { Initiator } from '../Initiator';
import { globalStyles } from '../globalStyles';
Expand Down Expand Up @@ -104,7 +103,6 @@ export const AppContainer = withLDProviderWrapper((params: Props) => {
}
<WindowResizer />
<OnboardingFlow />
<Changelog />
<SecondScreenSync />
<AuthModal />
<BitbucketMigrationDialog />
Expand Down
88 changes: 0 additions & 88 deletions packages/tokens-studio-for-figma/src/app/components/Changelog.tsx

This file was deleted.

18 changes: 2 additions & 16 deletions packages/tokens-studio-for-figma/src/app/store/models/uiState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
import { createModel } from '@rematch/core';
import { track } from '@/utils/analytics';
import type { RootModel } from '@/types/RootModel';
import fetchChangelog from '@/utils/storyblok';
import { NodeTokenRefMap } from '@/types/NodeTokenRefMap';
import { SelectionGroup, StoryblokStory, ErrorCategory } from '@/types';
import { SelectionGroup, ErrorCategory } from '@/types';
import { Tabs } from '@/constants/Tabs';
import { AsyncMessageTypes } from '@/types/AsyncMessages';
import { AsyncMessageChannel } from '@/AsyncMessageChannel';
Expand Down Expand Up @@ -68,7 +67,6 @@ export interface UIState {
apiProviders: StorageTypeCredentials[];
localApiState: StorageTypeFormValues<true>;
lastUpdatedAt: string | null;
changelog: StoryblokStory['content'][];
lastOpened: number | null;
onboardingExplainerSets: boolean;
onboardingExplainerExportSets: boolean;
Expand Down Expand Up @@ -132,7 +130,6 @@ export const uiState = createModel<RootModel>()({
format: TokenFormatOptions.Legacy,
},
lastUpdatedAt: null,
changelog: [],
lastOpened: '',
onboardingExplainerSets: null,
onboardingExplainerExportSets: null,
Expand Down Expand Up @@ -312,12 +309,6 @@ export const uiState = createModel<RootModel>()({
apiProviders: payload,
};
},
setChangelog(state, payload: StoryblokStory['content'][]) {
return {
...state,
changelog: payload,
};
},
setLastOpened(state, payload: number) {
return {
...state,
Expand Down Expand Up @@ -450,12 +441,7 @@ export const uiState = createModel<RootModel>()({
triggerMigrationEdit: data,
}),
},
effects: (dispatch) => ({
setLastOpened: (payload) => {
fetchChangelog(payload, (result) => {
dispatch.uiState.setChangelog(result);
});
},
effects: (_dispatch) => ({
setOnboardingExplainerSets: (payload) => {
AsyncMessageChannel.ReactInstance.message({
type: AsyncMessageTypes.SET_ONBOARDINGEXPLAINERSETS,
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion packages/tokens-studio-for-figma/src/selectors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export * from './apiProvidersSelector';
export * from './activeApiProviderSelector';
export * from './hasUnsavedChangesSelector';
export * from './activeTabSelector';
export * from './changelogSelector';
export * from './projectURLSelector';
export * from './lastSyncedStateSelector';
export * from './lastErrorSelector';
Expand Down
11 changes: 0 additions & 11 deletions packages/tokens-studio-for-figma/src/types/ChangelogItem.ts

This file was deleted.

17 changes: 0 additions & 17 deletions packages/tokens-studio-for-figma/src/types/StoryblokStory.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/tokens-studio-for-figma/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export * from './SelectionGroup';
export * from './SelectionValue';
export * from './PullStylesOptions';
export * from './PullVariablesOptions';
export * from './StoryblokStory';
export * from './ThemeObject';
export * from './UsedTokenSetsMap';
export * from './StitchesCSS';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('formatTokens per theme', () => {
{
name: 'typography.baseline',
type: TokenTypes.FONT_SIZES,
value: '16px', // desktop baseline
value: '16px', // desktop baseline
},
],
'typography-tokens': [
Expand All @@ -41,7 +41,7 @@ describe('formatTokens per theme', () => {
],
};

// Define themes that use different typography baselines
// Define themes that use different typography baselines
const themes: ThemeObject[] = [
{
id: 'mobile',
Expand Down Expand Up @@ -87,11 +87,11 @@ describe('formatTokens per theme', () => {
}));

// Verify that each theme has different baseline values
expect(mobileFormatted['mobile-base']['typography']['baseline']['$value']).toBe('14px');
expect(desktopFormatted['desktop-base']['typography']['baseline']['$value']).toBe('16px');
expect(mobileFormatted['mobile-base'].typography.baseline.$value).toBe('14px');
expect(desktopFormatted['desktop-base'].typography.baseline.$value).toBe('16px');

// Verify that typography heading fontSize resolves differently for each theme
expect(mobileFormatted['typography-tokens']['typography']['heading']['fontSize']['$value']).toBe('14px');
expect(desktopFormatted['typography-tokens']['typography']['heading']['fontSize']['$value']).toBe('16px');
expect(mobileFormatted['typography-tokens'].typography.heading.fontSize.$value).toBe('14px');
expect(desktopFormatted['typography-tokens'].typography.heading.fontSize.$value).toBe('16px');
});
});
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import getLastOpened from './getLastOpened';
import { mockGetAsync } from '../../tests/__mocks__/figmaMock';

describe('fetchChangelog', () => {
describe('getLastOpened', () => {
it('user lanch the plugin for the first time', async () => {
expect.assertions(1);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function mapTokensToVariableInfo(
token: ResolveTokenValuesResult,
theme: ThemeObject,
settings: SettingsState,
baseFontSize?: string
baseFontSize?: string,
) {
// Use the provided baseFontSize (theme-specific) or fall back to settings.baseFontSize
const effectiveBaseFontSize = baseFontSize || settings?.baseFontSize;
Expand Down
26 changes: 0 additions & 26 deletions packages/tokens-studio-for-figma/src/utils/storyblok.test.ts

This file was deleted.

42 changes: 0 additions & 42 deletions packages/tokens-studio-for-figma/src/utils/storyblok.ts

This file was deleted.