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

attempt to fix csv writing on cordova by replacing streaming #1257

Merged
merged 8 commits into from
Dec 4, 2023
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
8 changes: 5 additions & 3 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget android-versionCode="6388" id="org.codaco.NetworkCanvasInterviewer6" ios-CFBundleIdentifier="org.codaco.networkCanvasInterviewerBusiness" ios-CFBundleVersion="6388" version="6.5.1" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget android-versionCode="6395" id="org.codaco.NetworkCanvasInterviewer6" ios-CFBundleIdentifier="org.codaco.networkCanvasInterviewerBusiness" ios-CFBundleVersion="6395" version="6.5.2"
xmlns="http://www.w3.org/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Network Canvas Interviewer</name>
<description>
A tool for conducting Network Canvas Interviews.
Expand Down Expand Up @@ -28,7 +31,6 @@
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:largeHeap="true"/>
<application android:usesCleartextTraffic="true"/>
<application android:debuggable="true"/>
</edit-config>
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/supports-screens">
<supports-screens android:anyDensity="false" android:largeScreens="true" android:normalScreens="false" android:requiresSmallestWidthDp="600" android:resizeable="false" android:smallScreens="false" android:xlargeScreens="true"/>
Expand Down Expand Up @@ -84,4 +86,4 @@
<plugin name="cordova-plugin-network-information" spec="~2.0.2"/>
<plugin name="cordova-plugin-chooser" spec="~1.3.1"/>
<plugin name="cordova-sqlite-storage" spec="6.0.0"/>
</widget>
</widget>
4 changes: 1 addition & 3 deletions config/nc-dev-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ const devServerContentBase = () => {
};

// Webpack default is 'web'. To get electron working with dev server, use 'electron-renderer'.
// const reactBundleTarget = () => (isTargetingElectron ? 'electron-renderer' : 'web');

const reactBundleTarget = () => 'web';
const reactBundleTarget = () => (isTargetingElectron ? 'electron-renderer' : 'web');

module.exports = {
cleanDevUrlFile,
Expand Down
24 changes: 12 additions & 12 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "network-canvas-interviewer",
"version": "6.5.1",
"version": "6.5.2",
"productName": "Network Canvas Interviewer",
"description": "A tool for conducting Network Canvas Interviews.",
"author": "Complex Data Collective",
Expand Down Expand Up @@ -78,8 +78,8 @@
"connected-react-router": "^6.8.0",
"cordova-android": "~12.0.0",
"cordova-ios": "~7.0.0",
"cordova-plugin-file": "github:apache/cordova-plugin-file",
"cordova-plugin-file-transfer": "github:apache/cordova-plugin-file-transfer",
"cordova-plugin-file": "github:apache/cordova-plugin-file#265a932",
"cordova-plugin-file-transfer": "github:apache/cordova-plugin-file-transfer#f12b73e",
"cordova-plugin-fullscreen": "github:mesmotronic/cordova-plugin-fullscreen",
"cordova-plugin-ionic-keyboard": "github:ionic-team/cordova-plugin-ionic-keyboard",
"cordova-plugin-network-canvas-client": "github:complexdatacollective/cordova-plugin-network-canvas-client",
Expand Down
2 changes: 1 addition & 1 deletion public/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "network-canvas-interviewer",
"version": "6.5.1",
"version": "6.5.2",
"productName": "Network Canvas Interviewer",
"description": "A tool for conducting Network Canvas Interviews.",
"author": "Complex Data Collective",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ const fatalExportErrorAction = withErrorDialog((error) => ({
error,
}));

const getInitialFilename = () => `networkCanvasExport-${Date.now()}`;

const DataExportScreen = ({ show, onClose }) => {
const [step, setStep] = useState(3);
const [selectedSessions, setSelectedSessions] = useState([]);

// Set the default filename to 'networkCanvasExport-<timestamp>'
const [filename, setFilename] = useState(`networkCanvasExport-${Date.now()}`);
const [filename, setFilename] = useState(getInitialFilename());
const [abortHandlers, setAbortHandlers] = useState(null);

const pairedServer = useSelector((state) => state.pairedServer);
Expand All @@ -40,6 +42,7 @@ const DataExportScreen = ({ show, onClose }) => {
const openDialog = (dialog) => dispatch(dialogActions.openDialog(dialog));

const reset = () => {
setFilename(getInitialFilename());
setSelectedSessions([]);
setStep(1);
};
Expand Down
Loading