Skip to content

Conversation

@stuboydl
Copy link
Contributor

@stuboydl stuboydl commented Sep 2, 2024

Changes:

  1. Added "Format Structure" setting (formatStructure) and rule to improve document formatting. This setting helps to produce cleaner formatted code when VSCode's automatic block code folding is used. [The word structure implies structured programming, a common style in MV development - this formatting rule emphasises the structural blocks].

image

VSCode's code folding capabilities are great for helping developers to focus on important parts of code. Swathes of comments or irrelevant code can be hidden away.

Often legacy code has RETURN's indented from the left margin and comments in the left margin. This interferes with clean block structures that VSCode can use for determining code folding regions. The default "MV Basic Format" command doesn't address these issues.

This setting, when combined with the "MVBasic: Indent Comment" setting = "code", will produce formatted code that assists VSCode's automatic block code folding to work cleanly over MV basic code.

When the format document command is run, the following keywords (function|program|return|stop|sub|subroutine) will go to hard left to indicate either the start or end of a code structure block.

folding 1

  1. Added MVBasic friendly code folding markers.
    Code Folding Markers can be used to fold away irrelevent code or comments which distract from a task. As comments, they may be left in the code without harm.

image

folding 2

Add \\ and ' to surrounding pairs Update Extension Guide with formatStructure doc
@itsxallwater
Copy link
Member

Thanks for submitting this! Tagging Pete and I for reviews; we'll look to get this merged in and published here ASAP.

@itsxallwater itsxallwater merged commit a76fa2e into mvextensions:develop Sep 26, 2024
@itsxallwater
Copy link
Member

Will get a build cut here shortly to use for manual installation and testing

@itsxallwater
Copy link
Member

itsxallwater commented Sep 27, 2024

@stuboydl @pschellenbach https://zumasyscorp-my.sharepoint.com/:u:/g/personal/mikew_zumasys_com/ESTx12QuQ5BOm535Km3Er28Buswf8laeQPO6nKrwdZLfBQ?e=g7Rc5f you can check out a preview version here.

Also circulating this internally here at Zumasys for some testing with our team before we push to the marketplace.

@itsxallwater
Copy link
Member

Any reservations about promoting this release? I've not heard of any reported issues.

@pschellenbach
Copy link

pschellenbach commented Oct 16, 2024 via email

@itsxallwater
Copy link
Member

Not quite so fast I guess, vsce publish doesn't like something. Strange since vsce package was fine.

image

itsxallwater added a commit that referenced this pull request Mar 26, 2025
Previously tested by several community members and Zumasys employees * Bump follow-redirects from 1.15.4 to 1.15.6 in /client (#193) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](follow-redirects/follow-redirects@v1.15.4...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Structure formatting * Add braces to bracket types Add \\ and ' to surrounding pairs Update Extension Guide with formatStructure doc * Code folding helpers #196 * Remove "#" suffix from 7.7 MVON * Bump braces from 3.0.2 to 3.0.3 (#194) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](micromatch/braces@3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump webpack from 5.89.0 to 5.94.0 (#195) Bumps [webpack](https://github.com/webpack/webpack) from 5.89.0 to 5.94.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v5.89.0...v5.94.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump axios from 1.6.4 to 1.7.4 in /client (#197) Bumps [axios](https://github.com/axios/axios) from 1.6.4 to 1.7.4. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.6.4...v1.7.4) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * v2.1.7 prep * resolve vsce publish issue for 2.1.7 * v2.1.7 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stuart Boydell <s.boydell@paperlesswarehousing.com.au>
@itsxallwater
Copy link
Member

@stuboydl this is finally in production via the marketplace; ultimately came down to adjusting the webpack based bundling of things and making sure the .vscodeignore file was keeping all of the node_modules from being included

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants