Skip to content

Commit

Permalink
v1.3.0 - General fixes and stability improvements (#37)
Browse files Browse the repository at this point in the history
* Fixes issue #30

* Adds code for right-click menu for TextEdit
Does not work because TextEdit lacks Sense(click)
Thought for issue #32

* Add tooltip for issue #31

* Fix wasm I/O (#36)

* Fix loading a file

* Fixes loading in wasm, adds downloading files (fixes issue #6)

* Final touches for config. Closes #34

* Add survey, closes #35

* Add reset config if incompatible

* Update changelog
  • Loading branch information
margual56 authored Aug 24, 2023
1 parent 9f94ecc commit ccee760
Show file tree
Hide file tree
Showing 15 changed files with 867 additions and 305 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
**/dist/*
.vscode/
**/*.wb
.cargo/config.toml
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [v1.3.0]

### Added
- Feature Request #34: Save preferences
- Feature Request #35: Add a survey pop-up

### Fixed
- Issue #6: Uploading and downloading files in WASM
- Issue #30: Letters cut-off by scrollbar
- Issue #31: Composition help unclear
- Issue #33: Explain that you cannot compose more than one library at a time

## [v1.2.2]
### Added
- Help for the composition window
Expand Down Expand Up @@ -104,4 +116,4 @@
- Fixed final state's instruction needing to be explicitly defined (#2)

## [v0.2.0] - 2022-11-21
- Initial version
- Initial version
87 changes: 82 additions & 5 deletions Cargo.lock

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

13 changes: 9 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "turing-machine"
version = "1.2.2"
version = "1.3.0"
edition = "2021"
authors = ["Marcos Gutiérrez Alonso <margual56@gmail.com>"]
description = "Turing Machine Simulator"
Expand All @@ -10,7 +10,6 @@ license = "GPL-2.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "^4.3", features = ["derive"] }
pest = "^2.7"
pest_derive = "^2.4"
eframe = {version = "^0.22", features = ["wayland"]}
Expand All @@ -23,16 +22,22 @@ turing-lib = "^2.1"
serde = {version = "^1.0", features = ["derive"]}
serde_bytes = "0.11"
bincode = "1.3"
log = "^0.4"
env_logger = "^0.10"
sys-locale = "^0.3"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
toml = "0.7.6"
directories = "^5.0"
log = "^0.4"
env_logger = "^0.10"
tracing-subscriber = "0.3"
clap = { version = "^4.3", features = ["derive"] }
clap-verbosity-flag = "2.0.0"
version = {git = "https://github.com/turing-marcos/rs-version.git", tag = "v0.1.2"}

# web:
[target.'cfg(target_arch = "wasm32")'.dependencies]
poll-promise = { version = "0.2.0", features = ["web"] }
pollster = "0.3.0"
console_error_panic_hook = "^0.1"
tracing-wasm = "^0.2"
wasm-bindgen = "^0.2"
Expand Down
9 changes: 0 additions & 9 deletions assets/save_file.js

This file was deleted.

10 changes: 10 additions & 0 deletions assets/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export function downloadToFile(content, filename) {
const a = document.createElement('a');
const file = new Blob([content], { type: 'text/plain'});

a.href = URL.createObjectURL(file);
a.download = filename;
a.click();

URL.revokeObjectURL(a.href);
};
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<link data-trunk rel="copy-file" href="assets/sw.js" />
<link data-trunk rel="copy-file" href="assets/manifest.json" />
<link data-trunk rel="copy-file" href="assets/icon.png" />
<link data-trunk rel="copy-file" href="assets/save_file.js" />


<link rel="manifest" href="manifest.json">
Expand Down
18 changes: 17 additions & 1 deletion locales/main_window.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,22 @@
"btn.close": {
"en": "Close",
"es": "Cerrar"
},
"window.title.survey": {
"en": "Survey",
"es": "Encuesta"
},
"window.link.survey": {
"en": "Click here to open the survey",
"es": "Haz clic aquí para abrir la encuesta"
},
"lbl.window.survey":{
"en": "Please take a moment to fill out this survey to help us improve the app.",
"es": "Por favor, tómate un momento para completar esta encuesta y ayudarnos a mejorar la aplicación."
},
"lbl.window.survey2": {
"en": "It will only take a few minutes, I promise!",
"es": "¡Sólo te llevará unos minutos, lo prometo!"
}
}


6 changes: 5 additions & 1 deletion locales/windows/composition_window.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@
"lbl.composition.help.txt": {
"en": "Type `compose = { <library name> };` before the state definitions to use a library",
"es": "Escribe `compose = { <nombre de la librería> };` antes de definir los estados para usar una librería"
},
"lbl.composition.warning": {
"en": "WARNING: Composing more than one library will break all compositions.",
"es": "ATENCIÓN: Componer más de una librería romperá todas las composiciones."
}
}
}
Loading

0 comments on commit ccee760

Please sign in to comment.