diff --git a/.github/ISSUE_TEMPLATE/bug-developer.yml b/.github/ISSUE_TEMPLATE/bug-developer.yml
new file mode 100644
index 0000000..3880f58
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug-developer.yml
@@ -0,0 +1,187 @@
+name: 🐛 Developer Bug report
+description: File a Code bug/issue
+title:
+labels:
+ - bug
+body:
+ - type: checkboxes
+ attributes:
+ label: Is there an existing issue for this?
+ description: Please search to see if an issue already exists for the bug you encountered.
+ options:
+ - label: I have searched the existing issues
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Current Behavior
+ description: A concise description of what you're experiencing.
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Expected Behavior
+ description: A concise description of what you expected to happen.
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Steps To Reproduce
+ description: Steps to reproduce the behavior.
+ placeholder: |
+ 1. In this environment...
+ 2. With this config...
+ 3. Run '...'
+ 4. See error...
+ validations:
+ required: true
+
+ - type: dropdown
+ id: system
+ attributes:
+ label: On which operating system are you experiencing the problem?
+ multiple: true
+ options:
+ - BSD
+ - Linux
+ - Windows
+ - MacOS
+ - iOS
+ - Android
+ validations:
+ required: true
+
+ - type: input
+ id: system-version
+ attributes:
+ label: The version of your Operation System
+ validations:
+ required: true
+
+ - type: dropdown
+ id: subsystem
+ attributes:
+ label: What subsystem is the problem related to?
+ multiple: true
+ options:
+ - Docker
+ - WSL
+ - WINE
+
+ - type: input
+ id: subsystem-version
+ attributes:
+ label: The version of your Sub-system
+
+ - type: dropdown
+ id: Web-browser
+ attributes:
+ label: What browsers are you seeing the problem on?
+ multiple: true
+ options:
+ - Firefox
+ - Chrome
+ - Safari
+ - Microsoft Edge
+ - Opera
+ - Brave
+ - Arc Browser
+ - UC Browser
+ validations:
+ required: true
+
+ - type: input
+ id: Web-browser-version
+ attributes:
+ label: The version of your Web browser
+ validations:
+ required: true
+
+ - type: dropdown
+ id: network-region
+ attributes:
+ label: What network region are you in?
+ multiple: true
+ options:
+ - Global
+ - China mainland
+ validations:
+ required: true
+
+ - type: dropdown
+ id: cli
+ attributes:
+ label: Which command line terminal are you using?
+ multiple: true
+ options:
+ - Shell
+ - CMD
+ - Powershell
+ validations:
+ required: true
+
+ - type: input
+ id: cli-version
+ attributes:
+ label: The version of your Command-line Terminal
+
+ - type: dropdown
+ id: JavaScript-runtime
+ attributes:
+ label: Which JavaScript runtime are you using?
+ multiple: true
+ options:
+ - Node.js
+ - Bun
+ - Deno
+ validations:
+ required: true
+
+ - type: input
+ id: JavaScript-runtime-version
+ attributes:
+ label: The version of your JavaScript runtime
+ validations:
+ required: true
+
+ - type: dropdown
+ id: JavaScript-package-manager
+ attributes:
+ label: Which JavaScript package manager are you using?
+ multiple: true
+ options:
+ - npm
+ - Yarn
+ - pnpm
+ - Bun
+ validations:
+ required: true
+
+ - type: input
+ id: JavaScript-package-manager-version
+ attributes:
+ label: The version of your JavaScript package manager
+ validations:
+ required: true
+
+ - type: dropdown
+ id: development_environment
+ attributes:
+ label: Which development environment are you using?
+ multiple: true
+ options:
+ - Local
+ - Gitpod
+ - GitHub Codespaces
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Anything else?
+ description: |
+ Links? References? Anything that will give us more context about the issue you are encountering!
+
+ Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
diff --git a/.github/ISSUE_TEMPLATE/bug-user.yml b/.github/ISSUE_TEMPLATE/bug-user.yml
new file mode 100644
index 0000000..751475d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug-user.yml
@@ -0,0 +1,131 @@
+name: 🐛 User Bug report
+description: File an UI bug/issue
+title:
+labels:
+ - bug
+body:
+ - type: checkboxes
+ attributes:
+ label: Is there an existing issue for this?
+ description: Please search to see if an issue already exists for the bug you encountered.
+ options:
+ - label: I have searched the existing issues
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Current Behavior
+ description: A concise description of what you're experiencing.
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Expected Behavior
+ description: A concise description of what you expected to happen.
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Steps To Reproduce
+ description: Steps to reproduce the behavior.
+ placeholder: |
+ 1. In this environment...
+ 2. With this config...
+ 3. Run '...'
+ 4. See error...
+ validations:
+ required: true
+
+ - type: dropdown
+ id: hardware
+ attributes:
+ label: What kind of hardware did the bug occur on?
+ multiple: true
+ options:
+ - Desktop
+ - Pad
+ - Phone
+ - Smart Device
+ - Car
+ validations:
+ required: true
+
+ - type: dropdown
+ id: system
+ attributes:
+ label: On which operating system are you experiencing the problem?
+ multiple: true
+ options:
+ - BSD
+ - Linux
+ - Windows
+ - MacOS
+ - iOS
+ - Android
+ validations:
+ required: true
+
+ - type: input
+ id: system-version
+ attributes:
+ label: The version of your Operation System
+ validations:
+ required: true
+
+ - type: dropdown
+ id: Web-browser
+ attributes:
+ label: What browsers are you seeing the problem on?
+ multiple: true
+ options:
+ - Firefox
+ - Chrome
+ - Safari
+ - Microsoft Edge
+ - Opera
+ - Brave
+ - Arc Browser
+ - UC Browser
+ validations:
+ required: true
+
+ - type: input
+ id: Web-browser-version
+ attributes:
+ label: The version of your Web browser
+ validations:
+ required: true
+
+ - type: dropdown
+ id: network-connection
+ attributes:
+ label: What kind of network are you connecting to?
+ multiple: true
+ options:
+ - WLAN
+ - WiFi
+ - 4G
+ - 5G
+ validations:
+ required: true
+
+ - type: dropdown
+ id: network-region
+ attributes:
+ label: What network region are you in?
+ multiple: true
+ options:
+ - Global
+ - China mainland
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Anything else?
+ description: |
+ Links? References? Anything that will give us more context about the issue you are encountering!
+
+ Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
diff --git a/.github/ISSUE_TEMPLATE/feature-enhancement.yml b/.github/ISSUE_TEMPLATE/feature-enhancement.yml
new file mode 100644
index 0000000..7d34e7b
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature-enhancement.yml
@@ -0,0 +1,35 @@
+name: ✨ Feature/Enhancement
+description: Request a new feature or enhancement
+title:
+labels:
+ - enhancement
+body:
+ - type: checkboxes
+ attributes:
+ label: Is there an existing feature request for this?
+ description: Please search to see if a feature request already exists for the enhancement you are proposing.
+ options:
+ - label: I have searched the existing feature requests
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Description
+ description: |
+ A detailed description of the new feature or enhancement you are proposing. Additionally, provide any relevant
+ links, references, or attachments to offer more context about the proposal. You can also attach images or other
+ files by clicking this area to highlight it and then dragging files in.
+
+ Tip: You can attach images or other files by clicking this area to highlight it and then dragging files in.
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Use Case
+ description: Provide a use case or scenario where this feature or enhancement would be beneficial.
+
+ - type: textarea
+ attributes:
+ label: Proposed Solution
+ description: If you have a specific solution in mind, please describe it here.
diff --git a/.github/settings.yml b/.github/settings.yml
new file mode 100644
index 0000000..72e1ca6
--- /dev/null
+++ b/.github/settings.yml
@@ -0,0 +1,85 @@
+# These settings are synced to GitHub by https://probot.github.io/apps/settings/
+
+repository:
+ allow_merge_commit: false
+
+ delete_branch_on_merge: true
+
+ enable_vulnerability_alerts: true
+
+labels:
+ - name: bug
+ color: '#d73a4a'
+ description: Something isn't working
+
+ - name: documentation
+ color: '#0075ca'
+ description: Improvements or additions to documentation
+
+ - name: duplicate
+ color: '#cfd3d7'
+ description: This issue or pull request already exists
+
+ - name: enhancement
+ color: '#a2eeef'
+ description: Some improvements
+
+ - name: feature
+ color: '#16b33f'
+ description: New feature or request
+
+ - name: good first issue
+ color: '#7057ff'
+ description: Good for newcomers
+
+ - name: help wanted
+ color: '#008672'
+ description: Extra attention is needed
+
+ - name: invalid
+ color: '#e4e669'
+ description: This doesn't seem right
+
+ - name: question
+ color: '#d876e3'
+ description: Further information is requested
+
+ - name: wontfix
+ color: '#ffffff'
+ description: This will not be worked on
+
+branches:
+ - name: main
+ # https://docs.github.com/en/rest/reference/repos#update-branch-protection
+ protection:
+ # Required. Require at least one approving review on a pull request, before merging. Set to null to disable.
+ required_pull_request_reviews:
+ # The number of approvals required. (1-6)
+ required_approving_review_count: 1
+ # Dismiss approved reviews automatically when a new commit is pushed.
+ dismiss_stale_reviews: true
+ # Blocks merge until code owners have reviewed.
+ require_code_owner_reviews: true
+ # Specify which users and teams can dismiss pull request reviews.
+ # Pass an empty dismissal_restrictions object to disable.
+ # User and team dismissal_restrictions are only available for organization-owned repositories.
+ # Omit this parameter for personal repositories.
+ dismissal_restrictions:
+ # users: []
+ # teams: []
+ # Required. Require status checks to pass before merging. Set to null to disable
+ required_status_checks:
+ # Required. Require branches to be up to date before merging.
+ strict: true
+ # Required. The list of status checks to require in order to merge into this branch
+ contexts: []
+ # Required. Enforce all configured restrictions for administrators.
+ # Set to true to enforce required status checks for repository administrators.
+ # Set to null to disable.
+ enforce_admins: true
+ # Prevent merge commits from being pushed to matching branches
+ required_linear_history: true
+ # Required. Restrict who can push to this branch.
+ # Team and user restrictions are only available for organization-owned repositories.
+ # Set to null to disable.
+ restrictions: null
diff --git a/.gitignore b/.gitignore
index e9c779a..4ae1834 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,5 @@ node_modules/
package-lock.json
.parcel-cache/
dist/
-.vscode/
+.vscode/settings.json
.vercel/
\ No newline at end of file
diff --git a/.gitpod.yml b/.gitpod.yml
new file mode 100644
index 0000000..2382166
--- /dev/null
+++ b/.gitpod.yml
@@ -0,0 +1,29 @@
+# This configuration file was automatically generated by Gitpod.
+# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
+# and commit this file to your remote git repository to share the goodness with others.
+
+# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
+
+vscode:
+ extensions:
+ - yzhang.markdown-all-in-one
+ - unifiedjs.vscode-mdx
+ - xyc.vscode-mdx-preview
+ - jock.svg
+ - redhat.vscode-yaml
+ - clinyong.vscode-css-modules
+ - akamud.vscode-caniuse
+ - visualstudioexptteam.intellicode-api-usage-examples
+ - pflannery.vscode-versionlens
+ - christian-kohler.npm-intellisense
+ - esbenp.prettier-vscode
+ - rangav.vscode-thunder-client
+ - eamodio.gitlens
+ - github.vscode-pull-request-github
+ - github.vscode-github-actions
+tasks:
+ - before: |
+ pnpm i vercel -g
+ vercel login --github --oob
+ init: pnpm i
+ command: npm start
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..9723ebb
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,19 @@
+{
+ "recommendations": [
+ "yzhang.markdown-all-in-one",
+ "unifiedjs.vscode-mdx",
+ "xyc.vscode-mdx-preview",
+ "jock.svg",
+ "redhat.vscode-yaml",
+ "clinyong.vscode-css-modules",
+ "akamud.vscode-caniuse",
+ "visualstudioexptteam.intellicode-api-usage-examples",
+ "pflannery.vscode-versionlens",
+ "christian-kohler.npm-intellisense",
+ "esbenp.prettier-vscode",
+ "rangav.vscode-thunder-client",
+ "eamodio.gitlens",
+ "github.vscode-pull-request-github",
+ "github.vscode-github-actions"
+ ]
+}
diff --git a/ReadMe.md b/ReadMe.md
index 59d3b8a..4a63e0b 100644
--- a/ReadMe.md
+++ b/ReadMe.md
@@ -8,14 +8,17 @@ https://web-cell.dev/scaffold/
[![CI & CD](https://github.com/EasyWebApp/scaffold/actions/workflows/main.yml/badge.svg)][2]
+[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)][3]
+[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][4]
+
## Technology stack
-- Language: [TypeScript v5][3]
-- Component engine: [WebCell v3][4]
-- Component suite: [BootCell v2][5]
-- PWA framework: [Workbox v7][6]
-- Package bundler: [Parcel v2][7]
-- CI / CD: GitHub [Actions][8] + [Pages][9]
+- Language: [TypeScript v5][5]
+- Component engine: [WebCell v3][6]
+- Component suite: [BootCell v2][7]
+- PWA framework: [Workbox v7][8]
+- Package bundler: [Parcel v2][9]
+- CI / CD: GitHub [Actions][10] + [Pages][11]
## Development
@@ -31,12 +34,30 @@ npm start
pnpm build
```
-[1]: https://david-dm.org/EasyWebApp/scaffold
+## Best practice
+
+1. Install **[Settings][12] GitHub app** in your account or organization
+2. Click the **[Use this template][13] button** on the top of this GitHub repository's home page, then create your own repository in the app-installed namespace above
+3. Click the **[Open in GitHub codespaces][3] button** on the top of ReadMe file, then an **online VS Code development environment** will be started immediately
+4. Set [Vercel variables][14] as [Repository secrets][15], then every commit will get an independent **Preview URL**
+5. Recommend to add a [Notification step in GitHub actions][16] for your Team IM app
+6. Remind the PMs & users of your product to submit **Feature/Enhancement** requests or **Bug** reports with [Issue forms][17] instead of IM messages or Mobile Phone calls
+7. Collect all these issues into [Project kanbans][18], then create **Pull requests** & add `closes #issue_number` into its description for automation
+
[2]: https://github.com/EasyWebApp/scaffold/actions/workflows/main.yml
-[3]: https://typescriptlang.org
-[4]: https://web-cell.dev/
-[5]: https://bootstrap.web-cell.dev/
-[6]: https://developers.google.com/web/tools/workbox
-[7]: https://parceljs.org
-[8]: https://github.com/features/actions
-[9]: https://pages.github.com/
+[3]: https://codespaces.new/EasyWebApp/scaffold
+[4]: https://gitpod.io/?autostart=true#https://github.com/EasyWebApp/scaffold
+[5]: https://typescriptlang.org/
+[6]: https://web-cell.dev/
+[7]: https://bootstrap.web-cell.dev/
+[8]: https://developers.google.com/web/tools/workbox
+[9]: https://parceljs.org/
+[10]: https://github.com/features/actions
+[11]: https://pages.github.com/
+[12]: https://github.com/apps/settings
+[13]: https://github.com/new?template_name=scaffold&template_owner=EasyWebApp
+[14]: https://github.com/idea2app/Next-Bootstrap-ts/blob/80967ed49045af9dbcf4d3695a2c39d53a6f71f1/.github/workflows/pull-request.yml#L9-L12
+[15]: https://github.com/EasyWebApp/scaffold/settings/secrets/actions
+[16]: https://github.com/kaiyuanshe/kaiyuanshe.github.io/blob/bb4675a56bf1d6b207231313da5ed0af7cf0ebd6/.github/workflows/pull-request.yml#L32-L56
+[17]: https://github.com/EasyWebApp/scaffold/issues/new/choose
+[18]: https://github.com/EasyWebApp/scaffold/projects
diff --git a/package.json b/package.json
index 6a0f48c..f01ee57 100644
--- a/package.json
+++ b/package.json
@@ -16,7 +16,7 @@
"url": "https://github.com/EasyWebApp/scaffold/issues"
},
"dependencies": {
- "boot-cell": "^2.0.0-beta.0",
+ "boot-cell": "^2.0.0-beta.1",
"browser-unhandled-rejection": "^1.0.2",
"cell-router": "^3.0.0-rc.3",
"classnames": "^2.5.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 42980f2..8dc2a7f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -6,8 +6,8 @@ settings:
dependencies:
boot-cell:
- specifier: ^2.0.0-beta.0
- version: 2.0.0-beta.0(typescript@5.3.3)
+ specifier: ^2.0.0-beta.1
+ version: 2.0.0-beta.1(typescript@5.3.3)
browser-unhandled-rejection:
specifier: ^1.0.2
version: 1.0.2
@@ -2973,8 +2973,8 @@ packages:
resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==}
dev: true
- /boot-cell@2.0.0-beta.0(typescript@5.3.3):
- resolution: {integrity: sha512-LEXrOD/QtAL6r9EdpssDePcgD2kEPSINOGsovR7Q8263aD5tPga6aXorhnuG1fwcK/hK+J+25ZXGXTq5M04eYw==}
+ /boot-cell@2.0.0-beta.1(typescript@5.3.3):
+ resolution: {integrity: sha512-N3aiSbp05LVtCvho2j0EAtYIw45q7w9zZTn1px7Qki0WKYKDCwgSQo1KkDNKZ4qF6rykqvkdQDcgdcGpS5yZaQ==}
peerDependencies:
'@fortawesome/fontawesome-free': ^6
'@nuintun/qrcode': ^3
diff --git a/src/component/Nav.tsx b/src/component/Nav.tsx
deleted file mode 100644
index 71ab3c1..0000000
--- a/src/component/Nav.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import { OffcanvasNavbar } from 'boot-cell';
-import { WebCell, component, WebCellProps } from 'web-cell';
-
-export interface Nav extends WebCell {}
-
-@component({
- tagName: 'bs-nav',
- mode: 'open'
-})
-export class Nav extends HTMLElement implements WebCell {
- declare props: WebCellProps;
-
- connectedCallback() {
- const navBar = this.closest(
- 'offcanvas-navbar, .navbar'
- );
-
- if (!navBar) return this.classList.add('nav');
-
- const expand =
- navBar.expand ||
- navBar.className.match(/navbar-expand(-(\S+))?/)?.[2];
-
- this.classList.add(
- 'navbar-nav',
- 'align-items-center',
- expand && 'flex-column',
- expand && `flex-${expand}-row`
- );
- }
-
- render() {
- return ;
- }
-}
diff --git a/src/page/index.tsx b/src/page/index.tsx
index 972808b..d7348bc 100644
--- a/src/page/index.tsx
+++ b/src/page/index.tsx
@@ -1,7 +1,6 @@
-import { NavLink, NavbarBrand, OffcanvasNavbar } from 'boot-cell';
+import { Nav, NavLink, NavbarBrand, OffcanvasNavbar } from 'boot-cell';
import { createRouter } from 'cell-router';
-import { Nav } from '../component/Nav';
import { CellClock } from './Clock';
import { Hello } from './Hello';
import { HomePage } from './Home';