šŸ”„ PlatformIO Home 3.1 Beta and Project Configuration UI for "platformio.ini"

I can clearly see the progress but Iā€™m still somewhat hesitant. Itā€™s good if someone works with a single configuration. But for everything else there is still a solid understanding of the underlying file and all its hidden secrets required.

If you have two or more configurations and no env or platformio section, there is no obvious way to select the default configuration and the configurations built by default.

Secret 1: Tab order matters; the first one is used for Intellisense and debugging.

Secret 2: There is default_envs. But it must go into the platformio section.

If you create the platformio section / PlatformIO Settings configuration, it is added to the right, called platformio and visually identical to other configurations. It would be much better, if it went to the left most position (and top position within the file), didnā€™t have a name but was clearly labelled as PlatformIO Settings (including the tab label).

If you create an env section / Common Configuration, it goes to the right most position as well and doesnā€™t look different from regular configurations. Again, it would be better if it was clearly distinguishable from regular configurations, had a title instead of a read-only name field and the tab was labelled Common Configuration because thatā€™s what the previous action was supposed to create.

Other open issues:

  • When saving, all existing comments are discarded without warning.
  • A header is inserted into the saved file. Thatā€™s ok when creating a new project; but afterwards itā€™s more of an annoyance.
  • Shortcuts for copy/cut/paste do not work (on Mac, applies to other UIs as well)
2 Likes

Yet another beta - 4! :blush:

pio upgrade --dev

We added ā€œMake Defaultā€ button which should help people to mark default working environments. Also, a lot of improvements with UI and wording.

Here is a list of active tasks for Project Configuration:

If something is missed, please file a new issue/feature request and we will work on it,

@TD-er all issues that you reported were fixed too. Thanks!!!

@manuelbl what could be improved this time? The ā€œauto-completionā€ for known fields is in progress and we have good results. It seems we can even implement in-line search for lib_deps.

Configuration save does work now.
But the formatting of the file is lost.
Would be nice if the = in a section is all aligned on the same column.
That makes reading a lot easier.

For example:

[env]
framework                 = ${common.framework}
lib_ldf_mode              = ${common.lib_ldf_mode}
lib_archive               = ${common.lib_archive}
lib_deps                  = ${common.lib_deps}
lib_ignore                = ${common.lib_ignore}
upload_speed              = ${common.upload_speed}
monitor_speed             = ${common.monitor_speed}
targets                   = ${common.targets}


[env]
framework = ${common.framework}
lib_ldf_mode = ${common.lib_ldf_mode}
lib_archive = ${common.lib_archive}
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
upload_speed = ${common.upload_speed}
monitor_speed = ${common.monitor_speed}
targets = ${common.targets}

Also all comments are stripped, which I do find more of a problem.
I have blocks of comments to separate a number of envs which have much in common.
Since the project configurator also does not support multiple files, getting rid of comments does not help in keeping the ini files a bit structured.

An unfortunate known issue I raised earlier, and is currently in the "canā€™t be fixedā€™ pile as Pythonā€™s ConfigParser is just that dumb, and there donā€™t seem to be any viable maintained alternatives.

And do I detect another plea for multi-file configuration support? :laughing: At least itā€™s in the list to be implemented, but I donā€™t think it wonā€™t make the first releaseā€¦

I suspect (and I hope Iā€™m wrong) that the limitations of the ConfigParser may also foul implementing your alignment requestā€¦ which does make it so much more readable. Then again, thereā€™s nothing to stop some sort of ConfigParser write post-processing of the file? Maybe? Possibly?

First reactions - only taken it for a quick test driveā€¦ and will add issues on pio-home for so can be task-listed/discussed/rejected.

  • Labels for the hover icons is taking the guesswork out of what they icons doā€¦ thanks!

  • Can we get PlatformIO Configuration pinned to the left side of the tab strip, rather than somewhere on the right, and potentially between env blocks?
    image

  • The errant unconfigured boolean options arenā€™t being inserted anymoreā€¦ yay!

  • I still think the ToC button needs to go up the top, as it is not a tab specific option, and persists as you switch between tabs.

  • After saving changes with the GUI, there are always two blank lines at the end of platformio.ini ā€¦ I can understand 1, but 2 is double dipping! :laughing:

  • I like how the deleting of env was handled, much better now! :slight_smile:

  • No more scary message about no options defined :wink:

Questions for discussion:

Should entries which have no value be deleted? Or should they be explicitly deleted to be removed from the platformio.ini. As a simply experimentā€¦ clear the value of board for a envā€¦ save the changeā€¦ and board = still exists in the platformio.ini ā€¦ I was expecting it to be deleted since it had no value set.

Is there benefit to having the PlatformIO Configuration tab always present? And perhaps also the ā€˜common configurationā€™? Then the plus button just adds environments. Or will this confuse users with extra ā€˜emptyā€™ tabs? Unless, of course, the no options message was expanded on, to include a brief summary of the sorts of things that can be configured in that tab?

Thanks for your summary and opened issues! :slight_smile: Itā€™s better to open them directly in Issues Ā· platformio/platformio-home Ā· GitHub and keep here the only discussion.

We need this behavior to set option to empty state. For example, debug_init_break, to disable initial breakpoint you need to set this option to empty.

Itā€™s good to have these tabs. It will be clear for developers.

1 Like

We want to show this warning before the first saving. Is it ok? Please help with text:

1 Like

New 3.1.0-beta.5 is out! Please re-run pio update and restart VSCode:

  • Refactored project configuration top toolbar layout
  • Moved ToC to TOP toolbar
  • Renamed ā€œPlatformIO Configurationā€ to ā€œPIO Configurationā€
  • Other improvements to UI
1 Like

Thatā€™s looking really good Ivan & Eugene :slight_smile: That the PIO configuration and Common configuration tabs now auto insert to the right, and have different icons to all the other tabs makes them stand out more too.

My only niggle at present would be the folder icon in the top toolbarā€¦ I clicked it without reading the tooltip, and went to the editor, not to an open dialog. Perhaps a pencil icon or some other icon that symbolises editing?

And now youā€™re just teasingā€¦ I can see that PR about the serial port and env autocompleters thatā€™s just begging to be brokenā€¦ er, tested!! :eyes: :stuck_out_tongue:

1 Like

3.1.0-beta.6 is out! See changes Commits Ā· platformio/platformio-home Ā· GitHub

Thanks, @pfeerick and @manuelbl for your bug reports!

P.S: Now, the most complicated part - auto-completion for known fields => 3.1 Milestone Ā· GitHub

ā€¦ and only two and a bit weeks to deliver it by! :wink: :laughing:

Latest changes look good, I havenā€™t manage to break anything else yet ! :slight_smile:

3.1.0-beta.7 is out! See changes Commits Ā· platformio/platformio-home Ā· GitHub

Please re-run pio update and restart VSCode.

What Is New

  • Dropdown list with serial ports for *_port options
  • Autocompletion with known boards, platforms, and frameworks
  • Autocompletion for lib_deps.

Thanks, @pfeerick and @manuelbl for your bug reports and feature requests!

Are we close to the finish? :blush:

1 Like

The autocompletion is very helpful but currently hard to use:

  • If the platform is changed, board and framework are deleted. Very surprising. It would make sense if the value is incompatible with the selected platform. But the framework (Arduino in my test case) was available on both platforms.
  • Framework field is not working:
    • When I start to type, all entries have three dots prepended even if the field is empty (except in a single case I can no longer reproduce). Why?
    • When I select an entry from the autocompletion, the autocompletion disappears and the typed letters remain in the field. (What in fact happens is that the selected entry is inserted outside the visible area of the field content and in addition to the typed letters even though itā€™s supposed to replace it.)
    • Multiple entries are inserted on separate lines but the field height does not grow. So the content is not visible and its not obvious what happens.
    • Unlike the other fields, the framework field has no search icon at the end of the field. Whatā€™s this difference supposed to indicate?
  • At first the lib_deps field didnā€™t work. I entered text, clicked the search icon: no effect. Then after about 20 seconds, it started to work. But it still does not seem to work reliably. I guess itā€™s loading some data in the background. If so, it badly needs some indication that itā€™s working.

I am also confused that a newly created project does not appear in the Projects view. I have to first add it manually (Add Existing) before I can configure it.

Once the above issued have be ironed out, youā€™ll be very close to the finish or even have made it.

1 Like

That looks to be a bug, as itā€™s much worse than that. If, for instance, you merely click on the platform entry, and then click away from it, it clears both the board and framework. I thought at first it worked if you clicked on the auto-complete prompt, but even then it deletes the other entries :frowning:

bad_framework_autocomplete

The triple dots appears to be related to the multi-line nature of the framework field, and I can get it to behave half of the time. It seems to get confused if the field wasnā€™t completely empty to start withā€¦ if there is any whitespace at all, it prepends the ... and will insert the selected entry on a new line. And yeah, it does confuse a bit that the field doesnā€™t auto-expand if add to.

I didnā€™t have any issues with the lib_deps search (yet! :laughing:)ā€¦ I typed, waited 1-1.5 seconds and it gave me optionsā€¦ picked my optionā€¦ and then pressed enter to add it (maybe that last bit isnā€™t so intuitive?) Or sooner if I clicked the search icon. But yes, perhaps a spinner similar to the one used on the main home screen whilst itā€™s searching could be implemented, for when there are issues with internet connection, i.e. slow, etc. I suppose editing existing values is in the ā€˜too hard basketā€™ for now? Or is that a ā€˜go edit the platformio.ini fileā€™ occasion.

lib_deps_autocomplete

Thank you for pointing out the newly created projects arenā€™t addedā€¦ I completely forgot to mention that when I encountered it. IIRC, it does get added if you create it from the Projects page, but not from the home page?

This is on Windows 10 w/ PIO Home 3.1.0-beta.7 & Core 4.1.1b5

Beta 8 is out! We fully refactored auto-completion engine. It should work much better now. Please pio upgrade --dev.

Merry Christmas! :christmas_tree:

1 Like

Looks much better now. The remaining issues are:

  • Projects created from Home do not appear under Projects.
  • The search bar on Projects has no effect.
  • In the rare case of multiple frameworks (e.g. framework = mbed, arduino) they appear in the UI as mbedarduino.

How to reproduce this? Do you use the latest Beta 8?

This is how I can reproduce it:

  • Start Visual Studio Code
  • Click on the Home icon in the status bar
  • Click New Project
  • Enter:
    • Name: Nano-IoT-3
    • Board: NANO 33 IoT (Arduino)
  • Click Finish
  • Click PlatformIO icon in left bar
  • Click Projects & Configuration in QUICK ACCESS

The just created project is not present in the list of projects even though I probably should.

  • Typing nano in the search bar
  • Press RETURN
  • Click the white search icon on blue background

Nothing happens. The list of projects doesnā€™t change.

This is with PIO Home 3.1.0-beta.8 and PIO Core 4.1.1b6.

It looks like the search works in realtimeā€¦ i.e. after you pause for a moment it does something ā€¦ so thereā€™s no need to hit the button or press enterā€¦ but itā€™s that something that isnā€™t working properlyā€¦ as what it is actually matching/searching for I donā€™t know!

e.g. I can see that when I search for ā€˜pzemā€™ that the list is reduced from four items to three instantly, but why it shows the other two matches I donā€™t know??

And whilst I thought the history issue was only related to the new Projects tab, I just realised the main front screen recent projects list isnā€™t updating.

Home screen add new project

vs

Projects section add new project

But the add existing button on the Projects panel updates the list properly, which is why the PZEM project is listed now.

Also, it seems like the multi-line handling for framework is better (less confusing?), but also worseā€¦ it now wonā€™t let you enter two frameworks at all, and if you have two frameworks present in the file, it mashes them togetherā€¦

i.e. the randomly (and manually) entered

framework = 
  arduino
  simba

got turned into

image

Otherwise seems good! :slight_smile: Hope you guys had a great Christmas! :wink:

Everything is fixed in 3.1.0-rc.1. Please pio upgrade --dev.

@manuelbl @pfeerick @maxgerhardt thank you so much for all your help in 2019! We appreciate this and wish you a very Happy New Year! :christmas_tree: :yellow_heart: :santa:

1 Like