Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Bug report
description: Something in SIMAI Framework IntelliSense does not work as expected.
labels: [bug]
body:
- type: markdown
attributes:
value: |
Use this form for problems with the VS Code extension itself: completions,
hovers, colour swatches, diagnostics or packaging. If a SIMAI Framework
component, class or token is wrong in the Framework, report it to
[simai/ui-source](https://github.com/simai/ui-source/issues) instead.
- type: input
id: version
attributes:
label: Extension version
description: Shown in the Extensions view, for example 0.2.0.
validations:
required: true
- type: input
id: vscode
attributes:
label: VS Code version and OS
description: From Help → About, for example 1.142.0 on macOS 26.
validations:
required: true
- type: input
id: language
attributes:
label: File language
description: For example HTML, TSX, Vue, CSS, Blade or PHP.
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: A minimal snippet and where the cursor was.
placeholder: |
1. Open a .html file
2. Type <sf-button size="
3. ...
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected and actual behaviour
validations:
required: true
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: SIMAI Framework problem
url: https://github.com/simai/ui-source/issues
about: A component, utility class or token is wrong or missing in SIMAI Framework itself. Report it to the Framework source repository.
- name: Security vulnerability
url: https://github.com/simai/ui-vscode/security/advisories/new
about: Report security issues privately, not as a public issue. See SECURITY.md.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Feature request
description: Suggest an improvement to SIMAI Framework IntelliSense.
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
The extension suggests only what the SIMAI Framework registry marks as safe
to suggest. To ask for a component, class or token to be added to the
Framework, open an issue in
[simai/ui-source](https://github.com/simai/ui-source/issues).
- type: textarea
id: problem
attributes:
label: Problem
description: What are you trying to do, and what gets in the way?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposal
description: How should the extension help?
- type: textarea
id: context
attributes:
label: Context
description: Languages, frameworks (for example Larena or Bitrix) or examples.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main]
pull_request:
workflow_dispatch:
workflow_call:

permissions:
contents: read
Expand Down
121 changes: 121 additions & 0 deletions .github/workflows/freshness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Framework freshness

# Weekly check that the vendored SIMAI Framework release is the latest
# published one. When it is not, vendor the new release on a branch, run the
# gates and open a pull request. This workflow never pushes to main.

on:
schedule:
- cron: '17 6 * * 1'
workflow_dispatch:

permissions:
contents: write
pull-requests: write

concurrency:
group: freshness
cancel-in-progress: false

jobs:
freshness:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Compare releases
id: compare
env:
GH_TOKEN: ${{ github.token }}
run: |
LATEST=$(npm view @simai-studio/ui@latest simai.release)
CURRENT=$(node -p "require('./contracts/framework.pointer.json').releaseId")
echo "Vendored: ${CURRENT}; latest published: ${LATEST}"
if [ -z "$LATEST" ]; then
echo "::error::@simai-studio/ui@latest has no simai.release field"
exit 1
fi
BRANCH="freshness/${LATEST}"
if [ "$LATEST" = "$CURRENT" ]; then
echo "::notice::The vendored release ${CURRENT} is current."
echo "stale=false" >> "$GITHUB_OUTPUT"
elif git ls-remote --exit-code --heads origin "$BRANCH" > /dev/null; then
echo "::notice::Branch ${BRANCH} already exists; not opening another pull request."
echo "stale=false" >> "$GITHUB_OUTPUT"
else
echo "stale=true" >> "$GITHUB_OUTPUT"
fi
echo "latest=${LATEST}" >> "$GITHUB_OUTPUT"
echo "current=${CURRENT}" >> "$GITHUB_OUTPUT"
echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT"

- if: steps.compare.outputs.stale == 'true'
uses: actions/checkout@v4
with:
repository: simai/ui
path: .framework/ui
fetch-depth: 0
- if: steps.compare.outputs.stale == 'true'
uses: actions/checkout@v4
with:
repository: simai/ui-source
path: .framework/ui-source
fetch-depth: 0

- name: Vendor the new release
if: steps.compare.outputs.stale == 'true'
run: |
npm ci
npm run vendor:framework -- --ui .framework/ui --ui-source .framework/ui-source \
--release "${{ steps.compare.outputs.latest }}"
npm run generate

- name: Gates
id: gates
if: steps.compare.outputs.stale == 'true'
continue-on-error: true
run: |
set -o pipefail
{
npm run pretest && npm test && npm run generate:check \
&& xvfb-run -a npm run test:extension \
&& npx vsce ls | node out/generate/checkPackage.js
} 2>&1 | tail -n 60 | tee gates.log

- name: Open a pull request
if: steps.compare.outputs.stale == 'true'
env:
GH_TOKEN: ${{ github.token }}
LATEST: ${{ steps.compare.outputs.latest }}
CURRENT: ${{ steps.compare.outputs.current }}
BRANCH: ${{ steps.compare.outputs.branch }}
GATES: ${{ steps.gates.outcome }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git switch -c "$BRANCH"
git add contracts data
git commit -m "Repin to SIMAI Framework release ${LATEST}"
git push origin "$BRANCH"
DRAFT=""
[ "$GATES" = "success" ] || DRAFT="--draft"
{
echo "Vendored ${LATEST} (was ${CURRENT}) with \`npm run vendor:framework\`."
echo
echo "Gates in the freshness run: **${GATES}**. Update the pinned counts in the"
echo "tests and the CHANGELOG, and check the diff of data/ before merging."
echo
echo "Pull requests opened with the workflow token do not start other workflows;"
echo "push a commit or re-run CI to get the CI checks."
echo
echo '```'
tail -n 40 gates.log
echo '```'
} > body.md
gh pr create --base main --head "$BRANCH" $DRAFT \
--title "Repin to SIMAI Framework release ${LATEST}" --body-file body.md
71 changes: 71 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Release

on:
push:
tags: ['v*']

permissions:
contents: read

jobs:
version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Tag matches package.json version
run: |
VERSION=$(node -p "require('./package.json').version")
if [ "${GITHUB_REF_NAME}" != "v${VERSION}" ]; then
echo "::error::Tag ${GITHUB_REF_NAME} does not match package.json version ${VERSION}"
exit 1
fi

gate:
needs: version
uses: ./.github/workflows/ci.yml

release:
needs: gate
runs-on: ubuntu-latest
permissions:
contents: write
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- name: Package
id: package
run: |
VSIX="sf-vscode-${GITHUB_REF_NAME#v}.vsix"
npx vsce package -o "$VSIX"
sha256sum "$VSIX" > "$VSIX.sha256"
echo "vsix=$VSIX" >> "$GITHUB_OUTPUT"
echo "sha256=$(cut -d' ' -f1 "$VSIX.sha256")" >> "$GITHUB_OUTPUT"
- name: GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$GITHUB_REF_NAME" \
"${{ steps.package.outputs.vsix }}" "${{ steps.package.outputs.vsix }}.sha256" \
--title "$GITHUB_REF_NAME" \
--notes "SIMAI Framework IntelliSense ${GITHUB_REF_NAME}. See CHANGELOG.md.

sha256 of ${{ steps.package.outputs.vsix }}: \`${{ steps.package.outputs.sha256 }}\`"
- name: Publish to the VS Code Marketplace
if: env.VSCE_PAT != ''
run: npx vsce publish --packagePath "${{ steps.package.outputs.vsix }}" --pat "$VSCE_PAT"
- name: Skip the VS Code Marketplace
if: env.VSCE_PAT == ''
run: echo "::notice::VSCE_PAT is not set; skipped publishing to the VS Code Marketplace."
- name: Publish to Open VSX
if: env.OVSX_PAT != ''
run: npx --yes ovsx@1.3.0 publish "${{ steps.package.outputs.vsix }}" --pat "$OVSX_PAT"
- name: Skip Open VSX
if: env.OVSX_PAT == ''
run: echo "::notice::OVSX_PAT is not set; skipped publishing to Open VSX."
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
!LICENSE
!images/icon.png
!data/*.json
!snippets/*.json
!out/*.js
!out/providers/*.js
!out/registry/*.js
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,37 @@

All notable changes to SIMAI Framework IntelliSense are listed here.

## [0.1.0] - Unreleased
## [0.2.0] - Unreleased

### Added

- Diagnostics for deprecated `sf-` tags and attributes (Warning) and for likely
misspellings of Framework tokens, tags and attributes (Information), with
Quick Fixes to the nearest valid name. Severity is configurable with
`sf.diagnostics.*`.
- Blade and PHP templates: class attributes, `sf-` tags and attributes, and
tokens in `style` attributes and `<style>` blocks.
- Snippets for a form field, checkbox, submit button, button row, select and
pagination, generated from names in the snapshot. There are no modal or
table snippets yet because the Framework does not mark those components as
safe to suggest.
- `sf.docs.baseUrl`: hovers link to `<baseUrl>/<registry ID>` when set.
- Marketplace screenshots, taken from VS Code with the packaged extension
installed (`npm run screenshots`).
- CI, release and weekly Framework freshness workflows; issue templates and a
security policy.

### Changed

- Repinned to the SIMAI Framework release `ui-3521193e0c6b` (registry
`simai/ui@a990dd19`, runtime `simai/ui@3521193e`, sizing contract from
`simai/ui-source@d0d01841`). The sizing contract is unchanged
(`simai.vertical-sizing@1.3.0`), and so are the suggested names: 13 tags,
1058 utility classes and 922 tokens. The new `--sf-button-group-radius`
public variable is not suggested yet because Button Group is not marked
safe to suggest.

## [0.1.0] - 2026-10-19

### Added

Expand Down
Loading
Loading