All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Changed font styling for loading state in webview. I overdid it with gradient and shadows!
- Changed loading animation to use a custom on-brand animation.
- Changed a few styles for loading state.
- Ensure that all of the content from snippets files are escaped before being output in the view.
- A "cannot read properties of undefined (reading '0')" error is thrown when the command
Snippets Ranger: Show me that dur Range, Partner
is run and no workspace is open. Fixed this scenario.
- If a snippets files has invalid data or is empty, the file is show in the view with the description "No snippets".
- Improved error handling for rejected promises from
glob
.
- Improve table of contents:
- Add
.bookmark
element to individual extension sections to ensure there is an accurate location from the table of contents that does not result in upper rows of the snippets table being partially obscured. - Add an entry for category sections to table of contents even if there are no snippets for that category.
- Add
- Add a custom margin for paragraphs to make spacing more consistent.
- Increase resolution of logo.webp to 256x256. It was appearing slightly blurry in some instances.
- Reduce resolution of add-commmand.webp to 704x756 to optimize reading experience of README.
- Fixed typos in README.md.
- Change
:focus
outline color to pink in styles.css. - Redo action-highlight.webp to be more apparent with transparent background.
- Redo add-command.webp to be shorter and more compact to improve readability in README.
- Change theme
galleryBanner.color
to a darker, less saturated blue in package.json. - Use same color as above for background of badges in README.md.
- Improve README copy and overall appearance.
- Improve quality of the animated image demonstrating sticky headings.
- Optimize images.
- Remove unused files e.g. snippets-editor.js, snippets-fetcher.js.
- Major refactor of codebase!!
- Tweaked the appearance of view in following ways:
- Updated the table of contents to show an entry for the snippets file in an extension.
- Show all snippet files. Previously if a file was empty, it was not shown.
- For extensions section, make the file section with the heading (snippet file name) and languages a sticky section.
- Moved the "view source" button to be on same line as heading and to be be part of a sticky section.
- For the table of snippets:
- Show
prefix
as an unstyled list. If it has multiple items, show as a comman-separated list with each item on a separate line. - Format the
scope
content to be a sorted list and have a space between each item.
- Show
- Tweaked colours, spacing, and various styles to improve readability.
- Change the
h3
headings in the project, user, and "VS Code" sections. Now, it shows the filename with the extension. Previously, the extension was excluded for brevity. Since a snippet file can be a.json
or.code-snippets
file, it is better to be give the complete filename. - Changed the title for "app" snippets section from "VS Code Snippets" to "App Snippets".
- Change
prefix
to accept string or array in snippet.js. - Change
scope
to be a formatted string (sort items and normalize space between items) in snippet.js. - Change the title of the
snippets-ranger.add
command from "Snippets Ranger: Add New Snippet" to "Add new snippet to snippets file...". - Change the
snippets-ranger.add
command to transform a multi-line string into multiple elements in the array. - Updated README copy and added new screenshots.
- Removed the "back to button" that resided in the top-right corner of view.
- For the
snippets-ranger.add
command, it escapes dollar signs in the selected code. This ensures that they are not interpeted as tabstops.
- Fix the delete action. It was doing an error-prone regex replacement. Parse the file as JSON and use
delete
instead.
- Published changes made in v24.0.
- The variable
has
was not declared properly in hasScopeField. Addedlet
to it. Unusual that this is not an issue in test.
- Rollback changes of v24.0. Git!! Issue found and requires further investigation.
- Added Project snippets section. The source of the snippets is from files with the .code-snippets extension found in the .vscode folder in your workspace.
- Added
scope
field for snippets (snippets.js). - Added GitHub issue template for bugs. This was done on github.com but edited locally.
- The
id
attribute generated forh3
headings is in the form of the -<title>. Now thetitle
portion is slugified. This ensures that there are no unwanted characters that can break links for table of contents. - The
scope
field is shown in tables when there is at least one instance of the field in the project, user and vs code snippet files. - Updated animated image demonstrating UI to reflect that project snippets are there now also. I used WebP instead of GIF for better compression/quality.
- Some refactoring to improve readability.
- Updated tests to reflect changes.
- There was some whitespace in
<img src="img/screenshots/demo.webp" ...
in the README.md that brokevsce package
!
- Updated README. Removed Installation section and improved copy.
- Escaped backslashes (2 consecutive backslashes) were not appearing correctly in HTML output. e.g a snippet with a
body
of "\${num};" appears as "${num}".
- Modify webpack.config.js to work with Node v18.x. It was throwing a 'ERR_OSSL_EVP_UNSUPPORTED' error whose cause is: "it’s likely that your application or a module you’re using is attempting to use an algorithm or key size which is no longer allowed by default with OpenSSL 3.0".
- Updated tests in formatter.test.js.
- Updated secret for GitHub Action to publish automatically.
- Add "main" and "master" branches to GitHub Action. It did not start for some reason!
- Update GitHub Action to latest major version (version 1).
- Update .eslintrc.json to use
eslint-config-node-roboleary
config.
- Autofixed some mistakes caught by ESLint.
- Update vsce to latest.
- The
scripts
needed to be updated to work with latest Node. An issue with webpack ERR_OSSL_EVP_UNSUPPORTED.
- Added sponsorship url to
package.json
- Fixed spacing between headings. The text of the h3 was getting slightly truncated at the top when the tab is less than 800px.
- Edited "add-new.jpg" explanation of add new command. Changed bg color and made into smaller webp.
- Mistake in README about installation.
- Changed README format.
- Updated demo.gif.
- Moved "Go to top" floating button to the top right side. Only appears when table of contents is out of view.
- Moved "Go to top" floating button to the left-hand side. On thr right-hand side, it floats above the action buttons, which could lead to a fat finger mistake.
- Updated add-new.jpg to blend in better with surrounding text. Reduced font-size of text in the figure.
- Delete action.
- Edit action to open snippet with the cursor at the first character of the snippet name.
- Improved appearance at different viewport sizes.
- For edit action, move the cursor to the specified position, as well as reveal the range.
- Fix typo in README.md.
- Improved add-new.jpg.
- Small edits in README.md.
- Added edit action button to tables.
- Updated README with new demo GIF and images.
- Changed table highlight colors.
- Improved README.
- Changed the "Add new snippet" command to open up the built-in "open snippets" quickPick to make it possible to add a snippet to any type of snippet file.
- Changed
toString()
insnippets.js
to include a new line at the start of the string. - Edited the README for the "Add new snippet" command. Replaced the GIF with a photo showing the step-by-step actions of adding a new snippet.
- Improved formatting of
body
in View to show tabs and line breaks. ChangedFormatter.escapeHtml()
. - Refactored
Snippets
andSnippetsEditor
to simplify code.
- Tests: formatter.test.js, snippet.test.js.
Snippets Ranger: Add new snippet
command.
- Changed loading GIF. This reduced the extension size from 355KB to 62KB.
- Github action to publish to VS Code marketplace and Open VSX.
- Always show loading GIF. The reveal animation for the GIF doesn't run, it seems that the thread doesn't get time once it starts the async fetching of snippets!
- Introduced a bug when refactoring view.js. Fixed the reference variables.
- To retain the webview content when the panel is not in focus, added
retainContextWhenHidden: true
. This improves rendering time when switching between editor tabs, but requires more resources overall. A necessary tradeoff. - Added download and install badges to readme.md.
- Added a loading screen to show after 3/4 of a second.
- Tidied up code to remove remaining ES Lint errors.
- Loading text for webview
- Added a test for the extension
- For Linux, there was an issue with the file path for user extensions, which lead to the extension not loading.
- Added "View Source File" button.
- Added a version of logo as a github sharing picture.
- When clicking on one of the Table of Contents links, the paragraph part of the section is obscured when shown. Adjusted margin, so this does not happen.
- Added Demo gif to README.md.
- Improved styles for light mode, dark mode, and high contrast mode.
- Change title for Extension TOC entries to be the display name of the Extension.
- Changed title for Extension Snippets to be the display name of the Extension.
- Changed languages associated with an extension snippets file into an unordered list (it was a string in a paragraph).
- Go to top link.
- Changed logo.
- Changed z-index on h4 so that it slides under h3 and h2 on scroll.
- Added node engines to package.json to stop ES Lint reporting unsupported features errors.
- Update rules ES Lint config.
- Adding formatting of snippets to ensure data is consistent and that the body can be shown on a webpage without formatting issues. Added snippet.js which will ensure that description is set to blank if it is undefined, and that body is always an array. Added escapeBody() to Formatter.js that will escape markup in the body array and concatenate it into a well-formatted string for use in the webview.
- Changed webpack config to minify the stylesheet.
- Show extension snippets in webview.
- Added a Table of Contents.
- Initial release. Shows user and app snippets.