Skip to content

Commit c9a6062

Browse files
doc: show release notes
1 parent 807ca26 commit c9a6062

File tree

3 files changed

+85
-4
lines changed

3 files changed

+85
-4
lines changed

RELEASE_NOTES_2.22.0.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Release notes for Pymakr v2.22.0
2+
3+
It's been a long time coming but we're delighted to finally announce the next release of our Pymakr 2. We've packed this release with tons of new features and bugfixes to make Pymakr 2 even faster, easier and more reliable than ever.
4+
5+
We aim to make your experience with Pymakr as pleasant as possible Should you have any problems with our new release, please [open an issue](https://github.com/pycom/pymakr-vsc/issues/new/choose) on Github so that we can help.
6+
7+
# <br>
8+
9+
## Feature Highlights
10+
11+
[Get Started Guide](#get-started-guide)
12+
13+
[Developer Mode](#developer-mode)
14+
15+
[Device Configuration](#device-configuration)
16+
17+
[Better Notifications](#better-notifications)
18+
19+
[Device Hover](#device-hover)
20+
21+
[Open File on Device](#open-file-on-device)
22+
23+
# <br>
24+
25+
## Get Started Guide
26+
27+
Clicking `ctrl/cmd + shift + p`, typing `walkthrough` and selecting `Get Started: Open Walkthrough...` will show a list of walkthroughs.
28+
29+
Here's you can click `Pymakr 2 - Getting Started` for a brief rundown.
30+
31+
# <br>
32+
33+
## Developer Mode
34+
35+
Dev mode keeps your connected devices running and synchronized to your project folder in realtime.
36+
37+
In dev mode, whenever a file in a project is saved, the changes are synced to the project's devices and the devices then restarted.
38+
39+
Clicking the upload button while in dev mode will stop the current running script and upload files that are different from those on the device. Kinda like patching. _This is different from the regular upload functionality, which erases all content on the device before uploading the entire project._
40+
41+
_Note: Dev mode is limited to to the capabilities of the connected devices. Eg. it's not possible for Pymakr to communicate with a device in `machine.deepsleep` since the device's USB is disabled in this state. (A workaround for this may be possible - see `dev.simulateDeepSleep` in `pymakr.conf`)_
42+
43+
# <br>
44+
45+
## Device Configuration
46+
47+
It's now possible to configure individual devices in `settings->pymakr->devices->configs`. Here you can customize settings like `device.rootPath` and `device.adapterOptions` in case your device doesn't work with the defaults / auto detected values.
48+
49+
# <br>
50+
51+
## Better Notifications
52+
53+
We've added more notifications to help explain the different events and actions in Pymakr.
54+
Power users who are ready to kick the support wheels can click `Don't show again` or save their choices when a popup is no longer wanted.
55+
56+
_Popup choices can be undone in `Settings->Pymakr->Misc->Notifications_
57+
58+
# <br>
59+
60+
## Device hover
61+
62+
Hovering over a device now shows information about the device.
63+
64+
# <br>
65+
66+
## Open File on Device
67+
68+
Right clicking a project file and selecting `Pymakr->Open file on device` will open the corresponding file on the device. Here you can verify the content and save changes as required.

src/PyMakr.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class PyMakr {
3030
* @param {vscode.ExtensionContext} context
3131
*/
3232
constructor(context) {
33+
this.context = context;
34+
3335
/**
3436
* Actions to be run at the launch of the plugin
3537
* @example
@@ -47,7 +49,7 @@ class PyMakr {
4749
this.vscodeHelpers = createVSCodeHelpers(this);
4850

4951
/** Handles all info, warn and error notifications */
50-
this.notifier = new Notifier(this)
52+
this.notifier = new Notifier(this);
5153

5254
/** Extendable logger. */
5355
this.log = createLogger("[Pymakr]");
@@ -57,7 +59,6 @@ class PyMakr {
5759
this.terminalPort = 5364 + ((Math.random() * 10240) | 0);
5860

5961
this.onUpdatedConfig("silent");
60-
this.context = context;
6162

6263
/** The package.json manifest */
6364
this.manifest = manifest;
@@ -88,6 +89,8 @@ class PyMakr {
8889
this.registerWithIde();
8990
this.setup();
9091
this.handlePendingActions();
92+
93+
this.notifier.notifications.showReleaseNotes();
9194
}
9295

9396
handlePendingActions() {
@@ -165,8 +168,7 @@ class PyMakr {
165168
*/
166169
onUpdatedConfig(mode) {
167170
this.log.level = this.log.levels[this.config.get().debug.logLevel];
168-
if (this.log.level >= 5)
169-
process.env.debug = this.log.level === 5 ? 'true' : 'silly'
171+
if (this.log.level >= 5) process.env.debug = this.log.level === 5 ? "true" : "silly";
170172

171173
this.log.filter = this.config.get().debug.logFilter !== "" ? new RegExp(this.config.get().debug.logFilter) : "";
172174
if (mode !== "silent") this.log.info("updated config:", this.config.get());

src/utils/Notifier.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const vscode = require("vscode");
2+
const { createStateObject } = require("./storageObj");
23

34
/**
45
* @typedef {string} btnText selecting this option will not hide the notification in the future
@@ -21,6 +22,9 @@ class Notifier {
2122
warning: vscode.window.showWarningMessage,
2223
error: vscode.window.showErrorMessage,
2324
};
25+
this.state = {
26+
lastReadReleaseNotes: createStateObject(this.pymakr.context.globalState, "lastReadReleaseNotes"),
27+
};
2428
}
2529

2630
/**
@@ -251,6 +255,13 @@ class Notifier {
251255
"": [null, this.DONT_SHOW_AGAIN],
252256
});
253257
},
258+
showReleaseNotes: async () => {
259+
const uri = vscode.Uri.file(`${__dirname}/../../RELEASE_NOTES_2.22.0.md`);
260+
if (this.state.lastReadReleaseNotes.get() !== uri.fsPath) {
261+
this.state.lastReadReleaseNotes.set(uri.fsPath);
262+
vscode.commands.executeCommand("markdown.showPreview", uri);
263+
}
264+
},
254265
};
255266
}
256267

0 commit comments

Comments
 (0)