Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove app-config and feature flag implementation #7268

Merged
merged 1 commit into from
Dec 4, 2024
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

This file was deleted.

40 changes: 0 additions & 40 deletions modules/app-config/index.ts

This file was deleted.

16 changes: 0 additions & 16 deletions modules/app-config/package.json

This file was deleted.

19 changes: 0 additions & 19 deletions modules/app-config/types.ts

This file was deleted.

13 changes: 0 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions source/lib/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,13 @@ import {
setItem,
setStoragePrefix,
} from '@frogpond/storage'
import {AppConfigEntry} from '@frogpond/app-config'
import type {FilterComboType} from '../views/sis/course-search/lib/format-filter-combo'
import type {CourseType, TermType} from './course-search/types'

export {clearAsyncStorage}

setStoragePrefix('aao:')

/// MARK: Feature flags

const featureFlagsKey = 'app:feature-flag'
export function setFeatureFlag(
name: AppConfigEntry,
value: boolean,
): Promise<void> {
const key = `${featureFlagsKey}:${name}`
return setItem(key, value)
}
export function getFeatureFlag(name: AppConfigEntry): Promise<boolean> {
const key = `${featureFlagsKey}:${name}`
return getItemAsBoolean(key)
}

/// MARK: Settings

const homescreenOrderKey = 'homescreen:view-order'
Expand Down
5 changes: 0 additions & 5 deletions source/navigation/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,6 @@ const SettingsStackScreens = () => {

{/* developer */}
<SettingsStack.Group>
<SettingsStack.Screen
component={settings.FeatureFlagView}
name="FeatureFlags"
options={settings.FeatureFlagNavigationOptions}
/>
<SettingsStack.Screen
component={settings.APITestView}
name="APITest"
Expand Down
3 changes: 1 addition & 2 deletions source/navigation/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export type RootViewsParamList = {
More: undefined
PrintJobs: undefined
StudentOrgs: undefined
} & Pick<MiscViewParamList, 'CourseSearchResults'>
}

export type CafeMenuParamList = {
CarletonBurtonMenu: undefined
Expand Down Expand Up @@ -100,7 +100,6 @@ export type SettingsStackParamList = {
Credits: undefined
[debug.NavigationKey]: {keyPath: string[]}
Faq: undefined
FeatureFlags: undefined
IconSettings: undefined
Legal: undefined
NetworkLogger: undefined
Expand Down
2 changes: 1 addition & 1 deletion source/views/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const styles = StyleSheet.create({

function HomePage(): JSX.Element {
let navigation = useNavigation()
let allViews = AllViews().filter((view) => !view.disabled ?? true)
let allViews = AllViews().filter((view) => !view.disabled)
let columns = partitionByIndex(allViews)

return (
Expand Down
4 changes: 0 additions & 4 deletions source/views/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ export {IconSettingsView} from './screens/change-icon'
export {CreditsView} from './screens/credits'
export {LegalView} from './screens/legal'
export {PrivacyView} from './screens/privacy'
export {
View as FeatureFlagView,
NavigationOptions as FeatureFlagNavigationOptions,
} from './screens/feature-flags'

// Developer settings
export {DebugRootView} from './screens/debug'
Expand Down
114 changes: 0 additions & 114 deletions source/views/settings/screens/feature-flags.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions source/views/settings/screens/overview/developer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const DeveloperSection = (): React.ReactElement => {
const onComponentsButton = () => navigation.navigate('ComponentLibrary')
const onAPIButton = () => navigation.navigate('APITest')
const onBonAppButton = () => navigation.navigate('BonAppPicker')
const onFeatureFlagsButton = () => navigation.navigate('FeatureFlags')
const onDebugButton = () => navigation.navigate(DebugKey, {keyPath: ['Root']})
const onNetworkLoggerButton = () => navigation.navigate('NetworkLogger')
const sendSentryMessage = () => {
Expand Down Expand Up @@ -42,7 +41,6 @@ export const DeveloperSection = (): React.ReactElement => {
return (
<>
<Section header="DEVELOPER">
<PushButtonCell onPress={onFeatureFlagsButton} title="Feature Flags" />
<PushButtonCell onPress={onComponentsButton} title="Components" />
<PushButtonCell onPress={onAPIButton} title="API Tester" />
<PushButtonCell onPress={onBonAppButton} title="Bon Appetit Picker" />
Expand Down
Loading
Loading