Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c5f3887
Made checkbox tree in FilterContent.tsx
NathanielCavallaro Mar 3, 2026
370fdcb
Made it a bit easier to understand what is needed for FilterContent
NathanielCavallaro Mar 3, 2026
078a628
Updated initial data for filterContent
NathanielCavallaro Mar 3, 2026
975d1de
More updates to filter
NathanielCavallaro Mar 3, 2026
35d36e5
initial data input
NathanielCavallaro Mar 3, 2026
6bbf270
Correctly takes in data and creates checkbox tree
NathanielCavallaro Mar 3, 2026
ca534ab
FilterContent returns data in same format it gets it
NathanielCavallaro Mar 4, 2026
b0ab35b
fixed comment
NathanielCavallaro Mar 4, 2026
c2e5ebf
Change importOpen to be reusable
ratatozk Mar 5, 2026
6e6ee0c
Add open directory dialog to ipc
ratatozk Mar 5, 2026
b89c046
Add burrito upload dialog
ratatozk Mar 5, 2026
9599f3b
filtering fixes and empty book functionality
NathanielCavallaro Mar 5, 2026
41ab888
Start of converter
ratatozk Mar 5, 2026
785ac89
Merge branch 'develop' of github.com:ratatozk/apm into develop
ratatozk Mar 5, 2026
e19977c
Created parseBurritoMetadata.ts
Fire-Horse27 Mar 5, 2026
0c0f1d5
Make safe
ratatozk Mar 5, 2026
2df7e49
Start setting up conversion
ratatozk Mar 6, 2026
d3be22b
Call buildStructure
ratatozk Mar 6, 2026
95f5044
created enumerateIngredients and getMediaData functions in burritoCon…
Fire-Horse27 Mar 6, 2026
13cfb50
Merge branch 'develop' of https://github.com/ratatozk/apm into develop
Fire-Horse27 Mar 6, 2026
2ebb273
filter completely implemented hopefully
NathanielCavallaro Mar 6, 2026
ebf1811
Modify useBook to make it usable outside of React
ratatozk Mar 6, 2026
b92b78b
Move all burrito types to central file
ratatozk Mar 6, 2026
28d3e9a
Merge branch 'develop' of github.com:ratatozk/apm into develop
ratatozk Mar 6, 2026
36f58f6
Start of conversion work
ratatozk Mar 6, 2026
3d629e2
Fix wrapper error
ratatozk Mar 6, 2026
6a56543
Converted folder to ptf
Fire-Horse27 Mar 6, 2026
fc0da58
Fix error for mapping ipc
ratatozk Mar 6, 2026
6c20d71
It waits before conversion now!
NathanielCavallaro Mar 6, 2026
558ca91
Some changes to how data is passed
ratatozk Mar 6, 2026
27b26c2
Made it only delete if a zip
Fire-Horse27 Mar 6, 2026
407a6d3
deleting ptfs - NEEDS THEM TO BE STRINGS
NathanielCavallaro Mar 6, 2026
3bcb498
Fix FilterContent
ratatozk Mar 6, 2026
c1f811b
Implemented apmdata conversion and fixed id bug in burritoparser
Fire-Horse27 Mar 6, 2026
fbb4076
Fix the data stuff
ratatozk Mar 6, 2026
2c1e1c0
Merge branch 'develop' of https://github.com/sillsdev/apm into develop
ratatozk Mar 6, 2026
df8ddc5
flickering eliminated
NathanielCavallaro Mar 6, 2026
658878f
deleted testing code for filtering
NathanielCavallaro Mar 6, 2026
da320ab
fixed problem with previous commit
NathanielCavallaro Mar 6, 2026
10563f9
deleted test upload type
NathanielCavallaro Mar 6, 2026
142286e
Fix version to 8 and remove dialog close on filter close
ratatozk Mar 6, 2026
3721328
Merge branch 'develop' of github.com:ratatozk/apm into develop
ratatozk Mar 6, 2026
5f34982
Deleted unneeded state filterConfirmed
NathanielCavallaro Mar 6, 2026
b561e7a
Localization
ratatozk Mar 6, 2026
5a1ffdb
Fix filters
ratatozk Mar 6, 2026
a94c80f
Add some basic tests
ratatozk Mar 6, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $ docker run -d -p 3000:3000 --name apm-vite-renderer apm-vite-renderer

Once the dev server is running, you can run the tests using the commands described in the readme for `src/renderer` which are `npm run cy:run-ct` for terminal and `npm run cy:open-ct` for running the tests in the browser.

WHen finished, the container can be deleted using the `Docker Desktop` or with the command
When finished, the container can be deleted using the `Docker Desktop` or with the command

```bash
docker stop apm-vite-renderer # stops container from running
Expand Down
112 changes: 112 additions & 0 deletions localization/TranscriberAdmin-en-1.2.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -2523,6 +2523,41 @@
<context context-type="sourcefile">FaithbridgeIfrrame.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="filterContent.allChapters">
<source>All Chapters of {0}</source>
<target/>
<context-group>
<context context-type="sourcefile">FilterContent.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="filterContent.allBooks">
<source>All Books</source>
<target/>
<context-group>
<context context-type="sourcefile">FilterContent.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="filterContent.title">
<source>Scripture Burrito: {0}</source>
<target/>
<context-group>
<context context-type="sourcefile">FilterContent.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="filterContent.subtitle1">
<source>Please select the information you want to import into your team.</source>
<target/>
<context-group>
<context context-type="sourcefile">FilterContent.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="filterContent.subtitle2">
<source>Each selected book will be imported as a separate project.</source>
<target/>
<context-group>
<context context-type="sourcefile">FilterContent.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="filterMenu.all">
<source>All</source>
<target/>
Expand Down Expand Up @@ -3272,6 +3307,13 @@
<context context-type="sourcefile">Import.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="import.externalSourceBurrito">
<source>Create a new project in APM from a Scripture Burrito</source>
<target/>
<context-group>
<context context-type="sourcefile">Import.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="import.family">
<source>Family Name</source>
<target/>
Expand Down Expand Up @@ -3517,6 +3559,62 @@
<context context-type="sourcefile">import.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="scriptureBurritoImport.title">
<source>Import Scripture Burrito</source>
<target/>
<context-group>
<context context-type="sourcefile">BurritoUpload.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="scriptureBurritoImport.zipExtractError">
<source>Failed to extract zip file</source>
<target/>
<context-group>
<context context-type="sourcefile">BurritoUpload.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="scriptureBurritoImport.metadataNotFoundError">
<source>metadata.json not found in the selected file/directory</source>
<target/>
<context-group>
<context context-type="sourcefile">BurritoUpload.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="scriptureBurritoImport.invalidWrapperMetadataError">
<source>Invalid format: expected \"scripture burrito wrapper\"</source>
<target/>
<context-group>
<context context-type="sourcefile">BurritoUpload.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="scriptureBurritoImport.subtitle">
<source>Select a Burrito directory or a .zip file to extract and import.</source>
<target/>
<context-group>
<context context-type="sourcefile">BurritoUpload.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="scriptureBurritoImport.browseDirectory">
<source>Browse Directory</source>
<target/>
<context-group>
<context context-type="sourcefile">BurritoUpload.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="scriptureBurritoImport.browseZipFile">
<source>Browse Zip File</source>
<target/>
<context-group>
<context context-type="sourcefile">BurritoUpload.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="scriptureBurritoImport.selected">
<source>Selected: </source>
<target/>
<context-group>
<context context-type="sourcefile">BurritoUpload.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="integration.allCriteria">
<source>You must satisfy all criteria to sync.</source>
<target/>
Expand Down Expand Up @@ -4455,6 +4553,13 @@
<context context-type="sourcefile">HelpMenu.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="main.genericError">
<source>Error: {0}</source>
<target/>
<context-group>
<context context-type="sourcefile">BurritoUpload.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="main.genFlatSample">
<source>General flat sample spreadsheet</source>
<target/>
Expand Down Expand Up @@ -4749,6 +4854,13 @@
<context context-type="sourcefile">apphead.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="main.upload">
<source>Upload</source>
<target/>
<context-group>
<context context-type="sourcefile">FilterContent.tsx</context>
</context-group>
</trans-unit>
<trans-unit id="main.version">
<source>Version: {0} - {1}</source>
<target/>
Expand Down
96 changes: 96 additions & 0 deletions localization/TranscriberAdmin-en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2164,6 +2164,36 @@
<target/>
</segment>
</unit>
<unit id="filterContent.allChapters">
<segment>
<source>All Chapters of {0}</source>
<target/>
</segment>
</unit>
<unit id="filterContent.allBooks">
<segment>
<source>All Books</source>
<target/>
</segment>
</unit>
<unit id="filterContent.title">
<segment>
<source>Scripture Burrito: {0}</source>
<target/>
</segment>
</unit>
<unit id="filterContent.subtitle1">
<segment>
<source>Please select the information you want to import into your team.</source>
<target/>
</segment>
</unit>
<unit id="filterContent.subtitle2">
<segment>
<source>Each selected book will be imported as a separate project.</source>
<target/>
</segment>
</unit>
<unit id="filterMenu.all">
<segment>
<source>All</source>
Expand Down Expand Up @@ -2806,6 +2836,12 @@
<target/>
</segment>
</unit>
<unit id="import.externalSourceBurrito">
<segment>
<source>Create a new project in APM from a Scripture Burrito</source>
<target/>
</segment>
</unit>
<unit id="import.family">
<segment>
<source>Family Name</source>
Expand Down Expand Up @@ -3016,6 +3052,54 @@
<target/>
</segment>
</unit>
<unit id="scriptureBurritoImport.title">
<segment>
<source>Import Scripture Burrito</source>
<target/>
</segment>
</unit>
<unit id="scriptureBurritoImport.zipExtractError">
<segment>
<source>Failed to extract zip file</source>
<target/>
</segment>
</unit>
<unit id="scriptureBurritoImport.metadataNotFoundError">
<segment>
<source>metadata.json not found in the selected file/directory</source>
<target/>
</segment>
</unit>
<unit id="scriptureBurritoImport.invalidWrapperMetadataError">
<segment>
<source>Invalid format: expected \"scripture burrito wrapper\"</source>
<target/>
</segment>
</unit>
<unit id="scriptureBurritoImport.subtitle">
<segment>
<source>Select a Burrito directory or a .zip file to extract and import.</source>
<target/>
</segment>
</unit>
<unit id="scriptureBurritoImport.browseDirectory">
<segment>
<source>Browse Directory</source>
<target/>
</segment>
</unit>
<unit id="scriptureBurritoImport.browseZipFile">
<segment>
<source>Browse Zip File</source>
<target/>
</segment>
</unit>
<unit id="scriptureBurritoImport.selected">
<segment>
<source>Selected: </source>
<target/>
</segment>
</unit>
<unit id="integration.allCriteria">
<segment>
<source>You must satisfy all criteria to sync.</source>
Expand Down Expand Up @@ -3820,6 +3904,12 @@
<target/>
</segment>
</unit>
<unit id="main.genericError">
<segment>
<source>Error: {0}</source>
<target/>
</segment>
</unit>
<unit id="main.genFlatSample">
<segment>
<source>General flat sample spreadsheet</source>
Expand Down Expand Up @@ -4072,6 +4162,12 @@
<target/>
</segment>
</unit>
<unit id="main.upload">
<segment>
<source>Upload</source>
<target/>
</segment>
</unit>
<unit id="main.version">
<segment>
<source>Version: {0} - {1}</source>
Expand Down
20 changes: 18 additions & 2 deletions src/main/ipcMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,20 @@ export function ipcMethods(): void {
return null;
});

ipcMain.handle('importOpen', async () => {
ipcMain.handle('importOpen', async (_event, filters) => {
const options = {
filters: [{ name: 'ptf', extensions: ['ptf'] }],
filters,
properties: ['openFile'],
};
return dialog.showOpenDialogSync(options as any);
});

ipcMain.handle('openDirectoryDialog', async () => {
return dialog.showOpenDialogSync({
properties: ['openDirectory'],
});
});

ipcMain.handle('audacityOpen', async () => {
return dialog.showOpenDialogSync({
filters: [{ name: 'Audacity', extensions: ['aup3'] }],
Expand Down Expand Up @@ -305,6 +311,16 @@ export function ipcMethods(): void {
}
});

ipcMain.handle('zipFolder', async (_event, sourceDir, outFile) => {
if (!fs.existsSync(sourceDir)) {
throw new Error('Source directory does not exist');
}

const zip = new AdmZip();
zip.addLocalFolder(sourceDir);
zip.writeZip(outFile);
});

ipcMain.handle('writeBuffer', async (_event, filePath, arrayBuffer) => {
if (process.platform === 'win32') {
filePath = filePath.replace(/\//g, '\\');
Expand Down
7 changes: 6 additions & 1 deletion src/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ const api = {
exitApp: async () => await ipcRenderer.invoke('exitApp'),
relaunchApp: async () => await ipcRenderer.invoke('relaunchApp'),
closeApp: async () => await ipcRenderer.invoke('closeApp'),
importOpen: async () => await ipcRenderer.invoke('importOpen'),
importOpen: async (filters) =>
await ipcRenderer.invoke('importOpen', filters),
openDirectoryDialog: async () =>
await ipcRenderer.invoke('openDirectoryDialog'),
execPath: async () => await ipcRenderer.invoke('execPath'),
md5File: async (filePath) => await ipcRenderer.invoke('md5File', filePath),
isWindows: async () => await ipcRenderer.invoke('isWindows'),
Expand Down Expand Up @@ -91,6 +94,8 @@ const api = {
await ipcRenderer.invoke('zipStreamEntryText', zip, name),
zipStreamClose: async (zip) =>
await ipcRenderer.invoke('zipStreamClose', zip),
zipFolder: async (sourceDir, outFile) =>
await ipcRenderer.invoke('zipFolder', sourceDir, outFile),
writeBuffer: async (filePath, blob) =>
await ipcRenderer.invoke('writeBuffer', filePath, blob),
downloadFile: async (url, localFile) =>
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export const config: JestConfigWithTsJest = {
'\\.(jpg|jpeg|png|gif|webp|svg)$': '<rootDir>/__mocks__/fileMock.ts', // Mock image files
'^../api-variable$': '<rootDir>/__mocks__/api-variable.tsx', // Mock api-variable
'^../../api-variable$': '<rootDir>/__mocks__/api-variable.tsx', // Mock api-variable
'^@model/(.*)$': '<rootDir>/src/model/$1', // Mock model imports
'^burrito/(.*)$': '<rootDir>/src/burrito/$1', // Mock burrito imports
},
};

Expand Down
1 change: 1 addition & 0 deletions src/renderer/public/localization/strings350aabed.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/renderer/public/localization/strings55edbf96.json

This file was deleted.

8 changes: 5 additions & 3 deletions src/renderer/src/burrito/BurritoWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import StickyRedirect from '../components/StickyRedirect';
import { useOrgDefaults } from '../crud/useOrgDefaults';
import { BurritoHeader } from '../components/BurritoHeader';
import { MetadataView } from './MetadataView';
import type { BurritoWrapper as BurritoWrapperType } from './data/wrapperBuilder';
import { wrapperBuilder } from './data/wrapperBuilder';
import { useOrbitData } from '../hoc/useOrbitData';
import {
Expand All @@ -18,12 +17,15 @@ import {
import related from '../crud/related';
import { burritoContents } from './BurritoContents';
import { BurritoType } from './BurritoType';
import { Burrito } from './data/wrapperBuilder';
import { AltButton } from '../control/AltButton';
import packageJson from '../../package.json';
import { toCamel } from '../utils';
import { shallowEqual, useSelector } from 'react-redux';
import { burritoSelector, sharedSelector } from '../selector';
import {
BurritoEntry,
BurritoWrapper as BurritoWrapperType,
} from 'burrito/data/types';
const version = packageJson.version;
const productName = packageJson.build.productName;

Expand Down Expand Up @@ -93,7 +95,7 @@ export function BurritoWrapper() {
id: `${abbreviation}-${toCamel(c)}`,
path: toCamel(c).toLocaleLowerCase(),
role: burritoRole(c as BurritoType),
}) as Burrito
}) as BurritoEntry
) || [];

setMetaData(
Expand Down
Loading