Skip to content

Commit

Permalink
Add sort
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbay-bluetiger committed Jan 22, 2025
1 parent 35998c3 commit 45d317d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ repos:
entry: yarn track-flags
language: system
files: '\.tsx?$'
pass_filenames: false
- id: track-todos
name: track-todos
entry: yarn track-todos
language: system
exclude: 'logs/.*'
pass_filenames: false
12 changes: 6 additions & 6 deletions logs/launchdarkly-flags.log
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.

# LaunchDarkly flags in components
./services/ui-src/src/components/forms/AdminDashSelector.tsx:40:useFlags()?.naaarReport;
./services/ui-src/src/components/app/AppRoutes.tsx:30:useFlags()?.naaarReport;
./services/ui-src/src/components/cards/TemplateCard.tsx:33:useFlags()?.naaarReport;
./services/ui-src/src/components/forms/AdminDashSelector.tsx:40:useFlags()?.naaarReport;
./services/ui-src/src/components/modals/AddEditReportModal.tsx:43:useFlags()?.naaarReport;
./services/ui-src/src/components/pages/Dashboard/DashboardPage.tsx:213:useFlags()?.sortableDashboardTable;

# LaunchDarkly flags in tests
./services/ui-src/src/components/forms/AdminDashSelector.test.tsx:32:mockLDFlags.setDefault({ naaarReport: true });
./services/ui-src/src/components/forms/AdminDashSelector.test.tsx:62:mockLDFlags.set({ naaarReport: true });
./services/ui-src/src/components/forms/AdminDashSelector.test.tsx:72:mockLDFlags.set({ naaarReport: false });
./services/ui-src/src/components/app/AppRoutes.test.tsx:25:mockLDFlags.setDefault({ naaarReport: false });
./services/ui-src/src/components/app/AppRoutes.test.tsx:138:mockLDFlags.set({ naaarReport: true });
./services/ui-src/src/components/app/AppRoutes.test.tsx:150:mockLDFlags.set({ naaarReport: false });
./services/ui-src/src/components/cards/TemplateCard.test.tsx:60:mockLDFlags.setDefault({ naaarReport: true });
./services/ui-src/src/components/app/AppRoutes.test.tsx:25:mockLDFlags.setDefault({ naaarReport: false });
./services/ui-src/src/components/cards/TemplateCard.test.tsx:140:mockLDFlags.set({ naaarReport: true });
./services/ui-src/src/components/cards/TemplateCard.test.tsx:150:mockLDFlags.set({ naaarReport: false });
./services/ui-src/src/components/cards/TemplateCard.test.tsx:60:mockLDFlags.setDefault({ naaarReport: true });
./services/ui-src/src/components/forms/AdminDashSelector.test.tsx:32:mockLDFlags.setDefault({ naaarReport: true });
./services/ui-src/src/components/forms/AdminDashSelector.test.tsx:62:mockLDFlags.set({ naaarReport: true });
./services/ui-src/src/components/forms/AdminDashSelector.test.tsx:72:mockLDFlags.set({ naaarReport: false });
./services/ui-src/src/components/pages/Dashboard/SortableDashboardTable.test.tsx:143:mockLDFlags.set({ sortableDashboardTable: true });
./services/ui-src/src/components/pages/Dashboard/SortableDashboardTable.test.tsx:279:mockLDFlags.set({ sortableDashboardTable: true });
./services/ui-src/src/components/pages/Dashboard/SortableDashboardTable.test.tsx:297:mockLDFlags.set({ sortableDashboardTable: true });
Expand Down
8 changes: 4 additions & 4 deletions logs/todos.log
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
./.git/hooks/sendemail-validate.sample:41: TODO: Replace with appropriate checks for the whole series
./services/app-api/handlers/reports/fetch.ts:69: TODO: strict typing
./services/app-api/handlers/reports/fetch.ts:80: TODO: strict typing
./services/ui-src/src/utils/autosave/autosave.ts:193: TODO: modify DynamicField hydrationValue lifecycle so we can implement a stricter check,
./services/ui-src/src/components/tables/EntityRow.tsx:26: TODO: refactor to handle NAAAR analysis methods
./services/ui-src/src/components/tables/Table.tsx:135: TODO: add additional styling for two-column dynamic field tables if needed
./services/ui-src/src/components/tables/SortableTable.tsx:196: TODO: add additional styling for two-column dynamic field tables if needed
./services/ui-src/src/components/layout/Timeout.tsx:33: TODO: When autosave is implemented, set up a callback function to listen to calls to update in authLifecycle
./services/ui-src/src/components/reports/ModalOverlayReportPage.test.tsx:148:@todo Write a test to make sure admins can't click/change details?
./services/ui-src/src/components/tables/EntityRow.tsx:26: TODO: refactor to handle NAAAR analysis methods
./services/ui-src/src/components/tables/SortableTable.tsx:196: TODO: add additional styling for two-column dynamic field tables if needed
./services/ui-src/src/components/tables/Table.tsx:135: TODO: add additional styling for two-column dynamic field tables if needed
./services/ui-src/src/utils/autosave/autosave.ts:193: TODO: modify DynamicField hydrationValue lifecycle so we can implement a stricter check,
4 changes: 2 additions & 2 deletions scripts/track-flags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ EXCLUSIONS="--exclude-dir=.build --exclude-dir=coverage --exclude-dir=node_modul
echo "# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n" > $LD_LOG_FILE

echo "# LaunchDarkly flags in components" >> $LD_LOG_FILE
(grep $GREP_FLAGS $EXCLUSIONS "useFlags().*" ./services --include=*.tsx --exclude=*.test.tsx || echo "# N/A") >> $LD_LOG_FILE
(grep $GREP_FLAGS $EXCLUSIONS "useFlags().*" ./services --include=*.tsx --exclude=*.test.tsx | sort || echo "# N/A") >> $LD_LOG_FILE
echo "" >> $LD_LOG_FILE

echo "# LaunchDarkly flags in tests" >> $LD_LOG_FILE
(grep $GREP_FLAGS $EXCLUSIONS "mockLDFlags.set.*" ./services --include=*.test.tsx || echo "# N/A") >> $LD_LOG_FILE
(grep $GREP_FLAGS $EXCLUSIONS "mockLDFlags.set.*" ./services --include=*.test.tsx | sort || echo "# N/A") >> $LD_LOG_FILE
4 changes: 2 additions & 2 deletions scripts/track-todos.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
LD_LOG_FILE=logs/todos.log
GREP_FLAGS="-r -i -n -o -w -E -I"
EXCLUSIONS="--exclude-dir=.build --exclude-dir=coverage --exclude-dir=node_modules --exclude-dir=uploads --exclude=track-todos.sh"
EXCLUSIONS="--exclude-dir=.build --exclude-dir=coverage --exclude-dir=node_modules --exclude-dir=uploads --exclude=track-todos.sh --exclude=*.log"

echo "# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n" > $LD_LOG_FILE

(grep $GREP_FLAGS $EXCLUSIONS "TODO:.*| TODO.*|@TODO.*" . || echo "# All clear!") >> $LD_LOG_FILE
(grep $GREP_FLAGS $EXCLUSIONS "TODO:.*| TODO.*|@TODO.*" . | sort || echo "# All clear!") >> $LD_LOG_FILE

0 comments on commit 45d317d

Please sign in to comment.