Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
bf1ba71
Migrate to proxy architecture with lazy loading
talissoncosta Dec 17, 2025
8ecc16c
Add husky, lint-staged, and CI workflow
talissoncosta Dec 17, 2025
b430daa
Add dist-types to gitignore
talissoncosta Dec 17, 2025
af2cc62
Fix CI build with safer TypeScript compilation
talissoncosta Dec 17, 2025
1d87124
Simplify TypeScript build script
talissoncosta Dec 17, 2025
a4bdcb5
Split CI into 3 parallel jobs: lint, typecheck, build
talissoncosta Dec 17, 2025
4e25dbf
Add dev preview with mock data and Codespaces support
talissoncosta Dec 17, 2025
5319f85
Fix TypeError when accessing feature_state_value properties
talissoncosta Dec 19, 2025
55f1245
Remove unused getEnvironmentFeatures method
talissoncosta Dec 19, 2025
17d538c
Remove unused dependencies: @backstage/theme, @material-ui/lab, react…
talissoncosta Dec 19, 2025
83e9c32
chore: add missing EOF newline and ignore dist-demo
talissoncosta Dec 23, 2025
9511e90
Add alpha export with Backstage new frontend system
talissoncosta Dec 19, 2025
c50659d
refactor: remove legacy frontend system files
talissoncosta Dec 23, 2025
fc41454
feat: make new frontend system the default export
talissoncosta Dec 23, 2025
796e205
chore: remove alpha export path from package.json
talissoncosta Dec 23, 2025
bf06364
fix(dev): update dev server for new frontend system
talissoncosta Dec 23, 2025
74f6679
refactor: remove component exports from index
talissoncosta Dec 23, 2025
66cdd63
Merge remote-tracking branch 'origin/main' into feat/6421-alpha-export
talissoncosta Jan 5, 2026
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
7 changes: 4 additions & 3 deletions dev/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { PropsWithChildren } from 'react';
import { createDevApp } from '@backstage/dev-utils';
import { EntityProvider } from '@backstage/plugin-catalog-react';
import { Entity } from '@backstage/catalog-model';
import { setupWorker } from 'msw';
import { PropsWithChildren } from 'react';
import { flagsmithPlugin, FlagsTab, FlagsmithOverviewCard, FlagsmithUsageCard } from '../src';
import { FlagsTab } from '../src/components/FlagsTab';
import { FlagsmithOverviewCard } from '../src/components/FlagsmithOverviewCard';
import { FlagsmithUsageCard } from '../src/components/FlagsmithUsageCard';
import { handlers } from './mockHandlers';

// Start MSW worker for API mocking
Expand Down Expand Up @@ -37,7 +39,6 @@ const EntityWrapper = ({ children }: PropsWithChildren<{}>) => (
);

createDevApp()
.registerPlugin(flagsmithPlugin)
.addPage({
element: (
<EntityWrapper>
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@
"backstage-cli package lint --fix"
]
},
"exports": {
".": "./src/index.ts",
"./package.json": "./package.json"
},
"dependencies": {
"@backstage/core-components": "^0.18.2",
"@backstage/core-plugin-api": "^1.11.1",
"@backstage/frontend-plugin-api": "^0.13.2",
"@backstage/plugin-catalog-react": "^1.13.3",
"@material-ui/core": "^4.9.13",
"@material-ui/icons": "^4.9.1",
Expand Down
70 changes: 66 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,66 @@
// Frontend plugin exports
export { flagsmithPlugin, FlagsTab } from './plugin';
export { FlagsmithOverviewCard } from './components/FlagsmithOverviewCard';
export { FlagsmithUsageCard } from './components/FlagsmithUsageCard';
import { createElement } from 'react';
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
import {
EntityContentBlueprint,
EntityCardBlueprint,
} from '@backstage/plugin-catalog-react/alpha';

/**
* Entity content (tab) for FlagsTab - displays feature flags for an entity
* Requires annotation: flagsmith.com/project-id
*/
const flagsTabContent = EntityContentBlueprint.make({
name: 'flags',
params: {
path: '/flagsmith',
title: 'Feature Flags',
filter: 'has:annotation:flagsmith.com/project-id',
loader: () =>
import('./components/FlagsTab').then(m => createElement(m.FlagsTab)),
},
});

/**
* Entity card for FlagsmithOverviewCard - shows flag overview in entity page
* Requires annotation: flagsmith.com/project-id
*/
const overviewCard = EntityCardBlueprint.make({
name: 'overview',
params: {
filter: 'has:annotation:flagsmith.com/project-id',
loader: () =>
import('./components/FlagsmithOverviewCard').then(m =>
createElement(m.FlagsmithOverviewCard),
),
},
});

/**
* Entity card for FlagsmithUsageCard - shows 30-day usage analytics
* Requires annotations: flagsmith.com/project-id, flagsmith.com/org-id
*/
const usageCard = EntityCardBlueprint.make({
name: 'usage',
params: {
filter: 'has:annotation:flagsmith.com/project-id,flagsmith.com/org-id',
loader: () =>
import('./components/FlagsmithUsageCard').then(m =>
createElement(m.FlagsmithUsageCard),
),
},
});

/**
* Flagsmith plugin for Backstage's new frontend system.
*
* This plugin provides:
* - Entity content tab showing feature flags
* - Overview card for entity pages
* - Usage analytics card
*/
const flagsmithPlugin = createFrontendPlugin({
pluginId: 'flagsmith',
extensions: [flagsTabContent, overviewCard, usageCard],
});

export default flagsmithPlugin;
7 changes: 0 additions & 7 deletions src/plugin.test.ts

This file was deleted.

22 changes: 0 additions & 22 deletions src/plugin.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/routes.ts

This file was deleted.