-
Notifications
You must be signed in to change notification settings - Fork 0
v0.4.0 - view mode fixes #69
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1829849
update workflows to ignore certain files
kryptodrex 0aa8a9f
fix env var pulling
kryptodrex 4d3f6ef
Update beta-release.yml
kryptodrex 2434385
make minimal state cues default
kryptodrex 78bdc7f
Update vite.config.ts
kryptodrex d6f36ad
Update release.yml
kryptodrex 1457e5c
Per-plan view mode favorites modal & sync
kryptodrex File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,8 @@ on: | |
| paths-ignore: | ||
| - '.github/workflows/**' | ||
| - '**/*.md' | ||
| - '*.md' | ||
| - '.gitignore' | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,8 @@ on: | |
| paths-ignore: | ||
| - '.github/workflows/**' | ||
| - '**/*.md' | ||
| - '*.md' | ||
| - '.gitignore' | ||
|
|
||
| jobs: | ||
| test: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,8 @@ on: | |
| paths-ignore: | ||
| - '.github/workflows/**' | ||
| - '**/*.md' | ||
| - '*.md' | ||
| - '.gitignore' | ||
|
|
||
| jobs: | ||
| check-version: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,7 +1,6 @@ | ||||||
| import { useEffect, useMemo, useState } from 'react'; | ||||||
| import { useMemo } from 'react'; | ||||||
| import { Settings } from 'lucide-react'; | ||||||
| import { APP_CUSTOM_EVENTS } from '../../../../constants/events'; | ||||||
| import { FileStorageService } from '../../../../services/fileStorage'; | ||||||
| import type { SelectableViewMode } from '../../../../types/viewMode'; | ||||||
| import type { ViewMode } from '../../../../types/viewMode'; | ||||||
| import { buildViewModeSelectorOptions, sanitizeFavoriteViewModes } from '../../../../utils/viewModePreferences'; | ||||||
| import { getDisplayModeLabel } from '../../../../utils/payPeriod'; | ||||||
|
|
@@ -16,6 +15,8 @@ interface ViewModeSelectorProps<T extends string = ViewMode> { | |||||
| mode: T; | ||||||
| onChange: (mode: T) => void; | ||||||
| options?: ViewModeOption<T>[]; | ||||||
| /** Plan-specific favorites; when provided, skips internal app-settings reads. */ | ||||||
| favorites?: SelectableViewMode[]; | ||||||
| payCadenceMode?: T; | ||||||
| payCadenceLabel?: string; | ||||||
| onOpenViewModeSettings?: () => void; | ||||||
|
|
@@ -26,29 +27,13 @@ const ViewModeSelector = <T extends string = ViewMode,>({ | |||||
| mode, | ||||||
| onChange, | ||||||
| options, | ||||||
| favorites: favoritesProp, | ||||||
| payCadenceMode, | ||||||
| payCadenceLabel = 'Your Pay Frequency', | ||||||
| onOpenViewModeSettings, | ||||||
| disabled = false, | ||||||
| }: ViewModeSelectorProps<T>) => { | ||||||
| const [favoriteModes, setFavoriteModes] = useState(() => | ||||||
| sanitizeFavoriteViewModes(FileStorageService.getAppSettings().viewModeFavorites), | ||||||
| ); | ||||||
|
|
||||||
| useEffect(() => { | ||||||
| if (options) return; | ||||||
|
|
||||||
| const handleFavoritesChanged = () => { | ||||||
| setFavoriteModes( | ||||||
| sanitizeFavoriteViewModes(FileStorageService.getAppSettings().viewModeFavorites), | ||||||
| ); | ||||||
| }; | ||||||
|
|
||||||
| window.addEventListener(APP_CUSTOM_EVENTS.viewModeFavoritesChanged, handleFavoritesChanged); | ||||||
| return () => { | ||||||
| window.removeEventListener(APP_CUSTOM_EVENTS.viewModeFavoritesChanged, handleFavoritesChanged); | ||||||
| }; | ||||||
| }, [options]); | ||||||
| const favoriteModes = favoritesProp ?? sanitizeFavoriteViewModes(undefined); | ||||||
|
|
||||||
| const resolvedOptions = useMemo(() => { | ||||||
| if (options) { | ||||||
|
|
@@ -59,7 +44,10 @@ const ViewModeSelector = <T extends string = ViewMode,>({ | |||||
| }, [options, favoriteModes, payCadenceMode]); | ||||||
|
|
||||||
| const optionsWithCadence = useMemo(() => { | ||||||
| if (!payCadenceMode || options) { | ||||||
| // Only auto-add cadence tab when the user has not explicitly configured | ||||||
| // favorites (favouritesProp absent). When plan-specific favorites are | ||||||
|
||||||
| // favorites (favouritesProp absent). When plan-specific favorites are | |
| // favorites (favoritesProp absent). When plan-specific favorites are |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This switches FEEDBACK_FORM_* from
secretstovars. If any of these values are sensitive (tokens, private endpoints, etc.), GitHub Variables are not the right storage mechanism compared to Secrets. If they’re truly non-sensitive configuration, add a short comment in the workflow clarifying that these are safe to be public-as-config; otherwise revert tosecrets.*.